Remove the Cyber HUD layout and keep its sonar as a visual style

Display > HUD > Sonar now turns the sonar sweep on over Tactical or
Minimal. It is off by default, ON reveals its five sliders, and it keeps
its guards: an OFF control, the sweep only while the HUD is visible and
outside Cockpit, no animation under reduced motion, and repaint timers
re-armed only after a drawn frame that still shows contacts.

The Cyber layout, its shell skin and its Cockpit lanes are removed. Share
links, scenes, saved views and set_hud that name Cyber open Tactical with
Sonar on; links and scene shots record Tactical with Sonar under the same
code, and a restored state that names another layout turns Sonar off.
set_cyber_sonar keeps its name and works under any layout. A newer Sonar
toggle or voice setting wins over a share-link restore that lands later.

From 1200px wide the command dock and World Timeline sit 74px above the
bottom edge, as in the Omnibar layout, leaving the bottom row to the map
attribution (left) and the Power Up corner row (right). The attribution
moves to the bottom right when the page runs right to left, where the
corner row sits at the bottom left, and a long credit line wraps upward
before reaching the corner row. The Tactical bottom-right readout sits
8px above Power Up and the coordinates start level with it. The World
Timeline is narrowed to sit between the corners. Toasts keep clear of
the raised dock and the chat and voice panel height budgets subtract its
rise. Below 1200px the layout is unchanged. The left rail treats the
centered World Timeline and voice control as obstacles only where they
reach a laid-out panel.

On top of the Omnibar: sonar.css replaces cyber.css after the Omnibar
imports, the Omnibar's HUD guide step now says Layout picks Tactical or
Minimal, and the Omnibar's Tactical bottom-right readout keeps the same
8px above Power Up.

Co-authored-by: Sameh Khamis <[email protected]>
This commit is contained in:
Manjunath PaparajuandSameh Khamis authored and Sameh Khamis committed 2026-11-18 15:47:27 -08:00
1 parent 35b87c75f2
commit d68adcea21
112 files changed
+1433 -5239

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
- Remove the Cyber HUD layout and keep its sonar as a visual style. Display >
HUD > Sonar turns it on over Tactical or Minimal; it is off by default and
ON reveals its five sliders. Share links, scenes and saved views that name
Cyber open in Tactical with Sonar on, links and scene shots carry Tactical
with Sonar the same way, and the `set_cyber_sonar` voice action works under
any layout. A newer Sonar choice takes precedence over a pending share-link
restore. From 1200px wide the command dock and World Timeline sit 74px up,
the map attribution sits on the Power Up baseline, and the coordinates start
level with the bottom-right readout instead of overlapping the attribution
and Power Up (manjunath22466, #0).
+1 -2
View File
@@ -781,8 +781,7 @@ palettes use `--gev-field-background`, `--gev-field-border-color`,
`--gev-field-color` and `--gev-field-disabled-opacity`. Radio retains its own
compact density and arrow space. CCTV owns calibration editor width in
`cctv.css`; the shared inline density does not impose a feature-specific width.
Cyber supplies a shared-field palette explicitly and keeps its legacy native
field rules separate, so Radio's palette remains an intentional exception.
Radio's palette remains an intentional exception.
### Read-only status badges
+69 -70
View File
@@ -846,8 +846,7 @@ detection, style parameters, 3D aircraft, Scope and Clean UI; Effects,
Celestial, Bloom and Sharpen; and Reset to default at the foot. Each control
is a card (`src/ui/styles/visual-panel.css`) whose header row ends in an
on/off pill worded in the current language (Clean UI, an action, has none;
the buttons carry their state as `aria-pressed`). Under the Cyber HUD the
cards keep Cyber's own red skin. The presets and chips call the
the buttons carry their state as `aria-pressed`). The presets and chips call the
same Display store actions as the dock's Visual Presets tray, which stays on
desktop and phone as before, along with Location; voice `Visual Presets`
still opens that tray. On a phone the More sheet shows that tray right above
@@ -872,8 +871,7 @@ the out-of-the-box look: the Normal style, the first-run post defaults
(bloom off, sharpen on at 49%, the HUD shown, Dense detection at 75%
with its fade and outside opacity, the celestial ring off), Elastic
allocation, Scope on at 100% feather and 100% opacity, and 3D aircraft on in
Proximity. The HUD layout follows the Normal style, as choosing it does: the
Tactical HUD, except that the Cyber HUD stays Cyber. Inside Contacts, which
Proximity. The HUD layout stays as the viewer set it. Inside Contacts, which
lends detection for the session, the reset's detection becomes what leaving
Contacts puts back and what a share link carries. It leaves the map source, the pinned scope terminus, Sonar's
settings, other styles' parameters, the layers and the panels alone.
@@ -1013,9 +1011,9 @@ and Radio through the cockpit layout pass, whose floor
matches it, so an open panel still stops short of the briefing. Contact and
Live Signals are shorter, in the same glass, with the briefing's rows and
weather tiles tightened; Regional News stays a briefing page. In a right-to-left language, the rail keeps its
physical side as the cockpit's other windows do. The Cyber HUD and the phone
keep their own cockpit layouts, with the Display and Radio launchers as
before, and edge mode does not apply in the cockpit.
physical side as the cockpit's other windows do. The phone keeps its own
cockpit layout, with the Display and Radio launchers as before, and edge mode
does not apply in the cockpit.
## God's Eye View in conversations — October 2, 2026
@@ -1117,73 +1115,77 @@ at 70% opacity behind telemetry, vertical metadata and scene chrome. Original
HUD text color, glow and opacity are preserved. Scope OFF brightens the tagline
and Active Style label with the shared secondary text color. The title plate
covers the eye and title without moving the title or tagline. Scope ON retains
the original HUD presentation; Cyber retains its existing skin.
the original HUD presentation.
`node scripts/qa-scope-hud.mjs` checks native input, range, layout persistence,
restoration and both Scope presentations. `QA_SCREENSHOT_DIR` saves screenshots.
## HUD layouts — October 29, 2026
Display > HUD > Layout offers Tactical, Minimal and Cyber; the `set_hud` voice
action accepts the same three. The Operator layout is retired. Share links
Display > HUD > Layout offers Tactical and Minimal; the `set_hud` voice
action accepts the same two. The Operator layout is retired. Share links
keep its enum code so older links still parse, and a link, scene or saved state
that names Operator restores the default Tactical layout. Operator was the
only layout that showed the HUD's top banner bar, so its markup and styles are
removed too.
## Cyber HUD — September 30, 2026
## Sonar visual style — November 18, 2026
Display > HUD > Layout includes Cyber, also available through the HUD voice
action and shared visual state. An explicit first transition into Cyber selects
FLIR with Ironbow 0.42. An explicit switch back to another HUD layout restores
the visual preset used before Cyber; restored links and scenes remain
authoritative. The skin uses shared red/slate panel treatments in map and cockpit,
with compact 200px collapsed controls and wider expanded panels. Other HUD
layouts retain their existing presentation.
Chamfered panel expand/collapse controls use an inset keyboard-focus outline and
red hover border in both map and cockpit, so clipping does not hide the highlight.
Cyber's map-side right rail opens one panel at a time while keeping collapsed
launchers available. Display, CCTV and Context scroll their contents inside fixed
headers and decorative frames. The narrow-screen rail remains scrollable to reach
each panel. Radio retains the shared nested Context player without relocating
playback controls on theme changes.
Voice help/error popups and Location/Visual Presets pins extend beyond their
Cyber frames without being clipped: the shapes decorate non-interactive
pseudo-elements. The lower-left telemetry card leaves room for attribution's
full logo row. New panels can use the [shared surface contract](panel-surfaces.md)
for theme tokens, rail input and a fixed header with a bounded scroll body.
The contract is intentionally future-facing and opt-in; its first production
adopter will land after this change. Existing owners still control disclosure,
persistence and placement, while small-screen rail popup clipping and other
integration limits remain documented in the contract.
On desktop, Cyber raises the left rail so it clears the lower coordinate card.
`layoutRightPanelRail` reads that rendered top as its measured `baseTop`, which
keeps the right rail aligned. Cockpit retains its separate rail placement for
its visor layout.
The Cyber HUD layout and its shell skin are removed. Its sonar stays as an
opt-in visual style over Tactical or Minimal: Display > HUD > Sonar is OFF by
default, and ON reveals the Rings, Range, Power, Opacity and Sector sliders.
Share links, scenes and saved views that name Cyber keep its enum code and
open in Tactical with Sonar on. Links and scene shots record Tactical with
Sonar on under that same code, and a restored state that names another layout
turns Sonar off; Minimal has no such code, so its Sonar is not carried.
An explicit Sonar toggle or validated voice setting takes visual restore
authority, so a delayed share-link restore cannot undo the newer choice.
Choosing Reset Visual keeps the HUD layout and the Sonar setting.
Sonar has one contact-highlighting method. Native Cesium points, billboards and
labels are treated in GPU draw commands without replacing their positions,
identities or pick commands. Model and canvas/DOM overlays retain their own
rendering paths. Sonar OFF stops the sweep while retaining Cyber's neutral
contact treatment. Reduced motion disables the animated sweep; cockpit and
hidden HUD states do not apply the map treatment. If the native shader is not
supported, native contacts remain available and Display reports the limitation.
No CSS scene-dimming fallback or effect selector is exposed.
rendering paths. Sonar runs only while it is on, the HUD is visible and Cockpit
is closed. Reduced motion disables the animated sweep. The sweep's repaint
timer re-arms only after a drawn frame (postRender) that still shows contacts.
If the native shader is not supported, native contacts remain available and
Display reports the limitation. No CSS scene-dimming fallback or effect
selector is exposed.
The Sonar controls adjust rings, range, power, opacity and sector. Sweep opacity
affects detection painting rather than label cohort admission. Theme exit and
renderer teardown release the derived GPU resources and restore owned model
colors without replacing newer layer-owned color changes.
affects detection painting rather than label cohort admission. Turning Sonar
off and renderer teardown release the derived GPU resources and restore owned
model colors without replacing newer layer-owned color changes.
The `set_cyber_sonar` voice action adjusts the same controls without switching
themes or enabling omitted settings. State readback distinguishes configured
settings from active map/contact effects. Sonar settings are session-only and
return to their defaults on reload. Sliders accept integer values matching the
The `set_cyber_sonar` voice action keeps its name and adjusts the same
controls under any HUD layout, without switching layouts or enabling omitted
settings. State readback distinguishes configured settings from active
map/contact effects. Sonar settings are session-only and return to their
defaults (Sonar off) on reload. Sliders accept integer values matching the
action's ranges.
## Bottom-corner placement — November 18, 2026
From 1200px the command dock and the World Timeline sit 74px above the
bottom edge, and the map attribution row sits on the bottom edge on the Power
Up baseline (bottom right when the page runs right to left, where the corner
row moves to the bottom left). A credit line too long for the space before the
corner row wraps upward instead of running under it. The Tactical bottom-right
readout (GSD / ALT / AIS) sits 8px above the Power Up row and the Tactical and
Minimal coordinates start level with it. The World Timeline is 44rem narrower
than the screen there, so it sits between the corners and they stay put while
it shows. Toasts keep 12px above the raised dock, and the chat and voice panel
height budgets subtract its rise. Below 1200px the dock reaches the bottom
corners, so it keeps to the bottom edge, the attribution row sits above it and
the coordinates clear the row's logo line. In the desktop Omnibar layout the
Omnibar's own rules (`src/ui/styles/omnibar-dock.css`) place the dock, the
World Timeline, the credits and the coordinates; its Tactical bottom-right
readout also keeps 8px above the Power Up row. The left rail treats the
centered World Timeline and voice control as obstacles only where they reach a
laid-out panel, not the stack's transparent gutter. Known limit, unchanged
from main: below 1200px with the World Timeline showing, the Tactical
bottom-right readout does not rise with the bar and can touch the dock.
Wind appears in the Weather group before Audio. The surface-weather prototype
uses keyless NOAA GFS or ECMWF IFS forecasts on an approximately 1° display grid.
It defaults to 10 m wind trails over the existing basemap. Speed shading is an explicit choice; earlier v2 links retain their original speed-shading meaning.
@@ -2474,7 +2476,7 @@ change still in flight blocks entry until it settles. Double-clicking the
selected vessel enters it, and the entry button reads BRIDGE with a ship icon
both in Contacts (`#cockpit-entry`) and under the selected vessel's Intel HUD
readout in the bottom-right corner (`#cockpit-entry-readout`, shown with the
HUD on, in its Tactical and Cyber layouts). Turning Live AIS Vessels off ends
HUD on, in its Tactical layout). Turning Live AIS Vessels off ends
the bridge: the layer then has no subject (`getCockpitSubject` returns null).
The bridge picture uses AIS alone, so no other feed being off makes it partial.
Voice (`control_cockpit`) and the selection entry transaction stay aircraft-only;
@@ -3210,9 +3212,8 @@ owns surrounding layout and context-specific sizing. CCTV's calibration editor
width lives in `ui/styles/cctv.css`, while the shared inline field variant owns
only density and spinner treatment. Radio supplies its field palette and disabled
opacity through the `--gev-field-*` variables, retaining compact typography and
arrow space locally. Cyber supplies shared-field palette variables explicitly;
its legacy native-field palette rules exclude `.gev-field`. These ownership
boundaries preserve the current Tactical/Cyber appearance and native behavior.
arrow space locally. These ownership boundaries preserve the current Tactical
appearance and native behavior.
## Ordinary status badges
@@ -4695,10 +4696,8 @@ isCurrent })` gates BOTH halves of the map-stack switch, which is its only
> each wing shows only its icon. `CommandDockView.vue` still gives the toggles
> their "Expand/Collapse …" `aria-label` and `title` (`trayWords`), so the
> browser tooltip is the only visible name on hover.
> The Cyber HUD layout is excluded: it sets `--dock-side-compact` to
> 9–9.75rem, which fits its labels. The former ≤620px ellipsis clip is gone:
> the phone shell takes over at 720px, so it never applied to a visible
> dock.
> The former ≤620px ellipsis clip is gone: the phone shell takes over at
> 720px, so it never applied to a visible dock.
> - **LOCATION mini-status is data-only today (2026-08-20):** the collapsed
> readout now follows a free-text geocode search as well as preset pills
> (`src/locationStatus.js` owns the copy for both), and every other camera
@@ -4938,7 +4937,7 @@ down | auth-failed` (plus the unchanged `missing-key`/`unsupported`) with
> corridor). Its minimal Display popover exposes Intel HUD,
> Detection, Parameters, and 3D aircraft. During Cockpit, those existing
> standard Display controls move into the Cockpit popover and retain their normal
> nested interaction: HUD plus Tactical/Minimal/Cyber layout, Detection plus
> nested interaction: HUD plus Tactical/Minimal layout and Sonar, Detection plus
> Density/Allocation/Fade/Outside tuning, and 3D plus Proximity/All mode. The
> same nodes and state return to the map Display on exit, so Cockpit does not
> maintain a second control state. **Detection is owned by the CONTACTS
@@ -7331,7 +7330,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. With no tracked aircraft, an AIS vessel already selected (the vessel layer's `getSelectedInfo()`) becomes the subject, at activation and again when a deferred dependency settles, exactly as a vessel selected while `CONTACTS` is on; no nearest flight is picked and the camera is not moved.
- `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 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.
- Context is set for reading in every theme: mode, standby and action labels are 10 px, and the panel draws no glow halo. 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.
- 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. That enable includes the first mission-index load: an HTTP error, timeout, network failure or malformed payload before any index has loaded fails the enable, so Context rolls back to the pre-entry layers instead of committing an empty, isolating mode; the camera returns to its pre-entry view unless navigation took it, and a toast says the mission index could not load. A valid empty index still enters, and a refresh failure after an index loaded keeps its records and the mode. Exiting cancels the layer's own camera flights but never one navigation started. 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.
@@ -7339,7 +7338,7 @@ silently demoting every later lookup for the session.
- On activation it focuses the nearest currently observed aircraft across the civilian and military feeds, with military winning an exact distance tie; if none are available, it focuses an observed AIS vessel. The aircraft search is deliberately uncapped and one refresh-tick retry handles initially empty feeds. This is an attention-priority navigation shortcut, not a high-risk, affiliation, or threat classification.
- A selected aircraft, AIS vessel, or mapped installation gets a 250 km **context window** with nearby cohort counts, nearest examples, source labels, and stale/unavailable reasons. It emits `NEARBY` or `UNKNOWN`; no detection, engagement, affiliation, or sensor-activity conclusion is calculated.
- Contacts rows and the Cockpit Contact counts name each cohort's provider: the source of the last snapshot, marked `FALLBACK` or `STALE` as its layer row would be. A poll in flight keeps the mark, where the layer row shows `LOADING`. A flight snapshot from the adsb.lol regional fallback reads `adsb.lol · FALLBACK`, not `OpenSky`.
- The window's edge is drawn on the globe as a 250 km range ring: a 4 px polyline whose outer 1 px, half a pixel on each side, is a dark halo around a 3 px Context-blue core, 2.5 km above the ellipsoid (`AWARENESS_RANGE_RING_STYLE` in `src/layers/awareness/policy.js`). The halo keeps it legible over bright desert and snow, dark ocean and forest, and under the FLIR, NVG and CRT styles, where the earlier 1 px ellipse outline disappeared. It is one outlined line in an unpickable draw-port line set (`src/layers/awareness/rangeRing.js`), so a click or tap on its edge reaches the contact underneath; the halo is the line's own outline, so the translucent core and halo never darken where they meet; it moves when the subject moves. Three dim sonar pulses (3 px with a dark edge half a pixel wide on each side, same colours, at most 60% opacity), each an outlined line in the same set, grow slowly from the subject at constant speed, one every 3 s and each taking 9 s, and arrive at the ring at about a third of that. Behind each pulse a radial gradient in the same blue fades inward over 35% of the radius: one unpickable flat ellipse 2.5 km up with 270 km semi-axes, filled with a 256-pixel canvas painted with the band (two canvases in turn, each under a new key). The ellipse stands until the subject has moved 20 km from where it was built, the canvas keeping the band concentric with the subject meanwhile, and not at all while the pulses rest. Fronts and band are fixed in the world, so they step every 80 ms however many frames are drawn and look the same whether the camera moves or not; crossing the 2.5 km rim height shows or hides them at once. While the camera is below the band's 2.5 km height, where it would sweep across the sky, the pulses rest: the band and fronts are hidden and there is no ring flash, no echo and no frame request. Terrain or 3D tiles higher than 2.5 km (the Alps, Andes, Rockies) still cut through the band and the ring when seen from above, as the ring alone already did; the height check uses the camera's height above the ellipsoid, not above the ground. While pulses run, the ring dims to 40% and flashes to full strength as each pulse reaches it, fading over 1.8 s. As a pulse front crosses a flight, military aircraft or AIS vessel, the detection overlay draws a second bracket around that contact's own bracket, in the pulse blue on the default detection style and in the style's own line colour under NVG, FLIR and CRT, which spreads outward as it fades over 1.4 s (`AWARENESS_RANGE_ECHO`, read through `src/awarenessEcho.js`; no layer's icon is restyled, and mapped installations have no detection bracket). Pulses are born 5 km out, so the subject itself and anything nearer never echo. Pulses run for 9 s (three ring flashes) after a selection or a camera move, fading in and out over 1.2 s, then rest: the ring stays on screen at full strength, the pulses, gradient and echoes are hidden, and nothing asks for frames, so a parked Contacts view is quiet again. Only a camera move within 1.5 s of the user handling the map (pointer, wheel or touch on the Cesium canvas, which covers a drag's inertia, and a drag or touch begun there keeps counting until its last finger or button lifts, even outside the canvas, unless the window loses focus or the page is hidden first; keys typed elsewhere do not count, nor does input while Cesium's camera controls are off, as in the cockpit view, and a gesture still pending when the cockpit or another owner takes the camera is dropped) wakes them; a moving subject and the app's own camera moves (a tracked aircraft, the cockpit view, an orbit, a fly-to) do not, since they move on every refresh. While they run they never hold continuous rendering: each drawn frame arms one step 80 ms later (the Cyber sonar cadence, `CYBER_SONAR_RENDER_INTERVAL_MS`) whose changes ask for the frame that draws them, so a parked view repaints at about 12.5 fps, one frame a step, and never beats the detection lane's 80 ms gate. Under `prefers-reduced-motion`, or on a renderer without frame hooks, there are no pulses or echoes and the ring stays on screen; changing the preference mid-session rebuilds the ring. The ring follows a moving subject once it has moved 250 m.
- The window's edge is drawn on the globe as a 250 km range ring: a 4 px polyline whose outer 1 px, half a pixel on each side, is a dark halo around a 3 px Context-blue core, 2.5 km above the ellipsoid (`AWARENESS_RANGE_RING_STYLE` in `src/layers/awareness/policy.js`). The halo keeps it legible over bright desert and snow, dark ocean and forest, and under the FLIR, NVG and CRT styles, where the earlier 1 px ellipse outline disappeared. It is one outlined line in an unpickable draw-port line set (`src/layers/awareness/rangeRing.js`), so a click or tap on its edge reaches the contact underneath; the halo is the line's own outline, so the translucent core and halo never darken where they meet; it moves when the subject moves. Three dim sonar pulses (3 px with a dark edge half a pixel wide on each side, same colours, at most 60% opacity), each an outlined line in the same set, grow slowly from the subject at constant speed, one every 3 s and each taking 9 s, and arrive at the ring at about a third of that. Behind each pulse a radial gradient in the same blue fades inward over 35% of the radius: one unpickable flat ellipse 2.5 km up with 270 km semi-axes, filled with a 256-pixel canvas painted with the band (two canvases in turn, each under a new key). The ellipse stands until the subject has moved 20 km from where it was built, the canvas keeping the band concentric with the subject meanwhile, and not at all while the pulses rest. Fronts and band are fixed in the world, so they step every 80 ms however many frames are drawn and look the same whether the camera moves or not; crossing the 2.5 km rim height shows or hides them at once. While the camera is below the band's 2.5 km height, where it would sweep across the sky, the pulses rest: the band and fronts are hidden and there is no ring flash, no echo and no frame request. Terrain or 3D tiles higher than 2.5 km (the Alps, Andes, Rockies) still cut through the band and the ring when seen from above, as the ring alone already did; the height check uses the camera's height above the ellipsoid, not above the ground. While pulses run, the ring dims to 40% and flashes to full strength as each pulse reaches it, fading over 1.8 s. As a pulse front crosses a flight, military aircraft or AIS vessel, the detection overlay draws a second bracket around that contact's own bracket, in the pulse blue on the default detection style and in the style's own line colour under NVG, FLIR and CRT, which spreads outward as it fades over 1.4 s (`AWARENESS_RANGE_ECHO`, read through `src/awarenessEcho.js`; no layer's icon is restyled, and mapped installations have no detection bracket). Pulses are born 5 km out, so the subject itself and anything nearer never echo. Pulses run for 9 s (three ring flashes) after a selection or a camera move, fading in and out over 1.2 s, then rest: the ring stays on screen at full strength, the pulses, gradient and echoes are hidden, and nothing asks for frames, so a parked Contacts view is quiet again. Only a camera move within 1.5 s of the user handling the map (pointer, wheel or touch on the Cesium canvas, which covers a drag's inertia, and a drag or touch begun there keeps counting until its last finger or button lifts, even outside the canvas, unless the window loses focus or the page is hidden first; keys typed elsewhere do not count, nor does input while Cesium's camera controls are off, as in the cockpit view, and a gesture still pending when the cockpit or another owner takes the camera is dropped) wakes them; a moving subject and the app's own camera moves (a tracked aircraft, the cockpit view, an orbit, a fly-to) do not, since they move on every refresh. While they run they never hold continuous rendering: each drawn frame arms one step 80 ms later (the sonar cadence, `CYBER_SONAR_RENDER_INTERVAL_MS`) whose changes ask for the frame that draws them, so a parked view repaints at about 12.5 fps, one frame a step, and never beats the detection lane's 80 ms gate. Under `prefers-reduced-motion`, or on a renderer without frame hooks, there are no pulses or echoes and the ring stays on screen; changing the preference mid-session rebuilds the ring. The ring follows a moving subject once it has moved 250 m.
- For a selected live aircraft or vessel, the context window refreshes from the existing tracker/feed position every 750 ms, so nearest distances and cohort counts follow the subject without introducing a duplicate poll loop.
- Aircraft cohort membership uses every locally loaded, selectable contact inside the 250 km window, including a plane hidden only by horizon culling or because its 3D model owns the visual. Counts and navigation therefore do not change with the current camera angle or billboard/model handoff.
- Nearby examples in the context panel are focus controls: they use their owning layer's existing selection/tracking path, then frame that contact. Static-installation distances use ellipsoidal surface distance so the count matches the ground-projected context disk.
@@ -7826,8 +7825,8 @@ focuses search from outside a text field, as do Cmd+K on macOS and Ctrl+K
elsewhere (Ctrl+K on macOS is left alone); none of them takes focus from an
open modal dialog or from inside a dialog such as the guide. While voice is
on, the suggestions give way to the waveform but an error stays shown. The map credits stay on the
Power Up row in the ordinary desktop layout, and the two lower tactical HUD
readouts start at the same height.
Power Up row in the ordinary desktop layout, and the Tactical bottom-right
readout sits 8px above that row.
Pending owner decision: in the desktop Omnibar layout
(`src/ui/styles/omnibar-dock.css`) the legacy Location and Visual trays of
@@ -8501,7 +8500,7 @@ apply to `public/` assets or built-preview serving.
- Panel POSITION keys are versioned `v8` (`godsEyeView.v8.panelPos.<id>`); collapsed-state keys remain `v6`. The one-time position reset clears stale DISPLAY placements that could overlap the Context rail.
- Map Source lives in the bottom Visual Presets tray. The left accordion contains no MAP STACK panel, and the `k` panel token that addressed it is gone from the share registry, so legacy `ui=k...` state takes the ordinary unknown-token skip.
- A dock popover (Visual Presets, Location) auto-dismisses on mouse-away unless pinned. Focus inside the tray defers that dismissal only when the browser reports `:focus-visible` — keyboard focus and typed-into fields hold the tray open; a mouse-clicked tile does not, because Chromium focuses a `<button>` on press.
- The voice and chat panels share the left panels' glass surface (`--glass-bg`, `--glass-border`, blur(24px) saturate(1.4); `src/ui/styles/ai-chat.css`). The docked voice control draws its own blur on a layer behind it, so the panels inside it still blur the map. Cyber keeps its own surfaces.
- The voice and chat panels share the left panels' glass surface (`--glass-bg`, `--glass-border`, blur(24px) saturate(1.4); `src/ui/styles/ai-chat.css`). The docked voice control draws its own blur on a layer behind it, so the panels inside it still blur the map.
- 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. 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.
@@ -8582,11 +8581,11 @@ apply to `public/` assets or built-preview serving.
The ship bridge and the orbital view have their own own-layer gates
(`bridgeEntryAllowed`, `orbitEntryAllowed`; see
[Ship bridge view](#ship-bridge-view) and [Orbital view](#orbital-view)).
- **Aircraft cockpit view:** selecting a commercial or military aircraft reveals a `COCKPIT` action once that aircraft's own layer is on; Contacts is not required. The action shows in Contacts (`#cockpit-entry`) and under the Intel HUD's bottom-right readout (`#cockpit-entry-readout`, with the HUD on, in its Tactical and Cyber layouts), so entry needs no Contacts panel. Turning off the ridden aircraft's layer ends the view (the layer clears its tracking). When an air feed the surrounding picture uses is off, the Cockpit says so instead of blocking: Live Signals leads with `MILITARY FEED OFF · PARTIAL PICTURE` or `FLIGHTS FEED OFF · PARTIAL PICTURE`, and the Contact card shows that line in place of its inputs status, so a partial picture is never presented as complete. `control_cockpit` refuses entry with `entryBlockedReason` `contacts-starting` (a Context change in flight), `subject-layer-off` (the aircraft's layer, or with none tracked any aircraft layer, is off) or `no-tracked-aircraft`. Cockpit mode temporarily releases Cesium's orbit-follow transform and drives a first-person camera from the tracked aircraft's existing smoothed display position and course. Its concave helmet-visor HUD shows callsign, UTC time, coordinates, curved roll/pitch guides, and a seven-division heading tape. Ambient commercial and military AIR contacts use a Cockpit near/far band selected by the shared Display 3D mode: Proximity admits at 150 km and retains to 185 km; All admits at 400 km and retains to 450 km. The shared 3D toggle now applies in Cockpit: Off keeps in-range contacts as rotating 2D aircraft silhouettes, while On lets a ready admitted glTF take over without a drawing gap. The Cockpit model cap remains 60 and can only lower the map budget; in-range contacts that are capped or still loading remain 2D silhouettes instead of degrading to out-of-range dots. Contacts outside the selected band use small rotation-free cyan-white pips for civilian aircraft and amber pips for military. The pilot's own airframe is not drawn in first person, and exiting clears the Cockpit band and restores normal map silhouettes/models. The normal left accordion remains available for Layers and Authoring and keeps the same 26vh HUD-aligned anchor used in map mode, independent of whether the bottom-left Contact card is expanded or collapsed; the right-rail CCTV and Context chooser are hidden to avoid duplicating or overlapping the cockpit presentation. When the intelligence HUD is enabled, its classification, scene summary, collection/orbit metadata, coordinates, and imaging-status text remain visible as reduced peripheral cockpit telemetry; the optical center and flight instruments stay clear, and turning the HUD off still hides it. Ground speed, exact heading, and rendered altitude form one compact lower-center instrument cluster, keeping the horizon and peripheral view open. A second live altitude tape hugs the inside-right visor rim: its rail and nine moving ticks are derived from the same responsive keyhole radius, remain 20 px inside the circular edge even on wide displays, fade deeply at both vertical ends, and move continuously behind a fixed current-altitude pointer; its interval tightens automatically near the surface and it is suppressed on narrow screens. Cockpit mode also has a weather-backed transparent volumetric-cloud pass derived from the supplied FBM/domain-warped R&D shader. It renders at no more than 520×320, uses 24 ray steps/three FBM octaves at 12 FPS, is clipped to the visor, fails clear when Open-Meteo is unavailable, and stops its animation completely on cockpit exit. It does not restore the prior CPU weather canvases, precipitation, scene fog, or any map-mode effect. When Contacts is active for the tracked aircraft, the compact `CONTACT` rail adds the 250 km subject window, four cohort counts, nearest observed/mapped example with relative bearing and distance, freshness, explicit uncertainty, and Previous and Next controls plus its own collapse control. The mirrored right rail is a three-page **cockpit briefing carousel**: source-backed live signals, location-matched regional headlines, and physical-region/current-weather context from bundled Natural Earth polygons and Open-Meteo. It is manual-first: Previous, Next, and direct page controls are always available, and the visible `CYCLE OFF` / `CYCLE ON` control starts or stops the nine-second page cycle. The cycle pauses on hover or keyboard focus and stops while collapsed, hidden, or outside cockpit mode; live signal data continues refreshing either way. Regional News holds its list to the last 24 hours (`newsWindowHours` in the brief; the client drops anything older or undated even if a server sends it) and shows four distinct states: fresh results with no banner and a `{SOURCE} · LAST 24 H` footer; earlier results kept after a failed refresh under `CACHED · REFRESH FAILED` with the cached age in the footer; `NO NEWS IN THE LAST 24 H` when a source answered wiLine truncated
- **Aircraft cockpit view:** selecting a commercial or military aircraft reveals a `COCKPIT` action once that aircraft's own layer is on; Contacts is not required. The action shows in Contacts (`#cockpit-entry`) and under the Intel HUD's bottom-right readout (`#cockpit-entry-readout`, with the HUD on, in its Tactical layout), so entry needs no Contacts panel. Turning off the ridden aircraft's layer ends the view (the layer clears its tracking). When an air feed the surrounding picture uses is off, the Cockpit says so instead of blocking: Live Signals leads with `MILITARY FEED OFF · PARTIAL PICTURE` or `FLIGHTS FEED OFF · PARTIAL PICTURE`, and the Contact card shows that line in place of its inputs status, so a partial picture is never presented as complete. `control_cockpit` refuses entry with `entryBlockedReason` `contacts-starting` (a Context change in flight), `subject-layer-off` (the aircraft's layer, or with none tracked any aircraft layer, is off) or `no-tracked-aircraft`. Cockpit mode temporarily releases Cesium's orbit-follow transform and drives a first-person camera from the tracked aircraft's existing smoothed display position and course. Its concave helmet-visor HUD shows callsign, UTC time, coordinates, curved roll/pitch guides, and a seven-division heading tape. Ambient commercial and military AIR contacts use a Cockpit near/far band selected by the shared Display 3D mode: Proximity admits at 150 km and retains to 185 km; All admits at 400 km and retains to 450 km. The shared 3D toggle now applies in Cockpit: Off keeps in-range contacts as rotating 2D aircraft silhouettes, while On lets a ready admitted glTF take over without a drawing gap. The Cockpit model cap remains 60 and can only lower the map budget; in-range contacts that are capped or still loading remain 2D silhouettes instead of degrading to out-of-range dots. Contacts outside the selected band use small rotation-free cyan-white pips for civilian aircraft and amber pips for military. The pilot's own airframe is not drawn in first person, and exiting clears the Cockpit band and restores normal map silhouettes/models. The normal left accordion remains available for Layers and Authoring and keeps the same 26vh HUD-aligned anchor used in map mode, independent of whether the bottom-left Contact card is expanded or collapsed; the right-rail CCTV and Context chooser are hidden to avoid duplicating or overlapping the cockpit presentation. When the intelligence HUD is enabled, its classification, scene summary, collection/orbit metadata, coordinates, and imaging-status text remain visible as reduced peripheral cockpit telemetry; the optical center and flight instruments stay clear, and turning the HUD off still hides it. Ground speed, exact heading, and rendered altitude form one compact lower-center instrument cluster, keeping the horizon and peripheral view open. A second live altitude tape hugs the inside-right visor rim: its rail and nine moving ticks are derived from the same responsive keyhole radius, remain 20 px inside the circular edge even on wide displays, fade deeply at both vertical ends, and move continuously behind a fixed current-altitude pointer; its interval tightens automatically near the surface and it is suppressed on narrow screens. Cockpit mode also has a weather-backed transparent volumetric-cloud pass derived from the supplied FBM/domain-warped R&D shader. It renders at no more than 520×320, uses 24 ray steps/three FBM octaves at 12 FPS, is clipped to the visor, fails clear when Open-Meteo is unavailable, and stops its animation completely on cockpit exit. It does not restore the prior CPU weather canvases, precipitation, scene fog, or any map-mode effect. When Contacts is active for the tracked aircraft, the compact `CONTACT` rail adds the 250 km subject window, four cohort counts, nearest observed/mapped example with relative bearing and distance, freshness, explicit uncertainty, and Previous and Next controls plus its own collapse control. The mirrored right rail is a three-page **cockpit briefing carousel**: source-backed live signals, location-matched regional headlines, and physical-region/current-weather context from bundled Natural Earth polygons and Open-Meteo. It is manual-first: Previous, Next, and direct page controls are always available, and the visible `CYCLE OFF` / `CYCLE ON` control starts or stops the nine-second page cycle. The cycle pauses on hover or keyboard focus and stops while collapsed, hidden, or outside cockpit mode; live signal data continues refreshing either way. Regional News holds its list to the last 24 hours (`newsWindowHours` in the brief; the client drops anything older or undated even if a server sends it) and shows four distinct states: fresh results with no banner and a `{SOURCE} · LAST 24 H` footer; earlier results kept after a failed refresh under `CACHED · REFRESH FAILED` with the cached age in the footer; `NO NEWS IN THE LAST 24 H` when a source answered with nothing Line truncated
- **Cockpit left-panel clearance:** the Cockpit Contact card and peripheral HUD participate in the adaptive left accordion's live obstacle measurements, including live viewport-height changes. Expanding Layers or Authoring keeps the active panel in the available upper-left corridor with internal scrolling; it does not cover the Contact card, lower Cockpit controls, or Cesium credit line. Outside Cockpit the hidden card does not alter the normal corridor.
- **Cockpit Context scope:** the 250 km radius applies to the air/sea proximity cohorts. Installation counts come only from the currently loaded viewport and are labeled `CURRENT VIEWPORT ONLY` in the cockpit as well as the normal Context panel; neither surface presents them as a complete 250 km installation survey.
- **Cockpit camera anchor:** first-person mode does not write feed-boundary corrections directly into the camera. A cockpit-only inertial anchor advances from the selected aircraft's displayed course and speed, then converges toward the authoritative delayed track with correction capped below forward motion. The displayed kinematics are derived from the same consecutive fix segment as the rendered position, with raw feed speed/course used only as fallback; a transient zero/missing feed speed therefore cannot freeze a visibly moving aircraft after layer enable or a map/cockpit handoff. Rendered altitude continues to come from that interpolated track position. Late ADS-B fixes and short render stalls can remove drift without accelerating or reversing the view. Camera placement runs before scene update/culling at a bounded 20 Hz so a moving cockpit does not force Photoreal 3D Tiles to retraverse on every display frame; textual instruments update at 10 Hz and context/layout work at 4 Hz. Every far Cockpit contact pip shares one stable Cesium texture-atlas entry and skips unused screen-projected course calculations, while only in-range 2D aircraft silhouettes pay the screen-projected rotation cost; ambient glTF collections are hidden/retained rather than synchronously destroyed at cockpit entry, and context rails lay out only on explicit content/state changes and viewport resize. The deliberate 15/30-second layer interpolation delays and per-Cesium-frame position caches remain unchanged.
- **Cockpit route, vision, and view controls:** visible on-screen `COCKPIT`, `RESET`, and `EXIT COCKPIT` controls are the way in and out; Cockpit claims no `C` shortcut, so `C` keeps toggling CCTV, also inside a first-person view. RESET uses the same canonical globe route as the map and voice actions, exits Cockpit, and releases its camera ownership rather than exposing the hidden map-style top action. When the tracked commercial flight has a plausible ADSBDB route, the top of the right briefing rail shows a compact `FROM → TO` airport strip and the visor shows a centered estimated-destination chevron with its relative bearing; its destination label rounds to whole degrees in 000–359, wrapping rounded north to 000° while the chevron continues to use the relative bearing independently of label rounding; absent or implausible route data hides the strip and cue rather than guessing. The cockpit-local vision control is an interactive `PREV / CURRENT / NEXT` carousel over `NORMAL`, `CRT`, `NVG`, `FLIR`, `ANIME`, and `NOIR`; its previous/next actions wrap, and activating the current value advances to the next style. Cockpit enters on the active map preset, so a Cyber FLIR map opens Cockpit on FLIR while Normal remains a distinct option instead of producing a second FLIR entry. Cockpit choices temporarily activate the existing Cesium post-process stages, while exiting Cockpit through either EXIT or RESET restores the pre-entry map style. The regional-news page uses a free Google News RSS locality query for the last day (`when:1d`) first, with the existing GDELT query (24 h timespan) retained only as a fail-soft fallback; both keep only articles published in the last 24 hours, newest first; linked headlines remain reporting, not verified incidents or risk intelligence.
- **Cockpit route, vision, and view controls:** visible on-screen `COCKPIT`, `RESET`, and `EXIT COCKPIT` controls are the way in and out; Cockpit claims no `C` shortcut, so `C` keeps toggling CCTV, also inside a first-person view. RESET uses the same canonical globe route as the map and voice actions, exits Cockpit, and releases its camera ownership rather than exposing the hidden map-style top action. When the tracked commercial flight has a plausible ADSBDB route, the top of the right briefing rail shows a compact `FROM → TO` airport strip and the visor shows a centered estimated-destination chevron with its relative bearing; its destination label rounds to whole degrees in 000–359, wrapping rounded north to 000° while the chevron continues to use the relative bearing independently of label rounding; absent or implausible route data hides the strip and cue rather than guessing. The cockpit-local vision control is an interactive `PREV / CURRENT / NEXT` carousel over `NORMAL`, `CRT`, `NVG`, `FLIR`, `ANIME`, and `NOIR`; its previous/next actions wrap, and activating the current value advances to the next style. Cockpit enters on the active map preset, so a FLIR map opens Cockpit on FLIR while Normal remains a distinct option instead of producing a second FLIR entry. Cockpit choices temporarily activate the existing Cesium post-process stages, while exiting Cockpit through either EXIT or RESET restores the pre-entry map style. The regional-news page uses a free Google News RSS locality query for the last day (`when:1d`) first, with the existing GDELT query (24 h timespan) retained only as a fail-soft fallback; both keep only articles published in the last 24 hours, newest first; linked headlines remain reporting, not verified incidents or risk intelligence.
- Cockpit wind-direction labels wrap after rounding to whole degrees, so a direction of 359.5° displays as `N · 0°` rather than `N · 360°`.
- The transit, ALPR, vessel, CCTV, Local ADS-B, flight and military context, awareness, Cockpit and Street Level heading readouts, and the query tools' vessel `course_deg` and `heading_deg`, aircraft `course_deg`, transit `bearing_deg`, camera `heading_deg` and satellite `rise_azimuth_deg` and `azimuth_deg`, round through `roundHeadingDegrees` in `src/data/headingDegrees.js` (whole degrees 0–359, `null` when not finite, so each caller keeps its own placeholder); `normalizeHeading` lives there too and `cockpitMath.js` re-exports it. The Cockpit's `TRACK ACQUIRED` signal uses `formatHeadingReadout`, so a 359.6° track reads `COURSE 000°`.
- **Cockpit missing observations:** missing local weather observations remain unknown rather than being converted to zero or clear skies, in the briefing and in the cloud effects; a missing temperature drops the whole local weather record, including its wind and condition.
@@ -9554,7 +9553,7 @@ when their footprints touch or contain one another, never across a seam toleranc
outside this change.
- `scripts/qa-form-fields.mjs` exercises native selections, number validity,
calibration commit/cancel and stale-camera/disposal guards against an installed
controller with fixture ports, plus default/Cyber and narrow translated layouts.
controller with fixture ports, plus default and narrow translated layouts.
## Docker health reporting
+1 -1
View File
@@ -134,7 +134,7 @@ probability of about 255 in 256 (many of them already fail as base64url).
| 13 | thing | LEN | none | sub-message, see thing views |
| 14 | `style` | enum | `normal` | normal, retro, surveillance, thermal, anime, noir, snow (retired) |
| 15 | `mapStack` | enum | `photoreal` | photoreal, bing-aerial, bing-labels, esri-imagery, osm |
| 16 | `hudVariant` | enum | style | tactical, operator (retired), minimal, cyber |
| 16 | `hudVariant` | enum | style | tactical, operator (retired), minimal, cyber (Tactical + Sonar) |
| 17 | `bloomIntensity` | uint | style | |
| 18 | `bloomVersion` | uint | 2 | |
| 19 | `sharpenIntensity` | uint | style | |
+2 -3
View File
@@ -92,8 +92,7 @@ a functional component would not render again.
Controls share one skin, so every panel reads the same. Every scrolling
surface carries the kit's `.ui-scroll`, which draws the thin
themed scrollbar from `--scroll-thumb` and `--scroll-track`; the Cyber theme
sets those two tokens, and Cockpit's HUD windows keep their accent tint. A
themed scrollbar from `--scroll-thumb` and `--scroll-track`, and Cockpit's HUD windows keep their accent tint. A
surface without it would draw the platform's light scrollbar, because the
page declares no dark `color-scheme`. Selects and number fields are
`.gev-field`, which draws its own chevron in place of the platform's arrow
@@ -361,7 +360,7 @@ a feature supplying only its accent.
- Panels lifted out of a view keep its verbatim markup in
`src/ui/views/panels/`, which Prettier leaves alone like the views.
- 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
widths, in the default theme, 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
+9 -11
View File
@@ -1,9 +1,8 @@
# Panel surface contract
`src/ui/styles/panel-surfaces.css` supplies an opt-in visual surface for new
panels. It uses the application's default color, font, border and radius tokens;
Cyber supplies its existing red/slate palette, monospace typography and shaped
frame. This is CSS shared by the existing panel system, not a panel registry or
panels. It uses the application's default color, font, border and radius tokens.
This is CSS shared by the existing panel system, not a panel registry or
a controller. A panel ID does not need a new theme selector.
## Markup
@@ -57,13 +56,12 @@ fit when those contents should instead scroll.
| Mount | Shared contract | Owner responsibilities |
| ------------------------------------- | --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Direct child of `#left-panel-stack` | An owner with a direct `[data-panel-surface]` child receives relative positioning and allocated height; inner surface/body skin | Add the wrapper shown above, use the existing layout/disclosure owners, and retain left-rail focus/auto-collapse rules. |
| Direct child of `#right-context-rail` | The same hooks with right-rail allocation and intrinsic measurement | Keep `data-rail-scroller` on the body so measurement preserves its scroll position. Respect Cyber's one-expanded-panel policy. |
| Direct child of `#right-context-rail` | The same hooks with right-rail allocation and intrinsic measurement | Keep `data-rail-scroller` on the body so measurement preserves its scroll position. |
| Surface inside `#command-dock` | Surface, controls, popup decoration and inherited dock concealment | Supply geometry, stacking, disclosure, pin behavior if wanted, safe viewport bounds and dismissal. This CSS does not extend the existing Location/Visual Presets tray stack manager to arbitrary panels. |
| `dialog[data-panel-surface]` | The same surface/body skin; a closed dialog remains hidden | Set width/max-height, use `showModal()` or `show()` and `close()`, and own labels, initial/return focus and dismissal. Do not put `panel-collapsible` on a dialog. |
For rails, `--panel-expanded-width` and `--panel-collapsed-width` customize
the desired widths within the rail; otherwise Cyber uses its existing left,
right and collapsed panel widths. `--left-panel-allocated-height` and
the desired widths within the rail. `--left-panel-allocated-height` and
`--right-panel-allocated-height` belong
to the existing layout owner, not to individual panels. The surface must be
the wrapper's first non-glow child because left-rail intrinsic measurement
@@ -121,9 +119,9 @@ dismiss open popups/dialogs and restore focus before removing a dynamic panel.
## Decoration, popups and visibility
The shared surface reserves `::before` for its non-interactive background. The
Cyber frame clips this pseudo-element only; the surface stays unclipped with
visible overflow. This follows the existing Display and Global Context pattern.
The shared surface reserves `::before` for its non-interactive background; the
surface stays unclipped with visible overflow. This follows the existing
Display and Global Context pattern.
Putting the shape on an interactive ancestor clips all descendant popups even
if their `z-index` is high. A scrolling body also clips descendants by design,
so outward popups must be siblings of the body, or use an explicitly owned
@@ -148,8 +146,8 @@ visible.
## Check an addition
Use the real application with the default and Cyber themes. Check open,
collapsed, hidden, disabled/error, theme round trips, clean UI/recording and
Use the real application with the Tactical and Minimal HUD layouts. Check open,
collapsed, hidden, disabled/error, layout round trips, clean UI/recording and
the intended Cockpit behavior. Exercise keyboard focus, Escape, pointer input,
the last scrolling item, resize without reload and any pin/unpin controls.
For an outward popup, test visible pixels and pointer hit-testing outside the
-1
View File
@@ -65,7 +65,6 @@ The `many` form is the `other` text with «de» after the number: «{count} de c
| detection overlay | superposición de detección |
| pin (Draw tool) | marcador |
| Bloom / Glow (visual effect) | resplandor |
| Cyber (HUD layout, effect) | Ciber |
| heading, course / altitude / ground speed | rumbo / altitud / velocidad respecto al suelo (short: VEL. SUELO) |
| HDG / BRG / CRS / FOV / DEST / SPD / RANGE | HDG / BRG / CRS / FOV / DEST / SPD / RANGE (unchanged) |
| PREV / NEXT | ANT. / SIG. |
-1
View File
@@ -82,7 +82,6 @@ The `many` form is the `other` text with « de » (« d' » before a vowel) afte
| Recent Imagery / box | imagerie récente / zone |
| Daily overview / overview (Recent Imagery VIIRS product) | vue quotidienne (one name for the product, not « vue d'ensemble ») |
| pin (Draw tool) / pin (Recent Imagery) | épingle / épingler |
| Cyber (HUD layout, effect) | Cyber |
| heading / course (ground track) / altitude / ground speed | cap / route / altitude / vitesse sol |
| HDG / BRG / CRS / FOV / DEST / SPD / ALT | unchanged |
| RANGE / PITCH / HGT (CCTV calibration chips) | PORTÉE / INCL. / HAUT. |
+1 -1
View File
@@ -82,7 +82,7 @@ The `many` form is the `other` text with «di» after the number when a noun fol
| briefing / panel / dock | briefing / pannello / dock |
| cockpit | cockpit |
| preset / visual preset | preset / preset visivo |
| Tactical / Minimal / Cyber | Tattico / Minimale / Cyber |
| Tactical / Minimal | Tattico / Minimale |
| Scope (circular viewport mask) / keyhole | scope / foro |
| feather / fade | sfumatura / dissolvenza |
| detection overlay | overlay di rilevamento |
+1 -1
View File
@@ -61,7 +61,7 @@ Translation source: abiyeenzo (#913).
| scene / shot | シーン / ショット |
| briefing / panel / dock | ブリーフィング / パネル / ドック |
| preset / visual preset | プリセット / ビジュアルプリセット |
| Tactical / Minimal / Cyber | タクティカル / ミニマル / サイバー |
| Tactical / Minimal | タクティカル / ミニマル |
| Scope (circular viewport mask) / keyhole | スコープ / キーホール |
| Clean UI | クリーンUI |
| cockpit | コックピット |
-1
View File
@@ -91,7 +91,6 @@ The `many` form is the `other` text with «de» after the number: «{count} de c
| feather / fade | suavização / esmaecimento |
| detection overlay | sobreposição de detecção |
| pin (Draw tool) / box (Recent Imagery) | marcador / área |
| Cyber (HUD layout, effect) | Ciber |
| heading / course / altitude / ground speed | rumo / curso (a ship's course: rumo) / altitude / velocidade solo (VELOC. SOLO) |
| map heading / bearing (compass, north up) | orientação (do mapa) |
| HDG / BRG / CRS / FOV / DEST / SPD / RANGE | HDG / BRG / CRS / FOV / DEST / SPD / RANGE (unchanged) |
+1 -1
View File
@@ -43,7 +43,7 @@ Translation sources: abiyeenzo (#914) and EDIT-Aeterna (#979).
| briefing / panel / dock | 简报 / 面板 / 停靠栏 |
| preset / visual preset | 预设 / 视觉预设 |
| Display / HUD layout | 显示 / HUD 布局 |
| Tactical / Minimal / Cyber | 战术 / 精简 / 赛博 |
| Tactical / Minimal | 战术 / 精简 |
| Scope (circular viewport mask) / keyhole | 视域 |
| Clean UI | 纯净界面 |
| cockpit | 座舱 |
+2 -1
View File
@@ -227,6 +227,7 @@
"src/ui/panelMeasurement.js",
"src/ui/panelRailGeometry.js",
"src/ui/panelRails.test.mjs",
"src/ui/hudSonarStyle.test.mjs",
"src/panelStackLayout.js",
"src/ui/applicationShortcuts.js",
"src/ui/styleParameters.js",
@@ -1476,7 +1477,7 @@
"src/overlays/worldOverlayDraw.test.mjs",
"src/sources/rateLimit.js",
"src/ui/layerNames.js",
"src/ui/styles/cyber.css",
"src/ui/styles/sonar.css",
"src/voice/layerManifest.js",
"src/worldFocus.js",
"src/worldFocus.test.mjs",
-5
View File
@@ -836,7 +836,6 @@
"exports": ["./ui/layout"],
"modules": [
"src/ui/panelRails.js",
"src/ui/displayPanelScroll.js",
"src/ui/leftPanelRail.js",
"src/ui/rightPanelRail.js",
"src/ui/panelMeasurement.js",
@@ -1211,7 +1210,6 @@
"src/ui/cockpitController.js",
"src/data/followed.js",
"src/ui/cockpitDisplayPortal.js",
"src/ui/displayPanelScroll.js",
"src/ui/cockpitInput.js",
"src/ui/cockpitInstruments.js",
"src/cockpitSubjectProviders.js",
@@ -1434,7 +1432,6 @@
"src/ui/cockpitContext.js",
"src/ui/cockpitController.js",
"src/ui/cockpitDisplayPortal.js",
"src/ui/displayPanelScroll.js",
"src/ui/cockpitInput.js",
"src/ui/cockpitInstruments.js",
"src/cockpitSubjectProviders.js",
@@ -4750,7 +4747,6 @@
"src/ui/cockpitContext.js",
"src/ui/cockpitController.js",
"src/ui/cockpitDisplayPortal.js",
"src/ui/displayPanelScroll.js",
"src/ui/cockpitInput.js",
"src/ui/cockpitInstruments.js",
"src/cockpitSubjectProviders.js",
@@ -6698,7 +6694,6 @@
"ui-panel-chrome": {
"exports": ["./ui/panel-chrome"],
"modules": [
"src/ui/displayPanelScroll.js",
"src/ui/radioPanelPlacement.js",
"src/panelStackLayout.js",
"src/ui/leftPanelRail.js",
-92
View File
@@ -1998,98 +1998,6 @@ try {
}),
);
// Cyber relocates its collapsed briefing header into the expanded utility
// lane. Exercise actual height changes without reload and measure both cards.
await page.evaluate(() => {
const manager = window.__godsEyeView.styleManager;
manager._setHudVariant('cyber');
manager.hud.setMode('on');
manager._setCockpitDisclosure('display', false);
manager._setCockpitDisclosure('radio', true);
});
const cyberRadioOrder = await page.evaluate(() => {
const manager = window.__godsEyeView.styleManager;
manager.cockpitView.syncSignalLayout();
const display = document
.getElementById('cockpit-display-toggle-btn')
.closest('.cockpit-utility-control');
const radio = document
.getElementById('cockpit-radio-toggle-btn')
.closest('.cockpit-utility-control');
const displayRect = display.getBoundingClientRect();
const radioRect = radio.getBoundingClientRect();
return {
display: displayRect.toJSON(),
radio: radioRect.toJSON(),
displayExpanded: display.classList.contains('is-expanded'),
radioExpanded: radio.classList.contains('is-expanded'),
gap: radioRect.top - displayRect.bottom,
};
});
check(
'Cyber expanding Radio preserves the authored Display-then-Radio order',
!cyberRadioOrder.displayExpanded
&& cyberRadioOrder.radioExpanded
&& cyberRadioOrder.display.height > 0
&& cyberRadioOrder.radio.height > 0
&& cyberRadioOrder.gap >= 7,
JSON.stringify(cyberRadioOrder),
);
await page.screenshot({ path: path.join(shotsDir, 'cyber-radio-order.png') });
await page.evaluate(() => {
const manager = window.__godsEyeView.styleManager;
manager._setCockpitDisclosure('radio', false);
manager._setCockpitDisclosure('display', true);
});
const cyberStyleStates = await page.evaluate(() => {
const manager = window.__godsEyeView.styleManager;
const states = [];
for (const style of ['normal', 'surveillance', 'thermal', 'retro']) {
document.querySelector(`.style-btn[data-style="${style}"]`).click();
states.push({
requestedStyle: style,
activeStyle: manager.activeStyle,
hud: manager.hud.getVariant(),
theme: document.documentElement.dataset.uiTheme,
selector: document.getElementById('hud-layout-select').value,
savedHud: manager.getVisualState().hud.variant,
});
}
return states;
});
check('Cockpit visual-style controls retain Cyber HUD, selector, shell and saved layout',
cyberStyleStates.every(state => state.activeStyle === state.requestedStyle
&& state.hud === 'cyber' && state.theme === 'cyber'
&& state.selector === 'cyber' && state.savedHud === 'cyber'),
JSON.stringify(cyberStyleStates));
for (const height of [987, 720, 640, 900]) {
await page.setViewport({ width: 1440, height, deviceScaleFactor: 1 });
await new Promise((resolve) => setTimeout(resolve, 400));
const geometry = await page.evaluate(() => {
const signal = document.getElementById('cockpit-signal-stream');
const utility = document.getElementById('cockpit-utility-controls');
const expanded = utility.querySelector('.cockpit-utility-control.is-expanded');
const s = signal.getBoundingClientRect();
const u = expanded.getBoundingClientRect();
const toggle = document.getElementById('cockpit-signal-toggle');
const t = toggle.getBoundingClientRect();
const hit = document.elementFromPoint(t.x + t.width / 2, t.y + t.height / 2);
return { height: innerHeight, theme: document.documentElement.dataset.uiTheme,
collapsed: signal.dataset.collapsed, signal: s.toJSON(), utility: u.toJSON(),
reachable: Boolean(hit && toggle.contains(hit)),
contained: u.bottom <= s.top - 7 && s.bottom < innerHeight,
};
});
check(`Cyber collapsed Live Signals remains visible and reachable after resize to ${height}px`,
geometry.theme === 'cyber' && geometry.collapsed === 'true'
&& geometry.signal.width > 0 && geometry.signal.height > 0
&& geometry.reachable && geometry.contained, JSON.stringify(geometry));
if (height === 640 || height === 900) {
await page.screenshot({ path: path.join(shotsDir, `cyber-resize-${height}.png`) });
}
}
await page.evaluate(() => window.__godsEyeView.styleManager._setHudVariant('tactical'));
const signalTransition = await page.evaluate(async () => {
const manager = window.__godsEyeView.styleManager;
const cockpit = manager.cockpitView;
-10
View File
@@ -314,17 +314,7 @@ try {
}
await page.evaluate(() => {
document.documentElement.lang = 'en';
document.documentElement.dataset.uiTheme = 'cyber';
});
const cyber = await page.$eval(
'#scene-select',
(node) => getComputedStyle(node).backgroundColor,
);
check(
'Cyber keeps its native field theme',
cyber === 'rgba(26, 35, 39, 0.96)',
cyber,
);
await begin('heading');
await page.evaluate(() => {
const owner = window.__godsEyeView.styleManager._cctvControls;
+1 -1
View File
@@ -345,7 +345,7 @@ try {
(await readScope()).feather === 2,
);
await page.click('#scope-toggle');
for (const layout of ['minimal', 'cyber', 'tactical']) {
for (const layout of ['minimal', 'tactical']) {
await page.select('#hud-layout-select', layout);
const state = await readScope();
check(
-29
View File
@@ -276,35 +276,6 @@ try {
.every((group) => group.scrollWidth <= group.clientWidth + 1),
),
);
const cyber = await page.evaluate(() => {
const root = document.documentElement;
const previous = root.getAttribute('data-ui-theme');
root.setAttribute('data-ui-theme', 'cyber');
const selected = [
...document.querySelectorAll('.gev-segment[aria-checked="true"]'),
];
// Check the final theme colors, independent of software-GL frame cadence.
for (const button of selected)
for (const animation of button.getAnimations()) animation.finish();
const backgrounds = selected.map(
(button) => getComputedStyle(button).backgroundColor,
);
const radii = [...document.querySelectorAll('.gev-segmented')].map(
(group) => getComputedStyle(group).borderRadius,
);
const consistent =
selected.length === 6 &&
backgrounds.every((color) => color === backgrounds[0]) &&
radii.every((radius) => radius === '1px');
if (previous === null) root.removeAttribute('data-ui-theme');
else root.setAttribute('data-ui-theme', previous);
return { consistent, count: selected.length, backgrounds, radii };
});
check(
'Cyber theme styles every selected segment consistently',
cyber.consistent,
JSON.stringify(cyber),
);
await page.evaluate(async () => {
const { dataManager, styleManager } = window.__godsEyeView;
await dataManager.setEnabled('recent-imagery', true);
+1 -1
View File
@@ -194,7 +194,7 @@ try {
result,
);
}
for (const theme of ['tactical', 'cyber']) {
for (const theme of ['tactical', 'minimal']) {
await page.evaluate(
(theme) => window.__godsEyeView.styleManager._setHudVariant(theme),
theme,
+2 -2
View File
@@ -58,8 +58,8 @@ function realtimeDirectives(
'For visual filter requests, call set_visual_style with one of the allowed style IDs.',
'SHIPS vs STYLES: "vessels" is easily heard as "visuals". "Show me vessels", "turn on vessels", "the vessels", "visuals" or "vestibules" said WITHOUT a style name means the ships layer: set_layer_visibility{layerId:"ais-live-vessels"}, exactly as "ships" or "boats" does. Call set_visual_style only when the user names a style (retro/CRT, surveillance/night vision, thermal, anime, noir, normal) or says filter, effect or look. Never turn on a different data layer (such as fires) for a ships request.',
'Disambiguation table — basemap vs layer vs style: basemap switching requires an explicit stack name — "Bing aerial" means set_map_stack bing-aerial, "aerial with labels" means bing-labels, "OSM"/"road map" means osm, "Esri"/"Esri imagery" means esri-imagery, "Google 3D"/"photorealistic" means photoreal. Any other mention of "satellite" or "satellites" means the satellites DATA LAYER via set_layer_visibility, never a basemap — except "recent/latest satellite imagery" (the recent-imagery layer) and "weather satellite"/clouds (weather-satellite). "surveillance"/"night vision"/"thermal" are visual STYLES via set_visual_style.',
'HUD requests ("hud on/off", "switch to minimal/tactical/cyber layout") use set_hud. Detection requests ("detection on", "dense mode", "balanced mode", "sparse mode", "set density to 25", "use weighted allocation") use set_detection. Density snaps to 0/25/50/75/100 and derives Sparse/Balanced/Dense; panoptic is a legacy alias for Dense.',
'Cyber sonar requests use set_cyber_sonar: enabled, rings, rangePct, intensityPct (Power), opacityPct, sectorDeg. For settings questions read get_current_view_state.controls.hud.sonar. Sonar is not detection. Do not silently switch themes, reveal the HUD or enable sonar when changing a slider. If the user explicitly requests Cyber plus sonar settings, call set_hud first, wait for success, then set_cyber_sonar. Confirm returned values; mapSweepActive and contactSweepActive distinguish saved settings from active map effects, including in Cockpit or reduced motion. Do not claim visible contacts solely because enabled is true.',
'HUD requests ("hud on/off", "switch to minimal/tactical layout") use set_hud. Detection requests ("detection on", "dense mode", "balanced mode", "sparse mode", "set density to 25", "use weighted allocation") use set_detection. Density snaps to 0/25/50/75/100 and derives Sparse/Balanced/Dense; panoptic is a legacy alias for Dense.',
'Sonar is a visual style over any HUD layout. Sonar requests (including "cyber mode", which was replaced by sonar) use set_cyber_sonar: enabled, rings, rangePct, intensityPct (Power), opacityPct, sectorDeg. For settings questions read get_current_view_state.controls.hud.sonar. Sonar is not detection. Do not silently switch layouts, reveal the HUD or enable sonar when changing a slider. Confirm returned values; mapSweepActive and contactSweepActive distinguish saved settings from active map effects, including in Cockpit or reduced motion. Do not claim visible contacts solely because enabled is true.',
'Bloom/sharpen requests use set_post_processing. Scene requests ("play orbital watch", "stop the scene", "what scenes are there") use control_scene. CCTV camera requests ("next camera", "nearest camera", "select the Congress camera", "show coverage") use control_cctv — the CCTV layer must be enabled first.',
'Radio playback requests use control_radio. "Turn on/start the radio" means action=play; action=enable only reveals Radio markers and must be reserved for explicit "show/enable the Radio layer/markers" requests. After a prepared playback result, briefly confirm any other completed actions and say "Turning on the radio"—never claim it is already playing. The client keeps Radio muted until playback is verified, then closes voice before restoring Radio volume. Examples: "play news near Austin" → select category=news locationId=austin; "play US news" → select category=news country=US; "Radio volume 30" → volume; pause/resume/stop/next/previous use the matching action. Radio selection never moves the camera.',
'"Track/follow <something specific>" (a callsign, ship name, satellite name) uses track_entity. "Take me to the biggest fire" uses track_entity with query "biggest fire" (the fires layer must be enabled). Bare "orbit" means camera orbit of the current landmark. "Stop following/tracking" uses stop_tracking.',
+1 -1
View File
@@ -225,7 +225,7 @@ export const ACTION_DESCRIPTIONS = {
},
set_cyber_sonar: {
description:
'Adjust Cyber-only sonar controls. Requires the Cyber HUD layout; never switches layout or HUD visibility. Omitted fields stay unchanged. Returns actual settings and separate map/contact sweep activity. A saved setting does not mean the effect is active.',
'Adjust the Sonar visual style, which works over any HUD layout. Never switches layout or HUD visibility. Omitted fields stay unchanged. Returns actual settings and separate map/contact sweep activity. A saved setting does not mean the effect is active.',
$position: 1,
parameters: {
properties: {
+3 -3
View File
@@ -595,7 +595,7 @@ test('Cockpit Display portal retains both scroll owners across round trips', ()
const portal = CockpitDisplayPortal.toString();
assert.match(
portal,
/this\.standardScrollTop =\s*displayPanelScroller\(standardPanel\)\?\.scrollTop \|\| 0/,
/this\.standardScrollTop = standardPanel\?\.scrollTop \|\| 0/,
);
assert.match(
portal,
@@ -603,7 +603,7 @@ test('Cockpit Display portal retains both scroll owners across round trips', ()
);
assert.match(
portal,
/if \(!this\.active\)[\s\S]*?this\.standardScrollTop =\s*displayPanelScroller\(standardPanel\)\.scrollTop/,
/if \(!this\.active\)[\s\S]*?this\.standardScrollTop = standardPanel\.scrollTop/,
);
assert.match(
portal,
@@ -611,7 +611,7 @@ test('Cockpit Display portal retains both scroll owners across round trips', ()
);
assert.match(
portal,
/this\.cockpitPanel\.scrollTop = this\.cockpitScrollTop[\s\S]*?displayPanelScroller\(this\.standardPanel\)\.scrollTop =\s*this\.standardScrollTop/,
/this\.cockpitPanel\.scrollTop = this\.cockpitScrollTop[\s\S]*?this\.standardPanel\.scrollTop = this\.standardScrollTop/,
);
});
+1 -44
View File
@@ -17,11 +17,6 @@
* @param {number} [input.signalGap] Clearance above the briefing card.
* @param {number} [input.minTopFloor] Absolute ceiling for the strip, in px.
* @param {number} [input.minTopRatio] Viewport-relative ceiling, 0..1.
* @param {boolean} [input.signalCollapsed] Whether the briefing card is collapsed.
* @param {boolean} [input.utilityExpanded] Whether Display or Radio is expanded.
* @param {number} [input.bottomInset] Reserved viewport space below an expanded panel.
* @param {number} [input.signalHeight] Collapsed briefing header reserved below the utility.
* @param {boolean} [input.reserveViewportLane] Theme relocates the briefing below the expanded utility.
* @returns {{ top: number, maxHeight: number }}
*/
export function resolveCockpitUtilityAnchor({
@@ -34,29 +29,13 @@ export function resolveCockpitUtilityAnchor({
signalGap = 8,
minTopFloor = 96,
minTopRatio = 0.12,
signalCollapsed = false,
utilityExpanded = false,
bottomInset = 80,
signalHeight = 0,
reserveViewportLane = false,
}) {
const viewport = Math.max(0, Number(viewportHeight) || 0);
const minTop = Math.max(minTopFloor, viewport * minTopRatio);
const anchoredTop = Math.max(minTop, (Number(recBottom) || 0) + recGap);
const strip = Math.max(0, Number(stripHeight) || 0);
const signal = Number(signalTop);
const expandedLaneBottom = Math.max(
0,
viewport -
Math.max(0, Number(bottomInset) || 0) -
Math.max(0, Number(signalHeight) || 0),
);
const lowerBound =
reserveViewportLane && signalCollapsed && utilityExpanded
? expandedLaneBottom
: Number.isFinite(signal)
? signal
: viewport;
const lowerBound = Number.isFinite(signal) ? signal : viewport;
const clearedTop = lowerBound - signalGap - strip;
const top = Math.max(minTop, Math.min(anchoredTop, clearedTop));
const floor = Math.max(0, Number(collapsedHeight) || 0) || 50;
@@ -100,25 +79,3 @@ export function resolveCockpitUtilityLayout({
),
};
}
/** Shared Cyber panel slot, with footer controls above the lower frame (83vh). */
export function resolveCyberCockpitPanelLane({
viewportHeight,
top,
launcherHeight = 60,
signalHeight = 44,
contactHeight = 64,
}) {
const gap = 8;
const footerHeight = Math.max(
contactHeight + gap,
launcherHeight + signalHeight + gap * 2,
);
const bottom = viewportHeight * 0.82;
const panelHeight = Math.max(120, bottom - top - footerHeight);
return {
panelHeight,
utilityHeight: panelHeight + gap + launcherHeight,
signalTop: top + panelHeight + launcherHeight + gap * 2,
};
}
+1 -71
View File
@@ -4,58 +4,11 @@ import assert from 'node:assert/strict';
import {
resolveCockpitUtilityAnchor,
resolveCockpitUtilityLayout,
resolveCyberCockpitPanelLane,
} from './cockpitUtilityLayout.js';
// 1512x790, the height the strip used to collide with the briefing card at.
const desktop = { viewportHeight: 790, stripHeight: 107, collapsedHeight: 50 };
test('Cyber shared panel slot reserves both footer lanes above the decorative frame', () => {
for (const viewportHeight of [600, 673, 713, 986, 1376]) {
for (const signalHeight of [44, 76]) {
for (const contactHeight of [44, 84, 120]) {
const top = Math.max(164, Math.min(204, viewportHeight * 0.19));
const lane = resolveCyberCockpitPanelLane({ viewportHeight, top, signalHeight, contactHeight });
assert.ok(lane.panelHeight >= 120);
assert.ok(top + lane.panelHeight + 8 + contactHeight <= viewportHeight * 0.82 + .01);
assert.ok(lane.signalTop + signalHeight <= viewportHeight * 0.82 + .01);
assert.equal(lane.signalTop, top + lane.utilityHeight + 8);
}
}
}
});
test('Cyber keeps the Data Layers top while reserving briefing clearance', () => {
for (const viewportHeight of [673, 713, 986, 1376]) {
const leftTop = Math.max(164, Math.min(204, viewportHeight * 0.19));
const collapsed = resolveCockpitUtilityAnchor({
viewportHeight, stripHeight: 128, collapsedHeight: 60, recBottom: 0,
signalTop: leftTop + 128 + 28, minTopFloor: leftTop, minTopRatio: 0,
});
assert.equal(collapsed.top, leftTop);
assert.ok(collapsed.maxHeight >= 128);
const expanded = resolveCockpitUtilityAnchor({
viewportHeight, stripHeight: 700, collapsedHeight: 60, recBottom: 0,
signalTop: 255, minTopFloor: leftTop, minTopRatio: 0,
signalCollapsed: true, utilityExpanded: true, reserveViewportLane: true, signalHeight: 44,
});
assert.equal(expanded.top, leftTop);
assert.equal(expanded.top + expanded.maxHeight + 8 + 44 + 80, viewportHeight);
}
});
test('expanded utilities reserve the visible collapsed briefing header at every desktop height', () => {
for (const viewportHeight of [640, 720, 987, 1376]) {
for (const signalHeight of [48, 76, 100]) {
const { top, maxHeight } = resolveCockpitUtilityAnchor({
...desktop, viewportHeight, recBottom: 0, signalTop: 255,
signalCollapsed: true, utilityExpanded: true, signalHeight, reserveViewportLane: true,
});
assert.equal(top + maxHeight + 8, viewportHeight - 80 - signalHeight);
}
}
});
test('the strip hangs 12px under the REC readout when the briefing card leaves room', () => {
const { top } = resolveCockpitUtilityAnchor({ ...desktop, recBottom: 148.1, signalTop: 420 });
assert.equal(Number(top.toFixed(1)), 160.1);
@@ -101,34 +54,11 @@ test('a missing REC readout leaves the strip on the viewport ceiling', () => {
assert.equal(top, 96);
});
test('an expanded utility claims the vertical lane released by a collapsed briefing', () => {
const { top, maxHeight } = resolveCockpitUtilityAnchor({
...desktop,
recBottom: 148.1,
signalTop: 265.4,
signalCollapsed: true,
utilityExpanded: true,
reserveViewportLane: true,
});
assert.equal(Number(top.toFixed(1)), 160.1);
assert.equal(Number(maxHeight.toFixed(1)), 541.9);
});
test('non-relocating themes preserve the visible briefing boundary even when collapsed', () => {
test('the visible briefing card bounds the utility strip, collapsed or not', () => {
const { top, maxHeight } = resolveCockpitUtilityAnchor({
...desktop, recBottom: 148.1, signalTop: 265.4,
signalCollapsed: true, utilityExpanded: true,
});
assert.equal(Number((top + maxHeight).toFixed(1)), 257.4);
});
test('a collapsed briefing still bounds the utility strip until a panel expands', () => {
const { maxHeight } = resolveCockpitUtilityAnchor({
...desktop,
recBottom: 148.1,
signalTop: 265.4,
signalCollapsed: true,
});
assert.equal(Number(maxHeight.toFixed(1)), 107);
});
+1 -1
View File
@@ -220,7 +220,7 @@ test('Context reads as one segmented control with legible type and no halo', ()
// 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",
":root #global-context-panel:not(.collapsed) .panel-title",
),
'',
);
+8 -6
View File
@@ -527,10 +527,15 @@ export function cyberSonarLabelIntensity(
return labelDimFactor + (1 - labelDimFactor) * normalized;
}
/**
* Sonar is an opt-in visual style over any HUD layout: it is on only after
* the Display panel's Sonar toggle, a voice request or a legacy Cyber link
* turns it on.
*/
export function isCyberSonarEnabled(
root = globalThis.document?.documentElement,
) {
return root?.dataset?.cyberSonar !== 'off';
return root?.dataset?.cyberSonar === 'on';
}
export function setCyberSonarEnabled(
@@ -539,9 +544,7 @@ export function setCyberSonarEnabled(
) {
if (!root?.dataset) return false;
root.dataset.cyberSonar = enabled ? 'on' : 'off';
if (root.dataset.uiTheme === 'cyber') {
applyCyberSonarThemePhase(root, enabled);
}
applyCyberSonarThemePhase(root, enabled);
return enabled;
}
@@ -566,7 +569,6 @@ export function isCyberSonarActive({
globalThis.matchMedia?.('(prefers-reduced-motion: reduce)')?.matches ??
false;
return !!(
root?.dataset?.uiTheme === 'cyber' &&
isCyberSonarEnabled(root) &&
(hudActive ?? hud?.classList?.contains?.('active')) &&
!body?.classList?.contains?.('cockpit-mode') &&
@@ -583,7 +585,7 @@ export function isCyberMapThemeActive({
if (hud === undefined)
hud = globalThis.document?.getElementById?.('intel-hud');
return !!(
root?.dataset?.uiTheme === 'cyber' &&
isCyberSonarEnabled(root) &&
(hudActive ?? hud?.classList?.contains?.('active')) &&
!body?.classList?.contains?.('cockpit-mode')
);
+13 -9
View File
@@ -39,7 +39,7 @@ test('production-transformed sonar defaults retain the document method receiver'
const previous = Object.getOwnPropertyDescriptor(globalThis, 'document');
const hud = { classList: { contains: (name) => name === 'active' } };
const document = {
documentElement: { dataset: { uiTheme: 'cyber' } },
documentElement: { dataset: { cyberSonar: 'on' } },
body: { classList: { contains: () => false } },
getElementById(id) {
assert.equal(this, document);
@@ -57,7 +57,7 @@ test('production-transformed sonar defaults retain the document method receiver'
assert.ok(
Number.isFinite(compiled.createCyberSonarSampler(800, 600).at(400, 300)),
);
document.documentElement.dataset.uiTheme = 'tactical';
document.documentElement.dataset.cyberSonar = 'off';
assert.equal(compiled.isCyberSonarActive(), false);
assert.equal(compiled.isCyberMapThemeActive(), false);
} finally {
@@ -139,8 +139,8 @@ test('the sweep brightens contacts inside its sector and dims the remainder', ()
);
});
test('the sonar activates only for a visible Cyber map HUD with motion enabled', () => {
const root = { dataset: { uiTheme: 'cyber' } };
test('the sonar activates only while on, over a visible map HUD with motion enabled', () => {
const root = { dataset: { cyberSonar: 'on' } };
const classes = (...values) => ({
contains: (value) => values.includes(value),
});
@@ -220,14 +220,18 @@ test('the opacity setting controls every contact floor and preserves brighter la
);
});
test('the sonar control defaults on and records explicit operator state', () => {
test('the sonar control defaults off and records explicit operator state', () => {
const root = { dataset: {} };
assert.equal(isCyberSonarEnabled(root), false);
// The removed Cyber theme no longer turns it on.
root.dataset.uiTheme = 'cyber';
assert.equal(isCyberSonarEnabled(root), false);
assert.equal(setCyberSonarEnabled(true, root), true);
assert.equal(root.dataset.cyberSonar, 'on');
assert.equal(isCyberSonarEnabled(root), true);
assert.equal(setCyberSonarEnabled(false, root), false);
assert.equal(root.dataset.cyberSonar, 'off');
assert.equal(isCyberSonarEnabled(root), false);
assert.equal(setCyberSonarEnabled(true, root), true);
assert.equal(root.dataset.cyberSonar, 'on');
});
test('real Cesium points and billboards recover after repeated low/high opacity cycles', () => {
@@ -349,10 +353,10 @@ test('the sweep corrects delayed starts and reacquires restarted animations with
assert.doesNotThrow(() => syncCyberSonarAnimation({}));
});
test('the selected Cyber theme seeds and releases the compositor sweep phase', () => {
test('turning Sonar on seeds and releases the compositor sweep phase', () => {
const values = new Map();
const root = {
dataset: {},
dataset: { cyberSonar: 'on' },
style: {
setProperty: (name, value) => values.set(name, value),
removeProperty: (name) => values.delete(name),
+27 -16
View File
@@ -45,7 +45,7 @@ test('frame sampler matches reference without per-contact settings access', () =
});
test('removed CSS mode cannot disable GPU contacts; unsupported renderers fail closed', () => {
const root = { dataset: { uiTheme: 'cyber' }, style: { setProperty() {} } };
const root = { dataset: { cyberSonar: 'on' }, style: { setProperty() {} } };
const options = {
root,
body: { classList: { contains: () => false } },
@@ -97,7 +97,7 @@ function fixture({ modulation = true, lists = true } = {}) {
document: globalThis.document,
matchMedia: globalThis.matchMedia,
};
const root = { dataset: { uiTheme: 'cyber', cyberSonar: 'on' } };
const root = { dataset: { cyberSonar: 'on' } };
const status = { textContent: '' };
const state = { cockpit: false, reducedMotion: false };
globalThis.document = {
@@ -232,36 +232,47 @@ test('the sweep sets its sector on drawing ticks and at the cadence, and changes
f.tick(false);
assert.equal(f.sets.length, 4, 'a resize sets it at once');
assert.deepEqual(f.sets[3].center, { x: 300, y: 400 });
f.root.dataset.cyberSonar = 'off';
f.root.dataset.cyberSonarOpacity = '50';
f.tick(false);
assert.equal(f.sets[4].radius, 0, 'Sonar OFF rests every contact');
assert.equal(f.sets.length, 5, 'a setting change sets it at once');
assert.equal(
f.sets[4].floor,
0.5,
'while sweeping the floor is the opacity',
);
f.state.reducedMotion = true;
f.tick(false);
assert.equal(f.sets[5].radius, 0, 'reduced motion rests the sweep');
assert.equal(f.sets[5].floor, 0.5 + 0.5 * 0.46, 'at rest it lifts');
clock += 1000;
f.tick(true);
f.tick(false);
assert.equal(f.sets.length, 5, 'at rest only changes set it');
f.root.dataset.cyberSonarOpacity = '50';
f.tick(false);
assert.equal(f.sets.length, 6);
assert.equal(f.sets[5].floor, 0.5 + 0.5 * 0.46);
assert.equal(f.sets.length, 6, 'at rest only changes set it');
f.state.reducedMotion = false;
f.state.cockpit = true;
f.tick(false);
assert.equal(f.sets[6], null, 'out of the map theme it clears');
assert.equal(f.sets[6], null, 'out of the map it clears');
f.tick(true);
assert.equal(f.sets.length, 7, 'cleared once');
f.state.cockpit = false;
f.root.dataset.cyberSonar = 'off';
f.tick(false);
assert.equal(f.sets.length, 7, 'Sonar OFF leaves contacts untreated');
f.root.dataset.cyberSonar = 'on';
f.state.reducedMotion = true;
f.tick(false);
assert.equal(f.sets[7].radius, 0, 'reduced motion rests the sweep');
f.state.reducedMotion = false;
f.root.dataset.uiTheme = 'tactical';
assert.ok(f.sets[7]?.radius > 0, 'Sonar ON sweeps at once');
f.root.dataset.cyberSonar = 'off';
f.tick(false);
assert.equal(f.sets[8], null, 'another HUD style clears it');
assert.equal(f.sets[8], null, 'Sonar OFF clears it');
f.tick(true);
assert.equal(f.sets.length, 9);
// The removed Cyber theme attribute alone does nothing.
f.root.dataset.uiTheme = 'cyber';
f.tick(false);
assert.ok(f.sets[9]?.radius > 0, 'back in Cyber it sweeps at once');
assert.equal(f.sets.length, 9);
f.root.dataset.cyberSonar = 'on';
f.tick(false);
assert.ok(f.sets[9]?.radius > 0, 'back on, it sweeps at once');
assert.deepEqual(f.requests, [], 'the scene itself never asks for frames');
dispose();
assert.equal(f.sets[10], null, 'disposal clears it');
+1 -1
View File
@@ -53,7 +53,7 @@ test('the echo bracket pulses outward from the contact bracket and fades', (t) =
assert.ok(half.spreadPx > echo.spreadPx * 0.5);
assert.ok(half.spreadPx < echo.spreadPx);
assert.ok(half.band < STEPS && half.band >= 1);
// The bracket's own dimming (keyhole fade, Cyber sonar sweep) carries
// The bracket's own dimming (keyhole fade, sonar sweep) carries
// over, and the echo is never drawn brighter than its bracket: a bracket
// too dim for even one band draws no echo.
assert.equal(at(arrival, 0.25).band, 2);
+4 -4
View File
@@ -941,13 +941,13 @@ test('a Global Context echo bracket is drawn outside its contact bracket and dim
}
});
test('under the Cyber sonar sweep an echo is never brighter than its own bracket', () => {
test('under the sonar sweep an echo is never brighter than its own bracket', () => {
const env = installEnvironment();
// The cyber theme with its HUD open turns the contact sonar on; its sweep
// dims brackets it is not passing over.
// Sonar on with its HUD open turns the contact sonar on; its sweep dims
// brackets it is not passing over.
env.document.documentElement = {
// The lowest sweep floor, so dimmed brackets drop a whole alpha band.
dataset: { uiTheme: 'cyber', cyberSonarOpacity: '35' },
dataset: { cyberSonar: 'on', cyberSonarOpacity: '35' },
style: { setProperty() {}, removeProperty() {} },
};
const hud = env.document.createElement('div');
+3 -3
View File
@@ -998,9 +998,9 @@ test('the voice TOOL SCHEMA matches the pinned contract — the mission mapping
);
const hudLayout = legacyTools.find((tool) => tool.name === 'set_hud')
.parameters.properties.layout;
assert.deepEqual(hudLayout.enum, ['tactical', 'minimal', 'cyber']);
// Cyber deliberately adds one layout and Operator was retired; first-run
// missions still change no tools.
assert.deepEqual(hudLayout.enum, ['tactical', 'minimal']);
// Operator and then Cyber were retired; first-run missions still change
// no tools.
hudLayout.enum = ['tactical', 'operator', 'minimal'];
const cameraMotion = legacyTools.find((tool) => tool.name === 'move_camera')
.parameters.properties.motion;
+4 -10
View File
@@ -14,7 +14,7 @@ import { applicationServices } from './services/application.js';
* on independent fixed cadences.
*
* The HUD auto-activates when a military-style shader (NVG, FLIR, CRT) is
* selected and supports the layout variants: tactical, minimal, cyber.
* selected and supports the layout variants: tactical, minimal.
*
* Color theming is driven by the active shader mode via CSS custom properties.
*/
@@ -50,11 +50,7 @@ import {
provenanceLine,
provenanceTag,
} from './data/layerSnapshot.js';
import {
applyHudUiTheme,
DEFAULT_HUD_LAYOUT,
normalizeHudLayout,
} from './hudLayouts.js';
import { DEFAULT_HUD_LAYOUT, normalizeHudLayout } from './hudLayouts.js';
import {
formatNumber,
getLocale,
@@ -1168,14 +1164,12 @@ export class IntelHUD {
/**
* Switch the HUD layout variant. Falls back to `'tactical'` if the
* name is unrecognized. Cyber also applies a coordinated skin to the full
* application shell; leaving Cyber restores the standard shell tokens.
* @param {string} variantName - One of `'tactical'`, `'minimal'`, `'cyber'`.
* name is unrecognized.
* @param {string} variantName - One of `'tactical'`, `'minimal'`.
*/
setVariant(variantName) {
this._variant = normalizeHudLayout(variantName);
this._present({ variant: this._variant });
applyHudUiTheme(document.documentElement, this._variant);
}
/**
+8 -1
View File
@@ -1,2 +1,9 @@
/** Browser-free layout vocabulary shared by UI and server-side voice tools. */
export const HUD_LAYOUTS = Object.freeze(['tactical', 'minimal', 'cyber']);
export const HUD_LAYOUTS = Object.freeze(['tactical', 'minimal']);
/**
* Removed layouts that old share links, scenes and saved views may still
* name. Cyber became the Sonar visual style: it opens in Tactical with
* Sonar on.
*/
export const LEGACY_SONAR_HUD_LAYOUTS = Object.freeze(['cyber']);
+6 -43
View File
@@ -1,18 +1,10 @@
import { applyCyberSonarThemePhase } from './cyberSonar.js';
import { syncRadioPanelPlacement } from './ui/radioPanelPlacement.js';
import { HUD_LAYOUTS } from './hudLayoutPolicy.js';
export { HUD_LAYOUTS } from './hudLayoutPolicy.js';
import { HUD_LAYOUTS, LEGACY_SONAR_HUD_LAYOUTS } from './hudLayoutPolicy.js';
export { HUD_LAYOUTS, LEGACY_SONAR_HUD_LAYOUTS } from './hudLayoutPolicy.js';
/** Canonical HUD layouts shared by the UI, voice schema and HUD renderer. */
export const DEFAULT_HUD_LAYOUT = 'tactical';
/** Visual treatment applied only when an operator explicitly enters Cyber. */
export const CYBER_VISUAL_DEFAULTS = Object.freeze({
style: 'thermal',
ironbow: 0.42,
});
const HUD_LAYOUT_SET = new Set(HUD_LAYOUTS);
/** @param {unknown} value */
@@ -27,38 +19,9 @@ export function normalizeHudLayout(value) {
}
/**
* Resolve the opt-in visual defaults for an explicit layout transition.
* Restores and repeated Cyber selections return null so they never overwrite
* a shared link or a user's subsequent FLIR tuning.
* Whether a layout name is a removed layout that now means "Sonar on".
* @param {unknown} value
*/
export function cyberVisualDefaultsForHudTransition(
previousLayout,
nextLayout,
{ explicit = false } = {},
) {
if (!explicit) return null;
if (normalizeHudLayout(previousLayout) === 'cyber') return null;
if (normalizeHudLayout(nextLayout) !== 'cyber') return null;
return CYBER_VISUAL_DEFAULTS;
}
/**
* Keep the global shell skin derived from the selected HUD layout. The data
* attribute lives on <html> so theme tokens are available to every UI surface.
* @param {HTMLElement|{dataset?: Record<string, string>}|null|undefined} root
* @param {unknown} layout
* @returns {'cyber'|null}
*/
export function applyHudUiTheme(root, layout) {
if (!root?.dataset) return null;
if (normalizeHudLayout(layout) === 'cyber') {
root.dataset.uiTheme = 'cyber';
applyCyberSonarThemePhase(root, true);
syncRadioPanelPlacement(root.ownerDocument);
return 'cyber';
}
delete root.dataset.uiTheme;
applyCyberSonarThemePhase(root, false);
syncRadioPanelPlacement(root.ownerDocument);
return null;
export function isLegacySonarHudLayout(value) {
return LEGACY_SONAR_HUD_LAYOUTS.includes(String(value ?? '').toLowerCase());
}
+4 -5
View File
@@ -3276,7 +3276,7 @@
"Control cockpit": "التحكم في القمرة",
"Change visual style": "تغيير النمط البصري",
"Adjust HUD": "ضبط HUD",
"Adjust cyber sonar": "ضبط السونار السيبراني",
"Adjust sonar": "ضبط السونار",
"Adjust detection overlay": "ضبط طبقة الكشف",
"Change map stack": "تغيير حزمة الخرائط",
"Adjust post-processing": "ضبط المعالجة اللاحقة",
@@ -3366,9 +3366,8 @@
"SEEK ▶": "بحث ▶",
"SDR VOL": "صوت SDR",
"Local SDR volume": "مستوى صوت SDR المحلي",
"Cyber": "سيبراني",
"Sonar": "السونار",
"Cyber sonar contact scanner": "ماسح الأهداف بالسونار السيبراني",
"Sonar contact scanner": "ماسح الأهداف بالسونار",
"Rings": "الحلقات",
"Sonar ring count": "عدد حلقات السونار",
"Range": "المدى",
@@ -3376,7 +3375,7 @@
"Power": "القوة",
"Sonar intensity": "شدة السونار",
"Opacity": "العتامة",
"Cyber contact and label opacity": "عتامة الأهداف والتسميات في النمط السيبراني",
"Sonar contact and label opacity": "عتامة الأهداف والتسميات للسونار",
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "الحد الأدنى لعتامة نقاط الخريطة والأيقونات والنماذج والأقواس والتسميات بين مرّات السونار",
"Sector": "القطاع",
"Sonar sector width": "عرض قطاع السونار",
@@ -4569,7 +4568,7 @@
"Show settings": "عرض الإعدادات",
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "اختر نمطًا: عادي أو CRT أو NVG أو FLIR أو أنمي أو نوار (المفاتيح 1–6)",
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "اختر خريطة الأساس ضمن مصدر الخريطة: ‏Google 3D أو Bing أو Esri أو OpenStreetMap",
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "فعّل شاشة العرض الأمامية أو أوقفها هنا. يتيح التخطيط اختيار تكتيكي أو مبسّط أو سيبراني",
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "فعّل شاشة العرض الأمامية أو أوقفها هنا. يتيح التخطيط اختيار تكتيكي أو مبسّط",
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "يؤطر المنظار العرض داخل دائرة. ينعّم التنعيم حافة الدائرة، ويحدد التعتيم درجة قتامة المنطقة خارجها.",
"Clean UI hides the panels and readouts for a clear view": "تخفي الواجهة النظيفة اللوحات والقراءات لإظهار العرض بوضوح",
"Press search, then type part of a layer name or source": "اضغط على البحث، ثم اكتب جزءًا من اسم الطبقة أو مصدرها",
+4 -5
View File
@@ -2957,7 +2957,7 @@
"Control cockpit": "Cockpit steuern",
"Change visual style": "Visuellen Stil ändern",
"Adjust HUD": "HUD anpassen",
"Adjust cyber sonar": "Cyber-Sonar anpassen",
"Adjust sonar": "Sonar anpassen",
"Adjust detection overlay": "Erkennungs-Overlay anpassen",
"Change map stack": "Kartenstapel ändern",
"Adjust post-processing": "Nachbearbeitung anpassen",
@@ -3047,9 +3047,8 @@
"SEEK ▶": "SUCHEN ▶",
"SDR VOL": "SDR-LAUTST.",
"Local SDR volume": "Lautstärke des lokalen SDR",
"Cyber": "Cyber",
"Sonar": "Sonar",
"Cyber sonar contact scanner": "Cyber-Sonar-Kontaktscanner",
"Sonar contact scanner": "Sonar-Kontaktscanner",
"Rings": "Ringe",
"Sonar ring count": "Anzahl der Sonarringe",
"Range": "Reichweite",
@@ -3057,7 +3056,7 @@
"Power": "Leistung",
"Sonar intensity": "Sonarintensität",
"Opacity": "Deckkraft",
"Cyber contact and label opacity": "Deckkraft von Cyber-Kontakten und Beschriftungen",
"Sonar contact and label opacity": "Deckkraft von Sonar-Kontakten und Beschriftungen",
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Minimale Deckkraft für Kartenpunkte, Symbole, Modelle, Klammern und Beschriftungen zwischen Sonardurchläufen",
"Sector": "Sektor",
"Sonar sector width": "Breite des Sonarsektors",
@@ -4157,7 +4156,7 @@
"Show settings": "Einstellungen anzeigen",
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Wähle einen Stil: Normal, CRT, NVG, FLIR, Anime oder Noir (Tasten 1–6)",
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "Wähle unter Kartenquelle die Grundkarte: Google 3D, Bing, Esri oder OpenStreetMap",
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Schalte hier das HUD ein oder aus. Wähle unter Layout Taktisch, Minimal oder Cyber.",
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Schalte hier das HUD ein oder aus. Wähle unter Layout Taktisch oder Minimal.",
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "Der Scope rahmt die Ansicht kreisförmig ein. Weichzeichnung glättet den Rand, die Deckkraft bestimmt die Abdunklung außen.",
"Clean UI hides the panels and readouts for a clear view": "Reine Ansicht blendet Bedienfelder und Anzeigen aus",
"Press search, then type part of a layer name or source": "Drücke die Suchtaste und gib einen Teil des Ebenennamens oder der Quellenbezeichnung ein",
+4 -5
View File
@@ -1833,11 +1833,11 @@
"POSITIONED": "POSICIONADAS",
"SDR VOL": "VOL. SDR",
"LOCAL RTL-SDR": "RTL-SDR LOCAL",
"Cyber sonar contact scanner": "Escáner de contactos del sonar Ciber",
"Sonar contact scanner": "Escáner de contactos del sonar",
"Sonar ring count": "Número de anillos del sonar",
"Sonar ring range": "Alcance de los anillos del sonar",
"Sonar intensity": "Intensidad del sonar",
"Cyber contact and label opacity": "Opacidad de contactos y etiquetas Ciber",
"Sonar contact and label opacity": "Opacidad de contactos y etiquetas del sonar",
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Opacidad mínima de puntos, iconos, modelos, corchetes y etiquetas del mapa entre pasadas del sonar",
"Sonar sector width": "Ancho del sector del sonar",
"Rings": "Anillos",
@@ -1845,7 +1845,6 @@
"Power": "Potencia",
"Opacity": "Opacidad",
"Sector": "Sector",
"Cyber": "Ciber",
"Sonar": "Sonar",
"Turn Street Level on or off": "Activar o desactivar A pie de calle",
"Toggle straight-down and tilted map views": "Alternar entre la vista cenital y la vista inclinada del mapa",
@@ -2931,7 +2930,7 @@
"Control cockpit": "Controlar la cabina",
"Change visual style": "Cambiar el estilo visual",
"Adjust HUD": "Ajustar el HUD",
"Adjust cyber sonar": "Ajustar el sonar Ciber",
"Adjust sonar": "Ajustar el sonar",
"Adjust detection overlay": "Ajustar la superposición de detección",
"Change map stack": "Cambiar el conjunto de mapas",
"Adjust post-processing": "Ajustar el posprocesado",
@@ -4260,7 +4259,7 @@
"Show settings": "Mostrar ajustes",
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Elige un estilo: Normal, CRT, NVG, FLIR, Anime o Noir (teclas 1–6)",
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "En Fuente del mapa, elige el mapa base: Google 3D, Bing, Esri u OpenStreetMap",
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Activa o desactiva aquí el HUD. En Disposición, elige Táctica, Mínima o Ciber.",
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Activa o desactiva aquí el HUD. En Disposición, elige Táctica o Mínima.",
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "Mirilla encuadra la vista en un círculo. Difuminado suaviza el borde y Opacidad regula la sombra exterior.",
"Clean UI hides the panels and readouts for a clear view": "Interfaz limpia oculta los paneles y los indicadores para despejar la vista",
"Press search, then type part of a layer name or source": "Pulsa el botón de búsqueda y escribe parte del nombre o la fuente de una capa",
+4 -5
View File
@@ -2802,7 +2802,7 @@
"Control cockpit": "Piloter le cockpit",
"Change visual style": "Changer le style visuel",
"Adjust HUD": "Régler le HUD",
"Adjust cyber sonar": "Régler le sonar Cyber",
"Adjust sonar": "Régler le sonar",
"Adjust detection overlay": "Régler la surcouche de détection",
"Change map stack": "Changer de fond de carte",
"Adjust post-processing": "Régler le post-traitement",
@@ -3054,9 +3054,8 @@
"HUD layout": "Disposition du HUD",
"Tactical": "Tactique",
"Minimal": "Minimal",
"Cyber": "Cyber",
"Sonar": "Sonar",
"Cyber sonar contact scanner": "Scanner de contacts du sonar Cyber",
"Sonar contact scanner": "Scanner de contacts du sonar",
"Rings": "Anneaux",
"Sonar ring count": "Nombre d'anneaux du sonar",
"Range": "Portée",
@@ -3064,7 +3063,7 @@
"Power": "Puissance",
"Sonar intensity": "Intensité du sonar",
"Opacity": "Opacité",
"Cyber contact and label opacity": "Opacité des contacts et étiquettes Cyber",
"Sonar contact and label opacity": "Opacité des contacts et étiquettes du sonar",
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Opacité minimale des points, icônes, modèles, cadres de ciblage et étiquettes de la carte entre deux balayages du sonar",
"Sector": "Secteur",
"Sonar sector width": "Largeur du secteur du sonar",
@@ -4260,7 +4259,7 @@
"Show settings": "Afficher les réglages",
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Choisissez un style : Normal, CRT, NVG, FLIR, Anime ou Noir (touches 1 à 6)",
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "Dans Source de la carte, choisissez le fond de carte : Google 3D, Bing, Esri ou OpenStreetMap",
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Activez ou désactivez ici le HUD. Dans Disposition, choisissez Tactique, Minimal ou Cyber.",
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Activez ou désactivez ici le HUD. Dans Disposition, choisissez Tactique ou Minimal.",
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "La lunette cadre la vue dans un cercle. Adouci lisse le bord et Opacité règle l’assombrissement à l’extérieur.",
"Clean UI hides the panels and readouts for a clear view": "Vue épurée masque les panneaux et les indicateurs pour dégager la vue",
"Press search, then type part of a layer name or source": "Appuyez sur Rechercher, puis saisissez une partie du nom ou de la source d’une couche",
+4 -5
View File
@@ -2543,9 +2543,8 @@
"HUD layout": "פריסת ה-HUD",
"Tactical": "טקטי",
"Minimal": "מינימלי",
"Cyber": "סייבר",
"Sonar": "סונאר",
"Cyber sonar contact scanner": "סורק הסונאר הסייברי למגעים",
"Sonar contact scanner": "סורק המגעים של הסונאר",
"Rings": "טבעות",
"Sonar ring count": "מניין טבעות הסונאר",
"Range": "טווח",
@@ -2553,7 +2552,7 @@
"Power": "עוצמה",
"Sonar intensity": "עצמת הסונאר",
"Opacity": "אטימות",
"Cyber contact and label opacity": "אטימות המגעים והתוויות הסייבריים",
"Sonar contact and label opacity": "אטימות המגעים והתוויות של הסונאר",
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "האטימות המזערית לנקודות המפה, סמלים, דגמים, סוגריים ותוויות בין מעברי הסונאר",
"Sector": "סקטור",
"Sonar sector width": "רוחב סקטור הסונאר",
@@ -3163,7 +3162,7 @@
"Control cockpit": "שליטה בתא הטייס",
"Change visual style": "שינוי סגנון הראייה",
"Adjust HUD": "כוונון ה-HUD",
"Adjust cyber sonar": "כוונון הסונאר הסייברי",
"Adjust sonar": "כוונון הסונאר",
"Adjust detection overlay": "כוונון שכבת הזיהוי",
"Change map stack": "שינוי ערכת המפות",
"Adjust post-processing": "כוונון העיבוד שלאחר הרינדור",
@@ -4260,7 +4259,7 @@
"Show settings": "הצגת הגדרות",
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "בחרו סגנון: רגיל, ‏CRT, ‏NVG, ‏FLIR, אנימה או נואר (מקשים 1–6)",
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "במקור מפה, בחרו את מפת הבסיס: ‏Google 3D, ‏Bing, ‏Esri או OpenStreetMap",
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "כאן אפשר להפעיל או לכבות את התצוגה העילית. באפשרויות הפריסה בחרו טקטי, מינימלי או סייבר",
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "כאן אפשר להפעיל או לכבות את התצוגה העילית. באפשרויות הפריסה בחרו טקטי או מינימלי",
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "הסקופ תוחם את התצוגה בעיגול. ריכוך מרכך את השוליים, ואטימות קובעת כמה כהה האזור שמחוץ לעיגול.",
"Clean UI hides the panels and readouts for a clear view": "הממשק הנקי מסתיר את הלוחות והנתונים כדי לפנות את התצוגה",
"Press search, then type part of a layer name or source": "לחצו על החיפוש והקלידו חלק משם השכבה או המקור שלה",
+4 -5
View File
@@ -2802,7 +2802,7 @@
"Control cockpit": "Controlla il cockpit",
"Change visual style": "Cambia lo stile visivo",
"Adjust HUD": "Regola l'HUD",
"Adjust cyber sonar": "Regola il sonar Cyber",
"Adjust sonar": "Regola il sonar",
"Adjust detection overlay": "Regola l'overlay di rilevamento",
"Change map stack": "Cambia lo stack mappa",
"Adjust post-processing": "Regola la post-elaborazione",
@@ -3054,9 +3054,8 @@
"HUD layout": "Layout HUD",
"Tactical": "Tattico",
"Minimal": "Minimale",
"Cyber": "Cyber",
"Sonar": "Sonar",
"Cyber sonar contact scanner": "Scanner di contatti sonar Cyber",
"Sonar contact scanner": "Scanner di contatti sonar",
"Rings": "Anelli",
"Sonar ring count": "Numero di anelli del sonar",
"Range": "Portata",
@@ -3064,7 +3063,7 @@
"Power": "Potenza",
"Sonar intensity": "Intensità del sonar",
"Opacity": "Opacità",
"Cyber contact and label opacity": "Opacità di contatti ed etichette Cyber",
"Sonar contact and label opacity": "Opacità di contatti ed etichette del sonar",
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Opacità minima di punti sulla mappa, icone, modelli, riquadri ed etichette tra un passaggio del sonar e l'altro",
"Sector": "Settore",
"Sonar sector width": "Ampiezza del settore del sonar",
@@ -4260,7 +4259,7 @@
"Show settings": "Mostra impostazioni",
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Scegli uno stile: Normale, CRT, NVG, FLIR, Anime o Noir (tasti 1–6)",
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "In Fonte mappa, scegli la mappa di base: Google 3D, Bing, Esri o OpenStreetMap",
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Attiva o disattiva qui l’HUD. In Layout, scegli Tattico, Minimale o Cyber.",
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Attiva o disattiva qui l’HUD. In Layout, scegli Tattico o Minimale.",
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "Scope inquadra la vista in un cerchio. Sfumatura ne ammorbidisce il bordo e Opacità regola quanto scurire l’esterno.",
"Clean UI hides the panels and readouts for a clear view": "UI pulita nasconde i pannelli e gli indicatori per lasciare libera la vista",
"Press search, then type part of a layer name or source": "Premi il pulsante di ricerca, poi digita parte del nome o della fonte di un livello",
+4 -5
View File
@@ -2642,7 +2642,7 @@
"Control cockpit": "コックピットを操作",
"Change visual style": "ビジュアルスタイルを変更",
"Adjust HUD": "HUDを調整",
"Adjust cyber sonar": "サイバーソナーを調整",
"Adjust sonar": "ソナーを調整",
"Adjust detection overlay": "検出オーバーレイを調整",
"Change map stack": "マップスタックを変更",
"Adjust post-processing": "ポストプロセスを調整",
@@ -2890,9 +2890,8 @@
"HUD layout": "HUDレイアウト",
"Tactical": "タクティカル",
"Minimal": "ミニマル",
"Cyber": "サイバー",
"Sonar": "ソナー",
"Cyber sonar contact scanner": "サイバーソナーのコンタクトスキャナー",
"Sonar contact scanner": "ソナーのコンタクトスキャナー",
"Rings": "リング数",
"Sonar ring count": "ソナーのリング数",
"Range": "範囲",
@@ -2900,7 +2899,7 @@
"Power": "強度",
"Sonar intensity": "ソナーの強度",
"Opacity": "不透明度",
"Cyber contact and label opacity": "サイバーのコンタクトとラベルの不透明度",
"Sonar contact and label opacity": "ソナーのコンタクトとラベルの不透明度",
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "ソナーの走査の合間における地図上の点、アイコン、モデル、ブラケット、ラベルの最小不透明度",
"Sector": "扇形",
"Sonar sector width": "ソナーの扇形の幅",
@@ -4054,7 +4053,7 @@
"Show settings": "設定を表示",
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "標準、CRT、NVG、FLIR、アニメ、ノワールからスタイルを選びます(キー1~6)",
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "マップソースで背景地図を選びます:Google 3D、Bing、Esri、OpenStreetMap",
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "ここでHUDをオン・オフできます。レイアウトでタクティカル、ミニマル、サイバーを選びます",
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "ここでHUDをオン・オフできます。レイアウトでタクティカルかミニマルを選びます",
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "スコープは表示範囲を円形に切り取ります。ぼかしで円の縁をなじませ、不透明度で円の外側の暗さを調整します。",
"Clean UI hides the panels and readouts for a clear view": "クリーンUIはパネルや表示情報を隠し、マップを見やすくします",
"Press search, then type part of a layer name or source": "検索ボタンを押し、レイヤー名やソース名の一部を入力します",
+4 -5
View File
@@ -2804,7 +2804,7 @@
"Control cockpit": "Controlar a cabine",
"Change visual style": "Mudar o estilo visual",
"Adjust HUD": "Ajustar o HUD",
"Adjust cyber sonar": "Ajustar o sonar Ciber",
"Adjust sonar": "Ajustar o sonar",
"Adjust detection overlay": "Ajustar a sobreposição de detecção",
"Change map stack": "Mudar a pilha de mapas",
"Adjust post-processing": "Ajustar o pós-processamento",
@@ -3056,9 +3056,8 @@
"HUD layout": "Layout do HUD",
"Tactical": "Tático",
"Minimal": "Mínimo",
"Cyber": "Ciber",
"Sonar": "Sonar",
"Cyber sonar contact scanner": "Scanner de contatos do sonar Ciber",
"Sonar contact scanner": "Scanner de contatos do sonar",
"Rings": "Anéis",
"Sonar ring count": "Número de anéis do sonar",
"Range": "Alcance",
@@ -3066,7 +3065,7 @@
"Power": "Potência",
"Sonar intensity": "Intensidade do sonar",
"Opacity": "Opacidade",
"Cyber contact and label opacity": "Opacidade de contatos e rótulos Ciber",
"Sonar contact and label opacity": "Opacidade de contatos e rótulos do sonar",
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Opacidade mínima de pontos, ícones, modelos, marcadores de alvo e rótulos do mapa entre as passagens do sonar",
"Sector": "Setor",
"Sonar sector width": "Largura do setor do sonar",
@@ -4260,7 +4259,7 @@
"Show settings": "Mostrar configurações",
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Escolha um estilo: Normal, CRT, NVG, FLIR, Anime ou Noir (teclas 1 a 6)",
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "Em Fonte do mapa, escolha o mapa de base: Google 3D, Bing, Esri ou OpenStreetMap",
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Ative ou desative o HUD aqui. Em Layout, escolha Tático, Mínimo ou Ciber.",
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Ative ou desative o HUD aqui. Em Layout, escolha Tático ou Mínimo.",
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "A mira enquadra a vista em um círculo. A suavização deixa a borda menos marcada e Opacidade controla o escurecimento da área externa.",
"Clean UI hides the panels and readouts for a clear view": "Interface limpa oculta os painéis e os indicadores para liberar a vista",
"Press search, then type part of a layer name or source": "Use o botão de pesquisa e digite parte do nome ou da fonte de uma camada",
+4 -5
View File
@@ -1870,11 +1870,11 @@
"POSITIONED": "С КООРД.",
"SDR VOL": "ГРОМК. SDR",
"LOCAL RTL-SDR": "ЛОКАЛЬНЫЙ RTL-SDR",
"Cyber sonar contact scanner": "Кибер-сонар: сканер контактов",
"Sonar contact scanner": "Сонар: сканер контактов",
"Sonar ring count": "Число колец сонара",
"Sonar ring range": "Дальность колец сонара",
"Sonar intensity": "Интенсивность сонара",
"Cyber contact and label opacity": "Непрозрачность контактов и подписей в режиме «Кибер»",
"Sonar contact and label opacity": "Непрозрачность контактов и подписей сонара",
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Минимальная непрозрачность точек, значков, моделей, рамок и подписей на карте между проходами сонара",
"Sonar sector width": "Ширина сектора сонара",
"Rings": "Кольца",
@@ -1882,7 +1882,6 @@
"Power": "Мощность",
"Opacity": "Непрозрачность",
"Sector": "Сектор",
"Cyber": "Кибер",
"Sonar": "Сонар",
"Turn Street Level on or off": "Включить или выключить «Уличные снимки»",
"Toggle straight-down and tilted map views": "Переключить вид карты: сверху или с наклоном",
@@ -2999,7 +2998,7 @@
"Control cockpit": "Управлять кабиной",
"Change visual style": "Сменить визуальный стиль",
"Adjust HUD": "Настроить HUD",
"Adjust cyber sonar": "Настроить кибер-сонар",
"Adjust sonar": "Настроить сонар",
"Adjust detection overlay": "Настроить слой детекции",
"Change map stack": "Сменить набор карт",
"Adjust post-processing": "Настроить постобработку",
@@ -4363,7 +4362,7 @@
"Show settings": "Показать настройки",
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Выберите стиль: Обычный, CRT, NVG, FLIR, Аниме или Нуар (клавиши 1–6)",
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "В разделе «Источник карты» выберите базовую карту: Google 3D, Bing, Esri или OpenStreetMap",
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Здесь можно включить или выключить HUD. В разделе «Макет» выберите «Тактический», «Минимальный» или «Кибер».",
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Здесь можно включить или выключить HUD. В разделе «Макет» выберите «Тактический» или «Минимальный».",
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "«Прицел» обрамляет вид кругом. «Растушёвка» смягчает край, а «Непрозрачность» задаёт затемнение снаружи.",
"Clean UI hides the panels and readouts for a clear view": "«Чистый интерфейс» скрывает панели и индикаторы, освобождая обзор",
"Press search, then type part of a layer name or source": "Нажмите кнопку поиска и введите часть названия слоя или источника",
+4 -5
View File
@@ -2873,7 +2873,7 @@
"Control cockpit": "Styr cockpit",
"Change visual style": "Byt visuell stil",
"Adjust HUD": "Justera HUD",
"Adjust cyber sonar": "Justera cybersonar",
"Adjust sonar": "Justera sonaren",
"Adjust detection overlay": "Justera detekteringsöverlägg",
"Change map stack": "Byt kartuppsättning",
"Adjust post-processing": "Justera efterbehandling",
@@ -2958,9 +2958,8 @@
"SEEK ▶": "SÖK ▶",
"SDR VOL": "SDR-VOL.",
"Local SDR volume": "Volym för lokal SDR",
"Cyber": "Cyber",
"Sonar": "Sonar",
"Cyber sonar contact scanner": "Kontaktskanner med cybersonar",
"Sonar contact scanner": "Kontaktskanner med sonar",
"Rings": "Ringar",
"Sonar ring count": "Antal sonarringar",
"Range": "Räckvidd",
@@ -2968,7 +2967,7 @@
"Power": "Styrka",
"Sonar intensity": "Sonarintensitet",
"Opacity": "Opacitet",
"Cyber contact and label opacity": "Opacitet för cyberkontakter och etiketter",
"Sonar contact and label opacity": "Opacitet för sonarkontakter och etiketter",
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Lägsta opacitet för kartpunkter, ikoner, modeller, ramar och etiketter mellan sonarsvepen",
"Sector": "Sektor",
"Sonar sector width": "Sonarsektorns bredd",
@@ -4157,7 +4156,7 @@
"Show settings": "Visa inställningar",
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Välj en stil: Normal, CRT, NVG, FLIR, Anime eller Noir (tangenterna 1–6)",
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "Välj baskarta under Kartkälla: Google 3D, Bing, Esri eller OpenStreetMap",
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Slå på eller av HUD här. Välj Taktisk, Minimal eller Cyber under Layout.",
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Slå på eller av HUD här. Välj Taktisk eller Minimal under Layout.",
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "Scope ramar in vyn med en cirkel. Mjuk kant tonar ut kanten och Opacitet styr hur mörkt det är utanför.",
"Clean UI hides the panels and readouts for a clear view": "Rent gränssnitt döljer paneler och indikatorer för att ge fri sikt",
"Press search, then type part of a layer name or source": "Tryck på sökknappen och skriv en del av lagrets namn eller källa",
+4 -5
View File
@@ -2881,7 +2881,7 @@
"Control cockpit": "Керувати кабіною",
"Change visual style": "Змінити візуальний стиль",
"Adjust HUD": "Налаштувати HUD",
"Adjust cyber sonar": "Налаштувати кібер-сонар",
"Adjust sonar": "Налаштувати сонар",
"Adjust detection overlay": "Налаштувати накладку виявлення",
"Change map stack": "Змінити набір карт",
"Adjust post-processing": "Налаштувати постобробку",
@@ -3135,9 +3135,8 @@
"HUD layout": "Компонування HUD",
"Tactical": "Тактичне",
"Minimal": "Мінімальне",
"Cyber": "Кібер",
"Sonar": "Сонар",
"Cyber sonar contact scanner": "Кібер-сонар: сканер контактів",
"Sonar contact scanner": "Сонар: сканер контактів",
"Rings": "Кільця",
"Sonar ring count": "Кількість кілець сонара",
"Range": "Дальність",
@@ -3145,7 +3144,7 @@
"Power": "Потужність",
"Sonar intensity": "Інтенсивність сонара",
"Opacity": "Непрозорість",
"Cyber contact and label opacity": "Непрозорість контактів і підписів у режимі «Кібер»",
"Sonar contact and label opacity": "Непрозорість контактів і підписів сонара",
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "Мінімальна непрозорість точок, значків, моделей, рамок і підписів на карті між проходами сонара",
"Sector": "Сектор",
"Sonar sector width": "Ширина сектора сонара",
@@ -4363,7 +4362,7 @@
"Show settings": "Показати налаштування",
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "Виберіть стиль: Звичайний, CRT, NVG, FLIR, Аніме або Нуар (клавіші 1–6)",
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "У розділі «Джерело карти» виберіть базову карту: Google 3D, Bing, Esri або OpenStreetMap",
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "Увімкніть або вимкніть HUD тут. У розділі «Компонування» виберіть «Тактичне», «Мінімальне» або «Кібер».",
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "Увімкніть або вимкніть HUD тут. У розділі «Компонування» виберіть «Тактичне» або «Мінімальне».",
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "«Приціл» обрамляє огляд колом. «Розмиття» пом’якшує край, а «Непрозорість» визначає затемнення зовні.",
"Clean UI hides the panels and readouts for a clear view": "«Чистий інтерфейс» приховує панелі та індикатори, щоб ніщо не заважало огляду",
"Press search, then type part of a layer name or source": "Натисніть кнопку пошуку й введіть частину назви шару або джерела",
+4 -5
View File
@@ -2543,7 +2543,7 @@
"Control cockpit": "控制座舱",
"Change visual style": "切换视觉样式",
"Adjust HUD": "调整 HUD",
"Adjust cyber sonar": "调整赛博声呐",
"Adjust sonar": "调整声呐",
"Adjust detection overlay": "调整探测叠加层",
"Change map stack": "切换地图组合",
"Adjust post-processing": "调整后期处理",
@@ -2790,9 +2790,8 @@
"HUD layout": "HUD 布局",
"Tactical": "战术",
"Minimal": "精简",
"Cyber": "赛博",
"Sonar": "声呐",
"Cyber sonar contact scanner": "赛博声呐目标扫描器",
"Sonar contact scanner": "声呐目标扫描器",
"Rings": "圈数",
"Sonar ring count": "声呐圈数",
"Range": "范围",
@@ -2800,7 +2799,7 @@
"Power": "强度",
"Sonar intensity": "声呐强度",
"Opacity": "不透明度",
"Cyber contact and label opacity": "赛博目标与标签不透明度",
"Sonar contact and label opacity": "声呐目标与标签不透明度",
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "两次声呐扫描之间地图点、图标、模型、括号标记与标签的最低不透明度",
"Sector": "扇区",
"Sonar sector width": "声呐扇区宽度",
@@ -4054,7 +4053,7 @@
"Show settings": "显示设置",
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "选择一种样式:常规、CRT、NVG、FLIR、动漫或黑色电影(按键 1–6)",
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "在地图源中选择底图:Google 3D、Bing、Esri 或 OpenStreetMap",
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "在此开启或关闭 HUD。在布局中选择战术、精简或赛博",
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "在此开启或关闭 HUD。在布局中选择战术或精简",
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "视域用圆形框出视野。羽化柔化边缘,不透明度决定圆外的明暗。",
"Clean UI hides the panels and readouts for a clear view": "简洁界面会隐藏面板和读数,让视图更清晰",
"Press search, then type part of a layer name or source": "点击搜索,然后输入部分图层名称或来源",
+4 -5
View File
@@ -2543,7 +2543,7 @@
"Control cockpit": "控制座艙",
"Change visual style": "切換視覺樣式",
"Adjust HUD": "調整 HUD",
"Adjust cyber sonar": "調整賽博聲吶",
"Adjust sonar": "調整聲吶",
"Adjust detection overlay": "調整探測疊加層",
"Change map stack": "切換地圖組合",
"Adjust post-processing": "調整後期處理",
@@ -2790,9 +2790,8 @@
"HUD layout": "HUD 佈局",
"Tactical": "戰術",
"Minimal": "精簡",
"Cyber": "賽博",
"Sonar": "聲吶",
"Cyber sonar contact scanner": "賽博聲吶目標掃描器",
"Sonar contact scanner": "聲吶目標掃描器",
"Rings": "圈數",
"Sonar ring count": "聲吶圈數",
"Range": "範圍",
@@ -2800,7 +2799,7 @@
"Power": "強度",
"Sonar intensity": "聲吶強度",
"Opacity": "不透明度",
"Cyber contact and label opacity": "賽博目標與標籤不透明度",
"Sonar contact and label opacity": "聲吶目標與標籤不透明度",
"Minimum opacity for map dots, icons, models, brackets, and labels between sonar passes": "兩次聲吶掃描之間地圖點、圖標、模型、括號標記與標籤的最低不透明度",
"Sector": "扇區",
"Sonar sector width": "聲吶扇區寬度",
@@ -4054,7 +4053,7 @@
"Show settings": "顯示設置",
"Pick a look: Normal, CRT, NVG, FLIR, Anime or Noir (keys 1–6)": "選擇一種樣式:常規、CRT、NVG、FLIR、動漫或黑色電影(按鍵 1–6)",
"Under Map source, pick the map underneath: Google 3D, Bing, Esri or OpenStreetMap": "在地圖源中選擇底圖:Google 3D、Bing、Esri 或 OpenStreetMap",
"Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber": "在此開啟或關閉 HUD。在佈局中選擇戰術、精簡或賽博",
"Switch the HUD on or off here; Layout picks Tactical or Minimal": "在此開啟或關閉 HUD。在佈局中選擇戰術或精簡",
"Scope frames the view in a circle. Feather softens its edge, Opacity sets how dark it shades outside.": "視域用圓形框出視野。羽化柔化邊緣,不透明度決定圓外的明暗。",
"Clean UI hides the panels and readouts for a clear view": "簡潔界面會隱藏面板和讀數,讓視圖更清晰",
"Press search, then type part of a layer name or source": "點擊搜索,然後輸入部分圖層名稱或來源",
-4
View File
@@ -86,7 +86,6 @@
"Chat",
"Country",
"Cyan",
"Cyber",
"DEST ---°",
"DEST {bearing}",
"Dance",
@@ -536,7 +535,6 @@
"Conversation",
"Country",
"Cyan",
"Cyber",
"Cyclones · NHC / CPHC",
"DENSE",
"DEST ---°",
@@ -788,7 +786,6 @@
"CRT",
"Chat",
"Country",
"Cyber",
"DEST ---°",
"DEST {bearing}",
"DISPLAY",
@@ -1431,7 +1428,6 @@
"SIG",
"AUTO",
"FM MHZ",
"Cyber",
"Sonar",
"Cyan",
"≥ {value} MW",
+1 -1
View File
@@ -96,7 +96,7 @@ export const AWARENESS_RANGE_RING_STYLE = Object.freeze({
* (tracking, cockpit, orbit, a fly-to) do not. Below the band's height they
* rest too. While they run they never hold
* continuous rendering; each drawn frame arms one more step after the
* Cyber sonar's 80 ms cadence, so the two never beat. Fronts and band,
* sonar's 80 ms cadence, so the two never beat. Fronts and band,
* fixed in the world, step at that cadence however many frames are
* drawn, so they look the same whether the camera moves or not; crossing
* the rim height shows or hides them at once.
+6 -6
View File
@@ -430,7 +430,7 @@ export function createRangeRing({
* Run the range pulses again for `activeMs`, after a camera move. Call it
* during a frame (lifecycle's preRender): that frame's postRender arms the
* next request, so waking asks for no extra frame of its own. Pulses at
* rest start in this frame; running ones keep their Cyber sonar interval,
* rest start in this frame; running ones keep their sonar interval,
* however many frames a drag draws.
*/
function wakePulses() {
@@ -506,7 +506,7 @@ export function createRangeRing({
const { lines, band } = setsOn(viewer);
const frame = findFrame(viewer);
// A renderer without frame hooks gets the static ring only, as the
// Cyber sonar scene does. So does a viewer who prefers reduced motion.
// sonar scene does. So does a viewer who prefers reduced motion.
const animate = Boolean(!reducedMotion && frame?.on);
// Pulses run from now until `wake.untilMs`, then rest.
const wake = animate
@@ -681,7 +681,7 @@ export function createRangeRing({
bandShown = false;
return;
}
// The soft band is painted at most once a Cyber sonar interval;
// The soft band is painted at most once a sonar interval;
// the fronts, crisp lines, move on every step.
if (
bandShown &&
@@ -726,7 +726,7 @@ export function createRangeRing({
// Whether the camera was below the rim at the last step.
let wasBelow = belowRim();
// The fronts and band are fixed in the world: a camera move needs
// nothing of them, so they step a Cyber sonar interval apart however
// nothing of them, so they step a sonar interval apart however
// many frames are drawn, and look the same parked or moving. Each
// frame checks only whether the camera crossed the rim height, which
// shows or hides them at once. A step asks for the frame that draws
@@ -746,8 +746,8 @@ export function createRangeRing({
stepRunning(nowMs);
}
});
// Each drawn frame, whoever asked for it, arms one step a Cyber
// sonar interval later, as the Cyber sonar scene does, whose changes
// Each drawn frame, whoever asked for it, arms one step a
// sonar interval later, as the sonar scene does, whose changes
// ask for the frame that draws them. Requests never land within
// 80 ms of a frame, so they cannot beat the detection lane's 80 ms
// gate, and they stop once the pulses rest.
+3 -3
View File
@@ -488,7 +488,7 @@ test('pulses ask for a frame 80 ms after each drawn frame instead of holding con
const { rendering, pulseFrames } = ring;
const loop = frameLoop(t, ring);
rendering.renderVisual(flight(3));
// A Contacts view repaints at the Cyber sonar cadence, ~12.5 fps, while
// A Contacts view repaints at the sonar cadence, ~12.5 fps, while
// the pulses run, never every display frame.
assert.equal(pulseFrames(), 0);
loop.advance(1); // the frame the new ring asked for arms the first request
@@ -972,14 +972,14 @@ test('disabling the layer tears the pulses down completely', (t) => {
);
});
test('pulse requests wait 80 ms after any frame, so they cannot beat the Cyber sonar', (t) => {
test('pulse requests wait 80 ms after any frame, so they cannot beat the sonar', (t) => {
const ring = ringRendering(t);
const { rendering, pulseFrames } = ring;
const loop = frameLoop(t, ring);
rendering.renderVisual(flight(3));
loop.advance(1);
const frames = pulseFrames();
// Another owner (the Cyber sonar, a data update) draws 67 ms after ours.
// Another owner (the sonar, a data update) draws 67 ms after ours.
loop.advance(67);
loop.draw();
loop.advance(CYBER_SONAR_RENDER_INTERVAL_MS - 1);
+1 -1
View File
@@ -1093,7 +1093,7 @@ export function getOverlayPaintRect(sourceId, entryId) {
/**
* Opacity an entry paints with this frame, or 0 when it is not queued or the
* yield-collision pass hid it. Custom lanes may call it before later lanes
* publish paint rects. Leaves out the Cyber sonar fade.
* publish paint rects. Leaves out the sonar fade.
* @param {string} sourceId
* @param {string} entryId
* @returns {number}
+1 -1
View File
@@ -222,7 +222,7 @@ test('parameterized Display presets keep one stable scroll owner', () => {
const css = readStylesheet(new URL('../style.css', import.meta.url));
assert.match(css, /#pp-toggles:not\(\.collapsed\) > \.pp-panel-body > #param-slider-panel\.active\s*\{[\s\S]*?flex:\s*0 0 auto;[\s\S]*?max-height:\s*none;[\s\S]*?overflow-y:\s*visible;/);
assert.match(ui, /readDisplayScrollTop: \(\) =>\s*this\._displayPortalScrollRestoreOwner === 'standard'[\s\S]*?this\._standardDisplayScrollTop[\s\S]*?displayPanelScroller\(this\._ppToggles\)\?\.scrollTop \|\| 0/);
assert.match(ui, /readDisplayScrollTop: \(\) =>\s*this\._displayPortalScrollRestoreOwner === 'standard'[\s\S]*?this\._standardDisplayScrollTop[\s\S]*?this\._ppToggles\?\.scrollTop \|\| 0/);
assert.match(rightRail, /scroller\.scrollTop = Math\.min\(displayScrollTop, maxScrollTop\);/);
// The panel's parameters change, and the rail lays out again.
assert.match(
+5 -7
View File
@@ -218,10 +218,10 @@ test('no unchanged Realtime tool definition drifts silently', () => {
.sort((a, b) => a.name.localeCompare(b.name))
.map((tool) => structuredClone(tool))
.filter((tool) => tool.name !== 'set_cyber_sonar');
// Cyber adds one HUD choice and the sonar tool, and Operator was retired;
// retain the existing pin for every legacy field.
// Operator and then Cyber were retired (Cyber's sonar became a visual
// style with its own tool); retain the existing pin for every legacy field.
const hudLayout = unchanged.find((tool) => tool.name === 'set_hud').parameters.properties.layout;
assert.deepEqual(hudLayout.enum, ['tactical', 'minimal', 'cyber']);
assert.deepEqual(hudLayout.enum, ['tactical', 'minimal']);
hudLayout.enum = ['tactical', 'operator', 'minimal'];
// Globe rotation adds one motion and clarifies the two affected descriptions.
// Check those edits explicitly, then keep the legacy pin for every other field.
@@ -353,10 +353,8 @@ test('Radio is nested inside Context with its own disclosure and power controls'
assert.match(radioControlsSource, /classList\.remove\('radio-broadcasting'\)/);
assert.match(radioBindings, /this\.radio\.getTunerStations\(750\)/);
assert.match(radioBindings, /radioTunerPointerPosition\(/);
// Only the Cyber skin promotes Radio to a peer panel. Other themes retain
// the embedded Context layout; theme round-trip behavior has separate tests.
const baseCss = css.replace(readFileSync(new URL('./ui/styles/cyber.css', import.meta.url), 'utf8'), '');
assert.doesNotMatch(baseCss, /#right-context-rail\s*>\s*#radio-panel/);
// Radio stays embedded in Context; no stylesheet promotes it to a peer panel.
assert.doesNotMatch(css, /#right-context-rail\s*>\s*#radio-panel/);
assert.match(css, /#global-context-panel #radio-panel\.collapsed/);
assert.doesNotMatch(css, /\.context-radio-/);
assert.match(css, /#right-context-rail #global-context-panel:not\(\.collapsed\) \.context-mode-view,[\s\S]*?#right-context-rail #global-context-panel:not\(\.collapsed\) #radio-panel\s*\{[\s\S]*?flex: 0 0 auto;/);
+1 -1
View File
@@ -94,7 +94,7 @@ out vec4 v_pickColor;
out float v_proxy;
// The row's anchor in clip space before screen offsets, for effects that wrap
// main() (cyber sonar) and must not change geometry or picks.
// main() (sonar) and must not change geometry or picks.
vec4 iconAnchorClip = vec4(0.0, 0.0, 0.0, -1.0);
${ICON_SEGMENT_GLSL}
+3
View File
@@ -114,6 +114,9 @@ export const SHARE_VIEW_ENUMS = Object.freeze({
'esri-imagery',
'osm',
]),
// Removed layouts keep their index so old links decode: Operator opens in
// Tactical. Cyber means Tactical with the Sonar style on; the app still
// writes it for that state.
hudVariant: Object.freeze(['tactical', 'operator', 'minimal', 'cyber']),
detectionMode: Object.freeze(['OFF', 'SPARSE', 'BALANCED', 'DENSE']),
detectionAllocation: Object.freeze(['ELASTIC', 'WEIGHTED']),
+14 -2
View File
@@ -440,6 +440,15 @@ test('precision: coordinates 1e-4 degrees, angles and lengths whole units', () =
assert.deepEqual([wild.lat, wild.lon, wild.pitch], [90, -170, -90]);
});
test('links made with a retired HUD layout still decode to its name', () => {
// The app restores Operator as Tactical and Cyber as Tactical with Sonar on
// (VisualSettings._setHudVariant); the codec only keeps the name.
for (const hudVariant of ['operator', 'cyber']) {
const state = { ...createDefaultShareViewState(), hudVariant };
assert.equal(decodeOk(encodeShareView(state)).state.hudVariant, hudVariant);
}
});
test('defaults travel as frozen meanings that match today’s app defaults', () => {
const defaults = createDefaultShareViewState();
// When an app default moves, these tests should be updated to document the
@@ -448,7 +457,8 @@ test('defaults travel as frozen meanings that match today’s app defaults', ()
assert.equal(defaults.bloomVersion, BLOOM_SCALE_VERSION);
assert.equal(defaults.hudVariant, HUD_LAYOUTS[0]);
// Codes are append-only: the retired Operator layout keeps code 1 so old
// links still parse, and the app restores them as Tactical.
// links still parse, and the app restores them as Tactical. The retired
// Cyber layout keeps code 3; the app restores it as Tactical with Sonar on.
assert.deepEqual(SHARE_VIEW_ENUMS.hudVariant, [
'tactical',
'operator',
@@ -456,7 +466,9 @@ test('defaults travel as frozen meanings that match today’s app defaults', ()
'cyber',
]);
assert.deepEqual(
SHARE_VIEW_ENUMS.hudVariant.filter((variant) => variant !== 'operator'),
SHARE_VIEW_ENUMS.hudVariant.filter(
(variant) => variant !== 'operator' && variant !== 'cyber',
),
[...HUD_LAYOUTS],
);
// Snow is retired; its code stays reserved (see the retired-style test).
+1
View File
@@ -542,6 +542,7 @@ test('every explicit visual UI gesture claims restore authority before it mutate
const gestureRoutes = [
['toggleHud: () => {', 'toggleOrbit: () =>', 'this.hud.toggle()', 'HUD hotkey'],
['cycleDetection: () => {', 'toggleCctv: () =>', 'cycleDetectionMode()', 'detection hotkey'],
['toggleSonar:', 'setSonarRings:', 'this._setCyberSonarEnabled(', 'Sonar toggle'],
['toggleBloom:', 'setBloomIntensity:', 'this._setBloomEnabled(', 'toggleBloom control'],
['setBloomIntensity:', 'toggleSharpen:', 'this._setBloomIntensity(', 'setBloomIntensity control'],
['toggleSharpen:', 'setScopeEnabled:', 'this._setSharpenEnabled(', 'toggleSharpen control'],
-14
View File
@@ -91,20 +91,6 @@ test('each radiogroup is one tab stop, on its checked button', () => {
}
});
test('the Cyber theme frames the Street Level panel like its rail peers (P3)', () => {
const cyber = read('src/ui/styles/cyber.css');
const inner = (cyber.match(/\.recent-imagery-panel-inner,/g) || []).length;
const panel = (cyber.match(/#recent-imagery-panel,/g) || []).length;
assert.ok(inner > 0 && panel > 0);
assert.equal(
(cyber.match(/\.street-level-panel-inner,/g) || []).length,
inner,
);
assert.equal((cyber.match(/#street-level-panel,/g) || []).length, panel);
// A theme header rule must be able to outrank the panel's own.
assert.doesNotMatch(panelCss, /#street-level-panel \.panel-header/);
});
test('OPEN STREET VIEW keeps its width beside a long coverage line', () => {
// .scene-btn grows and shrinks (flex: 1) and loads after this stylesheet:
// only a more specific rule keeps the button from being squeezed.
+6 -7
View File
@@ -30,7 +30,7 @@ import { LocationNavigation } from './locationNavigation.js';
import { bindCameraOrientationControls } from './cameraOrientationControls.js';
import { createMapSourceControls } from './mapSource.js';
import { STYLES } from './effects.js';
import { isHudLayout } from '../hudLayouts.js';
import { isHudLayout, isLegacySonarHudLayout } from '../hudLayouts.js';
import {
getCyberSonarControlState,
setCyberSonarControls,
@@ -1390,17 +1390,18 @@ export class StyleManager extends ShellFacade {
}
/**
* Switches the HUD layout variant.
* Switches the HUD layout variant. The removed Cyber layout is accepted
* as an alias: it opens Tactical with the Sonar style on.
* @param {'tactical'|'minimal'|'cyber'} variantName - Layout variant.
* @returns {{ok: boolean, layout?: string, visible?: boolean, error?: string}}
*/
setHudLayout(variantName) {
const variant = String(variantName ?? '').toLowerCase();
if (!isHudLayout(variant)) {
if (!isHudLayout(variant) && !isLegacySonarHudLayout(variant)) {
return { ok: false, error: `Unknown HUD layout: ${variantName}` };
}
this.shareLinkManager?.claimRestoreLane?.('visual');
this._setHudVariant(variant, { applyVisualDefaults: true });
this._setHudVariant(variant);
return {
ok: true,
layout: this.hud.getVariant(),
@@ -1519,7 +1520,7 @@ export class StyleManager extends ShellFacade {
};
}
/** Apply Cyber-only sonar settings through the shared visual controls. */
/** Apply sonar visual-style settings through the shared visual controls. */
setCyberSonar(settings) {
return setCyberSonarControls(this, settings);
}
@@ -1655,8 +1656,6 @@ export class StyleManager extends ShellFacade {
* @param {string} styleName - Target style ('normal'|'retro'|'surveillance'|'thermal'|'anime'|'noir').
* @param {object} [options]
* @param {boolean} [options.applyPreset=true] - Whether to apply STYLE_PRESET_DEFAULTS for the new style.
* @param {boolean} [options.userInitiated=false] - Whether a direct user preset choice owns the Cyber exit style.
* @param {boolean} [options.preserveCyberRestore=false] - Whether an automatic style update keeps the Cyber entry snapshot.
* @returns {void}
*/
setStyle(
+4 -11
View File
@@ -1,5 +1,3 @@
import { displayPanelScroller } from './displayPanelScroll.js';
/**
* Show the existing Display groups in Cockpit's Display popover while Cockpit
* is on. The portal publishes the popover's slots; the Display panel
@@ -37,16 +35,13 @@ export class CockpitDisplayPortal {
this.slots = Object.freeze(
Object.fromEntries(this.records.map(({ name, slot }) => [name, slot])),
);
this.standardScrollTop =
displayPanelScroller(standardPanel)?.scrollTop || 0;
this.standardScrollTop = standardPanel?.scrollTop || 0;
this.cockpitScrollTop = cockpitPanel?.scrollTop || 0;
const options = { passive: true, signal: this.listeners.signal };
standardPanel?.addEventListener(
'scroll',
() => {
if (!this.active)
this.standardScrollTop =
displayPanelScroller(standardPanel).scrollTop;
if (!this.active) this.standardScrollTop = standardPanel.scrollTop;
},
{ ...options, capture: true },
);
@@ -98,8 +93,7 @@ export class CockpitDisplayPortal {
if (nextActive && this.cockpitPanel)
this.cockpitPanel.scrollTop = this.cockpitScrollTop;
if (!nextActive && this.standardPanel)
displayPanelScroller(this.standardPanel).scrollTop =
this.standardScrollTop;
this.standardPanel.scrollTop = this.standardScrollTop;
};
if (!settle) {
this.afterRender(() => {
@@ -146,8 +140,7 @@ export class CockpitDisplayPortal {
this.publish(null);
const { standardPanel, standardScrollTop } = this;
this.afterRender(() => {
if (standardPanel)
displayPanelScroller(standardPanel).scrollTop = standardScrollTop;
if (standardPanel) standardPanel.scrollTop = standardScrollTop;
});
this.records = [];
this.restoreOwner = null;
+3 -135
View File
@@ -2,7 +2,6 @@
import {
resolveCockpitUtilityAnchor,
resolveCockpitUtilityLayout,
resolveCyberCockpitPanelLane,
} from '../cockpitUtilityLayout.js';
import {
COCKPIT_UTILITY_REC_GAP_PX,
@@ -67,8 +66,6 @@ export function syncContextLayout() {
if (window.matchMedia('(max-width: 760px)').matches) {
this.context.dataset.layoutMode = 'compact-bottom';
this.context.style.removeProperty('--cockpit-context-left');
this.context.style.removeProperty('--cockpit-context-top');
this.context.style.removeProperty('--cockpit-context-max-height');
return;
}
@@ -78,56 +75,6 @@ export function syncContextLayout() {
'--cockpit-context-left',
`${desktopInset.toFixed(1)}px`,
);
if (document.documentElement.dataset.uiTheme !== 'cyber') {
this.context.style.removeProperty('--cockpit-context-top');
this.context.style.removeProperty('--cockpit-context-max-height');
return;
}
const defaultTop = Math.max(255, Math.min(300, window.innerHeight * 0.28));
// An open left panel Cockpit keeps (Data Layers or Utilities).
const dataPanel = document.querySelector(
'#left-panel-stack > :is(#data-panel, #utilities-panel):not(.collapsed)',
);
let desiredTop = defaultTop;
if (this.contextCollapsed && dataPanel) {
desiredTop = Math.max(
desiredTop,
dataPanel.getBoundingClientRect().bottom + 8,
);
}
const contextBounds = this.context.getBoundingClientRect();
let safeBottom = window.innerHeight - 24;
for (const selector of [
'#cesium-credits',
'#gev-credits',
'#command-dock',
'#view-switcher',
]) {
const obstacle = document.querySelector(selector);
if (!obstacle) continue;
const style = window.getComputedStyle(obstacle);
if (
style.display === 'none' ||
style.visibility === 'hidden' ||
Number(style.opacity) === 0
)
continue;
const bounds = obstacle.getBoundingClientRect();
const overlapsHorizontally =
bounds.right > contextBounds.left && bounds.left < contextBounds.right;
if (overlapsHorizontally && bounds.top > desiredTop) {
safeBottom = Math.min(safeBottom, bounds.top - 8);
}
}
const boundedTop = Math.max(
defaultTop,
Math.min(desiredTop, safeBottom - contextBounds.height),
);
this.context.style.setProperty(
'--cockpit-context-top',
`${boundedTop.toFixed(1)}px`,
);
this.context.style.removeProperty('--cockpit-context-max-height');
}
export function syncSignalLayout() {
@@ -138,8 +85,6 @@ export function syncSignalLayout() {
// The compact strip shows only an expanded control.
this.publishUtilityLayout(utilityLayoutView({ hideCollapsed: true }));
this.signalStream.style.removeProperty('--cockpit-signal-right');
this.signalStream.style.removeProperty('--cockpit-signal-top');
this.signalStream.style.removeProperty('--cockpit-signal-max-height');
return;
}
@@ -149,36 +94,6 @@ export function syncSignalLayout() {
'--cockpit-signal-right',
`${desktopInset.toFixed(1)}px`,
);
this.signalStream.style.removeProperty('--cockpit-signal-top');
this.signalStream.style.removeProperty('--cockpit-signal-max-height');
const cyber = document.documentElement.dataset.uiTheme === 'cyber';
const leftPanel = cyber
? document.querySelector('#left-panel-stack > #data-panel')
: null;
const alignedTop = isRenderedOnScreen(leftPanel)
? leftPanel.getBoundingClientRect().top
: null;
// Cyber's two rails share a top edge. Move the briefing below the collapsed
// strip rather than pulling the right rail upward to avoid it.
if (alignedTop !== null && utilityControls) {
const expanded = utilityControls.querySelector(
'.cockpit-utility-control.is-expanded',
);
if (!expanded) {
const signalTop = Math.max(
Math.max(255, Math.min(300, window.innerHeight * 0.28)),
alignedTop + utilityControls.getBoundingClientRect().height + 28,
);
this.signalStream.style.setProperty(
'--cockpit-signal-top',
`${signalTop.toFixed(1)}px`,
);
this.signalStream.style.setProperty(
'--cockpit-signal-max-height',
`${Math.max(44, window.innerHeight - signalTop - 80).toFixed(1)}px`,
);
}
}
const signalBounds = this.signalStream.getBoundingClientRect();
const utilityBounds = utilityControls?.getBoundingClientRect();
if (utilityBounds) {
@@ -203,42 +118,7 @@ export function syncSignalLayout() {
collapsedLauncher.scrollHeight,
)
: 0;
if (alignedTop !== null) {
const lane = resolveCyberCockpitPanelLane({
viewportHeight: window.innerHeight,
top: alignedTop,
launcherHeight: Math.max(
collapsedHeight,
collapsedLauncher?.getBoundingClientRect().height || 60,
),
signalHeight: this.signalCollapsed ? signalBounds.height : 44,
contactHeight:
this.contextCollapsed && this.context
? this.context.getBoundingClientRect().height
: 64,
});
document.body.style.setProperty(
'--cyber-cockpit-panel-height',
`${lane.panelHeight.toFixed(2)}px`,
);
this.publishUtilityLayout(
utilityLayoutView({
top: `${alignedTop.toFixed(2)}px`,
maxHeight: `${lane.utilityHeight.toFixed(2)}px`,
expandedMaxHeight: `${lane.panelHeight.toFixed(2)}px`,
}),
);
if (expandedControl) {
this.signalStream.style.setProperty(
'--cockpit-signal-top',
`${lane.signalTop.toFixed(2)}px`,
);
}
this.syncContextLayout();
return;
}
// Non-Cyber themes retain their independent REC/briefing corridor. Cyber
// uses the rendered Data Layers top after reserving briefing space above.
// The REC readout and the briefing card bound the utility corridor.
// The readout only anchors the strip while it is genuinely on screen:
// the Minimal variant drops it with `display:none`, but HUD Off hides the
// whole Intel HUD with `visibility`/`opacity`, which keeps its rect.
@@ -254,20 +134,8 @@ export function syncSignalLayout() {
collapsedHeight,
recGap: COCKPIT_UTILITY_REC_GAP_PX,
signalGap: COCKPIT_UTILITY_SIGNAL_GAP_PX,
minTopFloor: alignedTop ?? COCKPIT_UTILITY_MIN_TOP_PX,
minTopRatio: alignedTop !== null ? 0 : COCKPIT_UTILITY_MIN_TOP_RATIO,
signalCollapsed: this.signalCollapsed,
utilityExpanded: Boolean(expandedControl),
// Only Cyber relocates its collapsed briefing below the utility lane.
// Other themes keep the measured visible card as the lower boundary.
reserveViewportLane: document.documentElement.dataset.uiTheme === 'cyber',
// Cyber keeps the collapsed briefing reachable below the utility instead
// of hiding it. Reserve its actual height, including wrapped headings.
signalHeight:
document.documentElement.dataset.uiTheme === 'cyber' &&
this.signalCollapsed
? signalBounds.height
: 0,
minTopFloor: COCKPIT_UTILITY_MIN_TOP_PX,
minTopRatio: COCKPIT_UTILITY_MIN_TOP_RATIO,
});
const availableHeight = utilityAnchor.maxHeight;
const utilityLayout =
+3 -27
View File
@@ -379,7 +379,7 @@ test('the layout pass’s measured fit hides the collapsed control and marks the
app.unmount();
});
test('the real layout pass drives the mounted controls: compact hides the collapsed sibling, Cyber shows both', async (t) => {
test('the real layout pass drives the mounted controls: compact hides the collapsed sibling, desktop shows both', async (t) => {
document.body.replaceChildren();
const host = document.body.appendChild(document.createElement('div'));
const pinia = createPinia();
@@ -403,9 +403,6 @@ test('the real layout pass drives the mounted controls: compact hides the collap
window.matchMedia = (query) => ({ matches: compact, media: query });
t.after(() => {
window.matchMedia = originalMatchMedia;
delete document.documentElement.dataset.uiTheme;
document.body.style.removeProperty('opacity');
document.documentElement.style.removeProperty('opacity');
app.unmount();
});
const strip = document.getElementById('cockpit-utility-controls');
@@ -421,34 +418,13 @@ test('the real layout pass drives the mounted controls: compact hides the collap
assert.equal(cockpit.utilityLayout.top, null);
// Compact hides the sibling without marking the strip primary-only.
assert.equal(strip.classList.contains('layout-primary-only'), false);
// Cyber aligns the strip with the Data panel and keeps both controls.
// The desktop pass anchors the strip in its own corridor and keeps both.
compact = false;
document.documentElement.dataset.uiTheme = 'cyber';
const stack = document.body.appendChild(document.createElement('div'));
stack.id = 'left-panel-stack';
const dataPanel = stack.appendChild(document.createElement('section'));
dataPanel.id = 'data-panel';
for (const node of [
dataPanel,
stack,
document.body,
document.documentElement,
])
node.style.opacity = '1';
dataPanel.getBoundingClientRect = () => ({
top: 120,
bottom: 400,
left: 0,
right: 200,
width: 200,
height: 280,
});
syncSignalLayout.call(owner);
await nextTick();
assert.equal(display.getAttribute('aria-hidden'), 'false');
assert.equal(radioControl.getAttribute('aria-hidden'), 'false');
assert.equal(cockpit.utilityLayout.top, '120.00px');
assert.equal(strip.classList.contains('layout-primary-only'), false);
assert.match(cockpit.utilityLayout.top, /^\d+(\.\d+)?px$/);
});
test('the rail opens one panel at a time and reads as a disclosure', async (t) => {
+2 -3
View File
@@ -9,9 +9,8 @@ import { fileURLToPath } from 'node:url';
const HERE = path.dirname(fileURLToPath(import.meta.url));
const STYLES = path.join(HERE, 'styles');
const LOCALES = path.join(HERE, '..', 'i18n', 'locales');
// cyber.css carries decorative theme strings (LOC / GRID, SYS 06 // ...);
// street-level.css ' · ESC' is a key cap. Neither is UI copy.
const DECORATIVE = new Set(['cyber.css', 'street-level.css']);
// street-level.css ' · ESC' is a key cap, not UI copy.
const DECORATIVE = new Set(['street-level.css']);
test('no user-visible text in CSS content: outside decorative themes', () => {
const hits = [];
+4 -10
View File
@@ -38,7 +38,6 @@ export function getCyberSonarControlState(
intensityPct: settings.intensity,
opacityPct: settings.opacity,
sectorDeg: settings.sector,
cyberSelected: root?.dataset?.uiTheme === 'cyber',
mapSweepActive: isCyberSonarActive(options),
contactSweepActive:
root?.dataset?.cyberSonarGpu === 'supported' &&
@@ -59,10 +58,10 @@ export function setCyberSonarControls(
sonar: getCyberSonarControlState(doc, { hudActive: owner?.hud?.visible }),
});
if (!request || typeof request !== 'object' || Array.isArray(request)) {
return fail('Provide Cyber sonar settings as an object.');
return fail('Provide sonar settings as an object.');
}
const fields = Object.keys(request);
if (!fields.length) return fail('Provide at least one Cyber sonar setting.');
if (!fields.length) return fail('Provide at least one sonar setting.');
for (const field of fields) {
const value = request[field];
if (field === 'enabled') {
@@ -70,19 +69,14 @@ export function setCyberSonarControls(
continue;
}
if (!Object.hasOwn(SETTING_FIELDS, field)) {
return fail('Unknown Cyber sonar setting.');
return fail('Unknown sonar setting.');
}
const [, min, max] = SETTING_FIELDS[field];
if (!Number.isInteger(value) || value < min || value > max) {
return fail(`${field} must be an integer from ${min} to ${max}.`);
}
}
if (
owner.hud?.getVariant?.() !== 'cyber' ||
doc?.documentElement?.dataset?.uiTheme !== 'cyber'
) {
return fail('Cyber sonar controls require the Cyber HUD layout.');
}
owner.shareLinkManager?.claimRestoreLane?.('visual');
for (const [field, [setting]] of Object.entries(SETTING_FIELDS)) {
if (Object.hasOwn(request, field)) {
owner._setCyberSonarSetting(setting, request[field]);
+20 -9
View File
@@ -11,9 +11,9 @@ import { StyleManager } from './applicationShell.js';
import { VisualSettings } from './visualSettings.js';
import { readFileSync } from 'node:fs';
function fixture(theme = 'cyber') {
function fixture(layout = 'tactical') {
const root = {
dataset: { uiTheme: theme, cyberSonarGpu: 'supported' },
dataset: { cyberSonarGpu: 'supported' },
style: { setProperty() {} },
};
const flags = new Set();
@@ -27,7 +27,7 @@ function fixture(theme = 'cyber') {
};
const calls = [];
const owner = {
hud: { getVariant: () => theme },
hud: { getVariant: () => layout },
_setCyberSonarSetting(name, value) {
calls.push([name, value]);
const suffix = name[0].toUpperCase() + name.slice(1);
@@ -50,8 +50,15 @@ test('real runner and facade use visual settings, preserve visibility and return
visual.services = { governorRequestRender: (reason) => renders.push(reason) };
// No Display panel here: the controls' render is not under test.
visual._publishDisplay = () => {};
// The shell's share sync; a sonar change keeps the link current.
const shares = [];
visual._syncShareState = () => shares.push(true);
const owner = Object.create(StyleManager.prototype);
owner._visualSettings = visual;
const claims = [];
Object.defineProperty(owner, 'shareLinkManager', { value: {
claimRestoreLane: (lane) => claims.push({ lane, renders: renders.length }),
} });
Object.defineProperty(owner, 'hud', { value: f.owner.hud });
const viewer = {
camera: { moveEnd: { addEventListener() {} } },
@@ -65,19 +72,23 @@ test('real runner and facade use visual settings, preserve visibility and return
const runner = createGevActionRunner({ styleManager: owner, viewer, dataManager: {} });
const result = await runner('set_cyber_sonar', { enabled: false, intensityPct: 73, sectorDeg: 9 });
assert.equal(result.ok, true);
assert.deepEqual(claims, [{ lane: 'visual', renders: 0 }]);
assert.equal(result.sonar.intensityPct, 73);
assert.equal(result.sonar.sectorDeg, 9);
assert.equal(result.sonar.enabled, false);
assert.equal(f.root.dataset.uiTheme, 'cyber');
assert.equal(f.owner.hud.getVariant(), 'tactical');
assert.equal(f.hudFlags.has('active'), true);
assert.equal(renders.length, 3);
assert.equal(shares.length, 1);
const before = getCyberSonarControlState();
const invalid = await runner('set_cyber_sonar', { rings: 6, opacityPct: 0 });
assert.equal(invalid.ok, false);
assert.deepEqual(claims, [{ lane: 'visual', renders: 0 }], 'invalid requests claim no authority');
assert.deepEqual(getCyberSonarControlState(), before);
assert.equal(renders.length, 3);
const zero = await runner('set_cyber_sonar', { intensityPct: 0 });
assert.equal(zero.sonar.intensityPct, 0);
assert.deepEqual(claims.map(({ lane }) => lane), ['visual', 'visual']);
assert.equal(zero.sonar.enabled, false);
const unavailable = createGevActionRunner({ styleManager: {}, viewer, dataManager: {} });
assert.equal((await unavailable('set_cyber_sonar', { enabled: true })).ok, false);
@@ -136,11 +147,11 @@ test('rejects the whole invalid request before any mutation', () => {
}
});
test('requires Cyber and preserves off state and every omitted setting', () => {
for (const theme of ['tactical', 'minimal']) {
const f = fixture(theme);
assert.equal(setCyberSonarControls(f.owner, { enabled: true }, f.doc).ok, false);
assert.deepEqual(f.calls, []);
test('works under every HUD layout and preserves off state and every omitted setting', () => {
for (const layout of ['tactical', 'minimal']) {
const f = fixture(layout);
assert.equal(setCyberSonarControls(f.owner, { enabled: true }, f.doc).ok, true);
assert.deepEqual(f.calls, [['enabled', true]]);
}
const f = fixture();
f.root.dataset.cyberSonar = 'off';
-950
View File
@@ -1,950 +0,0 @@
import {
getScopeMaskFeather,
getScopeMaskOpacity,
isScopeMaskEnabled,
setScopeMaskEnabled,
setScopeMaskFeather,
setScopeMaskOpacity,
} from '../scopeMask.js';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import test from 'node:test';
import {
applyHudUiTheme,
CYBER_VISUAL_DEFAULTS,
cyberVisualDefaultsForHudTransition,
HUD_LAYOUTS,
normalizeHudLayout,
} from '../hudLayouts.js';
import { GEV_ACTION_SCHEMAS } from '../voice/actionSchemas.js';
import { createGevActionRunner } from '../voice/gevActions.js';
import { StyleManager } from './applicationShell.js';
import { createPinia } from 'pinia';
import { useDisplayStore } from './stores/display.js';
import { VisualSettings } from './visualSettings.js';
import { STYLES } from './visualPresets.js';
test('CCTV and Context keep their headers outside Cyber-only scroll bodies', () => {
for (const file of ['panels/CctvPanel.vue', 'ContextView.vue']) {
const markup = readFileSync(
new URL(`./views/${file}`, import.meta.url),
'utf8',
);
// The body wears the shared scrollbar skin where Cyber makes it scroll.
assert.match(
markup,
/class="cyber-panel-body ui-scroll" data-rail-scroller/,
);
assert.ok(
// The header is RailPanel's; the body is its first content.
markup.indexOf('<RailPanel ') > -1 &&
markup.indexOf('<RailPanel ') <
markup.indexOf('class="cyber-panel-body ui-scroll"'),
);
}
const shared = readFileSync(
new URL('./styles/controls.css', import.meta.url),
'utf8',
);
const cyber = readFileSync(
new URL('./styles/cyber.css', import.meta.url),
'utf8',
);
assert.match(shared, /\.cyber-panel-body\s*\{\s*display: contents;/);
assert.match(
cyber,
/:root\[data-ui-theme='cyber'\] \.cyber-panel-body\s*\{[^}]*overflow-y: auto;[^}]*overscroll-behavior: contain;/,
);
});
function styleOwner(t, initialVariant = 'cyber') {
const previous = { document: globalThis.document, window: globalThis.window };
const root = { dataset: {} };
globalThis.document = { documentElement: root, querySelectorAll: () => [] };
globalThis.window = { dispatchEvent() {} };
t.after(() => Object.assign(globalThis, previous));
let variant = initialVariant;
const calls = [];
const hud = {
getVariant: () => variant,
setVariant: (value) => {
// Normalize like the real HUD so retired layouts fall back.
variant = normalizeHudLayout(value);
applyHudUiTheme(root, variant);
},
setMode: (value) => calls.push(['mode', value]),
onStyleChange: (value) => calls.push(['style', value]),
};
hud.setVariant(initialVariant);
const owner = Object.create(VisualSettings.prototype);
Object.assign(owner, {
activeStyle: 'normal',
store: { publish() {} },
readHud: () => hud,
readShareLinks: () => ({ onStyleChange() {} }),
_visualEffects: {
stages: Object.fromEntries(
Object.entries(STYLES).map(([name, config]) => [
name,
{ uniforms: { ...config.uniforms, intensity: 0 } },
]),
),
},
services: { governorRequestRender() {}, setDetectionStyle() {} },
_setBloomEnabled: (value) => calls.push(['bloom', value]),
_setSharpenEnabled: (value) => calls.push(['sharpen', value]),
_applyDetectionPreset: (value) => calls.push(['detection', value]),
_syncShareState: () => calls.push(['share', variant]),
});
for (const name of [
'setCelestialRingEnabled',
'_startTransition',
'_publishActiveStyle',
'_updateSliderPanel',
'_updateHudButtonState',
'_syncIrBoost',
'_syncCockpitInheritedStyle',
'_syncCyberSonarControl',
'_scheduleAdaptivePanelLayout',
'_setDetectionFade',
// Intensities: the fixture has no post-process stages to drive.
'_setBloomIntensity',
'_setSharpenIntensity',
])
owner[name] = () => {};
return { owner, hud, root, calls };
}
test('visual styles retain Cyber through real preset application without dropping other defaults', (t) => {
const { owner, hud, root, calls } = styleOwner(t);
for (const style of [
'surveillance',
'normal',
'noir',
'anime',
'thermal',
'retro',
]) {
owner.setStyle(style);
assert.equal(owner.activeStyle, style);
assert.equal(hud.getVariant(), 'cyber');
assert.equal(root.dataset.uiTheme, 'cyber');
assert.deepEqual(calls.at(-1), ['share', 'cyber']);
}
assert.equal(owner.stages.thermal.uniforms.sensitivity, 0.85);
assert.equal(calls.filter(([name]) => name === 'detection').length, 3);
assert.equal(
calls.filter(([name, value]) => name === 'bloom' && value === false).length,
3,
);
assert.equal(
calls.filter(([name, value]) => name === 'sharpen' && value === true)
.length,
3,
);
});
test('non-Cyber style presets and explicit HUD choices remain authoritative', (t) => {
const { owner, hud, root } = styleOwner(t);
for (const variant of ['tactical', 'minimal']) {
owner._setHudVariant(variant);
assert.equal(hud.getVariant(), variant);
assert.equal(root.dataset.uiTheme, undefined);
owner.setStyle('normal');
owner.setStyle('surveillance');
assert.equal(hud.getVariant(), 'tactical');
}
});
test('leaving Cyber without a preset choice restores the prior visual preset', (t) => {
const { owner, hud } = styleOwner(t, 'tactical');
owner.setStyle('noir');
owner._setHudVariant('cyber', { applyVisualDefaults: true });
assert.equal(owner.activeStyle, 'thermal');
assert.equal(owner._preCyberStyle, 'noir');
assert.equal(owner._cyberStyleUserSelected, false);
owner._setHudVariant('minimal', { applyVisualDefaults: true });
assert.equal(hud.getVariant(), 'minimal');
assert.equal(owner.activeStyle, 'noir');
assert.equal(owner._preCyberStyle, null);
assert.equal(owner._cyberStyleUserSelected, false);
});
test('a preset explicitly selected in Cyber survives exit and resets for re-entry', (t) => {
const { owner, hud } = styleOwner(t, 'tactical');
owner.setStyle('noir');
owner._setHudVariant('cyber', { applyVisualDefaults: true });
owner.setStyle('anime', { userInitiated: true });
assert.equal(owner.activeStyle, 'anime');
assert.equal(owner._preCyberStyle, 'noir');
assert.equal(owner._cyberStyleUserSelected, true);
// Reselecting the active mode must not erase the user's preset intent.
owner._setHudVariant('cyber', { applyVisualDefaults: true });
assert.equal(owner._preCyberStyle, 'noir');
owner._setHudVariant('minimal', { applyVisualDefaults: true });
assert.equal(hud.getVariant(), 'minimal');
assert.equal(owner.activeStyle, 'anime');
assert.equal(owner._preCyberStyle, null);
assert.equal(owner._cyberStyleUserSelected, false);
// A later untouched Cyber round trip restores the new pre-Cyber preset.
owner._setHudVariant('cyber', { applyVisualDefaults: true });
assert.equal(owner.activeStyle, 'thermal');
assert.equal(owner._preCyberStyle, 'anime');
owner._setHudVariant('minimal', { applyVisualDefaults: true });
assert.equal(owner.activeStyle, 'anime');
});
test('an explicit same-value FLIR choice is preserved on Cyber exit', (t) => {
const { owner } = styleOwner(t, 'tactical');
owner.setStyle('noir');
owner._setHudVariant('cyber', { applyVisualDefaults: true });
owner.setStyle('thermal', { userInitiated: true });
assert.equal(owner.activeStyle, 'thermal');
assert.equal(owner._cyberStyleUserSelected, true);
owner._setHudVariant('minimal', { applyVisualDefaults: true });
assert.equal(owner.activeStyle, 'thermal');
});
test('an authoritative same-Cyber reset clears local preset ownership', (t) => {
const { owner } = styleOwner(t, 'tactical');
owner.setStyle('noir');
owner._setHudVariant('cyber', { applyVisualDefaults: true });
owner.setStyle('anime', { userInitiated: true });
assert.equal(owner._cyberStyleUserSelected, true);
owner._setHudVariant('cyber');
assert.equal(owner.activeStyle, 'anime');
assert.equal(owner._preCyberStyle, null);
assert.equal(owner._cyberStyleUserSelected, false);
owner._setHudVariant('minimal', { applyVisualDefaults: true });
assert.equal(owner.activeStyle, 'anime');
});
test('Display and voice HUD routes preserve explicit Cyber entry and exit authority', async (t) => {
const makeOwner = () => {
const { owner, hud } = styleOwner(t, 'tactical');
owner.setStyle('noir');
owner.setHudLayout = (...args) =>
StyleManager.prototype.setHudLayout.call(owner, ...args);
owner.getControlState = () => ({
hud: { layout: hud.getVariant(), visible: true },
});
return { owner, hud };
};
const display = makeOwner();
// The Display panel's layout select and the dock's style buttons call
// these actions through the display store.
const store = useDisplayStore(createPinia());
const token = store.connect({
setHudLayout: (value) => display.owner.setHudLayout(value),
setStyle: (value) => display.owner.setStyle(value, { userInitiated: true }),
});
store.act('setHudLayout', 'cyber');
assert.equal(display.hud.getVariant(), 'cyber');
assert.equal(display.owner.activeStyle, 'thermal');
store.act('setStyle', 'anime');
assert.equal(display.owner.activeStyle, 'anime');
store.act('setHudLayout', 'minimal');
assert.equal(display.hud.getVariant(), 'minimal');
assert.equal(display.owner.activeStyle, 'anime');
store.detach(token);
const voice = makeOwner();
const eventSource = { addEventListener() {}, removeEventListener() {} };
const viewer = {
camera: { moveEnd: { addEventListener() {} } },
clock: { onTick: { addEventListener: () => () => {} } },
canvas: eventSource,
scene: { canvas: eventSource },
};
const runVoiceAction = createGevActionRunner({
viewer,
styleManager: voice.owner,
dataManager: {},
});
const entered = await runVoiceAction('set_hud', { layout: 'cyber' });
assert.equal(entered.ok, true);
assert.equal(voice.hud.getVariant(), 'cyber');
assert.equal(voice.owner.activeStyle, 'thermal');
const selected = await runVoiceAction('set_visual_style', { style: 'anime' });
assert.equal(selected.ok, true);
assert.equal(voice.owner.activeStyle, 'anime');
const exited = await runVoiceAction('set_hud', { layout: 'minimal' });
assert.equal(exited.ok, true);
assert.equal(voice.hud.getVariant(), 'minimal');
assert.equal(voice.owner.activeStyle, 'anime');
});
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); });
Object.assign(owner.services, { setScopeMaskEnabled, setScopeMaskFeather });
let shown = null;
owner.store = { publish: (view) => (shown = view.scope) };
await owner.restoreShareState({ scopeEnabled: false, scopeFeatherPct: 200 });
assert.deepEqual(shown, { enabled: false, featherPct: 200, opacityPct: 100 });
for (const layout of ['minimal', 'cyber', 'tactical']) {
owner._setHudVariant(layout, { applyVisualDefaults: true });
assert.equal(isScopeMaskEnabled(), false, layout);
assert.equal(getScopeMaskFeather(), 2, layout);
assert.equal(shown.enabled, false, layout);
}
await owner.applyVisualState({ scope: { enabled: true, featherPct: 175 } });
assert.equal(isScopeMaskEnabled(), true);
assert.equal(getScopeMaskFeather(), 1.75);
assert.deepEqual(shown, { enabled: true, featherPct: 175, opacityPct: 100 });
await owner.applyVisualState({ scope: { featherPct: 500 } });
assert.equal(getScopeMaskFeather(), 2);
assert.deepEqual(shown, { enabled: true, featherPct: 200, opacityPct: 100 });
});
test('a shared scope opacity is restored and rides in the next share state', async (t) => {
const { owner } = styleOwner(t, 'tactical');
const previous = getScopeMaskOpacity();
t.after(() => setScopeMaskOpacity(previous));
Object.assign(owner.services, {
setScopeMaskEnabled() {},
setScopeMaskFeather() {},
setScopeMaskOpacity,
});
let shown = null;
owner.store = { publish: (view) => (shown = view.scope) };
await owner.restoreShareState({ scopeOpacityPct: 60 });
assert.equal(getScopeMaskOpacity(), 0.6);
assert.equal(shown.opacityPct, 60);
// A state without it leaves the opacity alone.
await owner.restoreShareState({ scopeFeatherPct: 80 });
assert.equal(getScopeMaskOpacity(), 0.6);
assert.equal(shown.opacityPct, 60);
Object.assign(owner.services, {
getDetectionTuning: () => ({ allocationStrategy: 'ELASTIC' }),
getDetectionMode: () => 'OFF',
isScopeMaskEnabled: () => true,
getScopeMaskFeather: () => 0.8,
getScopeMaskOpacity,
getScopeTerminusOverride: () => null,
});
owner.readCelestialRing = () => null;
assert.equal(owner._readShareState().options.scopeOpacityPct, 60);
// A link asking for less than the floor opens at the floor, and says so.
await owner.restoreShareState({ scopeOpacityPct: 20 });
assert.equal(getScopeMaskOpacity(), 0.5);
assert.equal(owner._readShareState().options.scopeOpacityPct, 50);
});
test('a scene shot saved with the retired Snow style plays on Normal', async (t) => {
const { owner } = styleOwner(t, 'tactical');
owner.setStyle('noir');
await owner.applyVisualState({ style: 'snow' });
assert.equal(owner.activeStyle, 'normal');
});
test('scene and share HUD transitions do not restore a local pre-Cyber preset', async (t) => {
const { owner, hud } = styleOwner(t, 'tactical');
owner.setStyle('noir');
owner._setHudVariant('cyber', { applyVisualDefaults: true });
owner.setStyle('anime', { userInitiated: true });
assert.equal(owner._cyberStyleUserSelected, true);
await owner.applyVisualState({ style: 'retro', hud: { variant: 'cyber' } });
assert.equal(hud.getVariant(), 'cyber');
assert.equal(owner.activeStyle, 'retro');
assert.equal(owner._preCyberStyle, null);
assert.equal(owner._cyberStyleUserSelected, false);
owner._setHudVariant('minimal', { applyVisualDefaults: true });
assert.equal(owner.activeStyle, 'retro');
owner.setStyle('surveillance');
owner._setHudVariant('cyber', { applyVisualDefaults: true });
assert.equal(owner._preCyberStyle, 'surveillance');
owner.setStyle('anime', { userInitiated: true });
await owner.restoreShareState({
style: 'thermal',
hudVariant: 'cyber',
});
assert.equal(hud.getVariant(), 'cyber');
assert.equal(owner.activeStyle, 'thermal');
assert.equal(owner._preCyberStyle, null);
assert.equal(owner._cyberStyleUserSelected, false);
owner._setHudVariant('tactical', { applyVisualDefaults: true });
assert.equal(owner.activeStyle, 'thermal');
assert.equal(owner._preCyberStyle, null);
});
test('scene and share restoration override Cyber and preserve restored Cyber parameters', async (t) => {
const { owner, hud } = styleOwner(t);
await owner.applyVisualState({ style: 'retro', hud: { variant: 'minimal' } });
assert.equal(hud.getVariant(), 'minimal');
owner._setHudVariant('cyber');
await owner.restoreShareState({
style: 'surveillance',
hudVariant: 'operator',
});
// A link saved with the retired Operator layout restores as Tactical.
assert.equal(hud.getVariant(), 'tactical');
await owner.restoreShareState({
style: 'thermal',
hudVariant: 'cyber',
styleParams: { palette: 0.73 },
});
assert.equal(hud.getVariant(), 'cyber');
assert.equal(owner.activeStyle, 'thermal');
assert.equal(owner.stages.thermal.uniforms.palette, 0.73);
owner._setHudVariant('cyber', { applyVisualDefaults: true });
assert.equal(owner.stages.thermal.uniforms.palette, 0.73);
owner._setHudVariant('tactical');
owner._setHudVariant('cyber', { applyVisualDefaults: true });
assert.equal(owner.stages.thermal.uniforms.palette, 0.42);
});
const read = (relative) =>
readFileSync(new URL(relative, import.meta.url), 'utf8');
test('Cyber setup uses a compact toolbar icon and highlights the north-up letter', () => {
const css = read('./styles/cyber.css');
assert.match(
css,
/#top-center-actions #key-setup-chip\s*\{[^}]*inset: auto;[^}]*width: 36px;/,
);
assert.match(css, /#key-setup-chip\[hidden\]\s*\{\s*display: none;/);
assert.match(
css,
/#north-up-view\[data-north-up='true'\]\s+\.camera-compass-n\s*\{[^}]*color: var\(--cyber-red-bright\)/,
);
});
const cyberStyles = read('./styles/cyber.css');
// Source guards supplement rendered popup/hit-target checks. Inspect one rule
// at a time so a safe declaration on a child cannot excuse a clipped ancestor.
function cssRuleBody(styles, selector) {
const match = styles.match(new RegExp(`${selector.source}\\s*\\{([^}]+)\\}`));
assert.ok(match, `Missing CSS rule: ${selector.source}`);
return match[1];
}
test('Cyber Voice clips its decoration without clipping descendant help and errors', () => {
const owner = cssRuleBody(
cyberStyles,
/:root\[data-ui-theme='cyber'\] #command-dock > #gev-voice-control/,
);
assert.match(owner, /isolation:\s*isolate;/);
assert.match(owner, /overflow:\s*visible;/);
assert.match(owner, /clip-path:\s*none;/);
const decoration = cssRuleBody(
cyberStyles,
/:root\[data-ui-theme='cyber'\] #command-dock > #gev-voice-control::before/,
);
assert.match(decoration, /clip-path:\s*polygon\(/);
assert.match(decoration, /pointer-events:\s*none;/);
assert.match(decoration, /inset:\s*0;/);
assert.match(decoration, /z-index:\s*-1;/);
});
test('Cyber dock pins escape the tray mask and its decoration overrides the legacy arrow geometry', () => {
const owner = cssRuleBody(
cyberStyles,
/:root\[data-ui-theme='cyber'\] #command-dock \.dock-popover-content/,
);
assert.match(owner, /clip-path:\s*none;/);
assert.match(owner, /isolation:\s*isolate;/);
// Including the tray owners beats #control-panel's more specific old
// ::after arrow positioning. Otherwise left:auto can collapse the frame.
const decoration = cssRuleBody(
cyberStyles,
/:root\[data-ui-theme='cyber'\]\s+#command-dock\s+:is\(#location-bar, #control-panel\)\s+\.dock-popover-content::after/,
);
assert.match(decoration, /inset:\s*0;/);
assert.match(decoration, /width:\s*auto;/);
assert.match(decoration, /height:\s*auto;/);
assert.match(decoration, /transform:\s*none;/);
assert.match(decoration, /clip-path:\s*var\(--cyber-panel-frame\);/);
assert.match(decoration, /pointer-events:\s*none;/);
});
test('Cyber lower-left telemetry tracks the credit anchor with clearance for its logo row', () => {
const telemetry = cssRuleBody(
cyberStyles,
/#intel-hud\[data-variant='cyber'\] \.hud-bottom-left/,
);
const offset = telemetry.match(/bottom:\s*calc\(2vh \+ ([\d.]+)rem \+ var\(--world-timeline-lift, 0px\)\);/);
assert.ok(offset, 'telemetry must retain the attribution viewport anchor');
const credits = read('./styles/command-dock-trays.css');
const creditOffsets = [
...credits.matchAll(
/#cesium-credits\s*\{[^}]*bottom:\s*calc\(2vh \+ ([\d.]+)rem \+ var\(--world-timeline-lift, 0px\)\);/g,
),
];
assert.ok(creditOffsets.length > 0);
for (const credit of creditOffsets) {
assert.ok(
Number(offset[1]) - Number(credit[1]) >= 2.75,
'reserve the 28px logo row, baseline descent and 12px clearance at the 16px root size',
);
}
assert.doesNotMatch(cyberStyles, /\.hud-bottom-left\s*\{\s*bottom:\s*60px;/);
});
test('shared panel hooks affect only opted-in rail surfaces without overriding disclosure and concealment', () => {
const styles = read('./styles/panel-surfaces.css');
const rail = cssRuleBody(
styles,
/:is\(#left-panel-stack, #right-context-rail\)\s+> \[data-panel-id\]:has\(> \[data-panel-surface\]\)/,
);
assert.match(rail, /pointer-events:\s*auto;/);
assert.doesNotMatch(rail, /(?:display|visibility):/);
assert.doesNotMatch(
styles,
/:is\(#left-panel-stack, #right-context-rail\)\s*> \[data-panel-id\]\s*\{/,
);
assert.match(
styles,
/\[data-panel-surface\]:not\(\[hidden\]\):not\(dialog:not\(\[open\]\)\)\s*\{\s*display: flex;/,
);
assert.match(
styles,
/dialog\[data-panel-surface\]:not\(\[open\]\)\s*\{\s*display: none !important;/,
);
assert.match(
styles,
/body:is\(\.ui-clean-view, \.recording-mode\)[^{]+\{[^}]*visibility: hidden !important;[^}]*pointer-events: none !important;/,
);
});
test('Cyber clipped expand controls retain an inset keyboard-focus outline in map and cockpit', () => {
assert.match(
cyberStyles,
/:root\[data-ui-theme='cyber'\]\s+:is\(\s*\.panel-collapse-btn,\s*body\.cockpit-mode \.cockpit-utility-glyph\s*\):focus-visible\s*\{[^}]*outline: 2px solid var\(--cyber-red-bright\) !important;[^}]*outline-offset: -3px;[^}]*box-shadow: none;/,
);
assert.match(
cyberStyles,
/:root\[data-ui-theme='cyber'\]\s+:is\(\.panel-collapse-btn, body\.cockpit-mode \.cockpit-utility-glyph\):is\(\s*:hover,\s*:focus-visible\s*\)\s*\{[^}]*border-color: var\(--cyber-red-bright\);/,
);
});
test('Cyber Radio retains upstream nested Context ownership', () => {
assert.doesNotMatch(cyberStyles, /#right-context-rail\s*>\s*#radio-panel/);
});
test('Cyber cockpit launchers share Data Layers frame and expand-control treatment', () => {
assert.match(
cyberStyles,
/:is\(\.panel-collapse-btn, body\.cockpit-mode \.cockpit-utility-glyph\)/,
);
assert.match(
cyberStyles,
/body\.cockpit-mode \.cockpit-utility-launcher \{[^}]*width: var\(--cyber-panel-width\);[^}]*min-height: 60px;[^}]*clip-path: var\(--cyber-panel-frame\);/,
);
assert.match(
cyberStyles,
/\.cockpit-utility-glyph::after \{\s*content: '\+';/,
);
assert.match(
cyberStyles,
/\.cockpit-utility-glyph\[aria-expanded='true'\]::after \{\s*content: '−';/,
);
assert.match(
cyberStyles,
/\.cockpit-utility-control\.is-expanded\s+\.cockpit-utility-launcher \{[^}]*width: 100%;[^}]*clip-path: none;/,
);
});
test('Cyber side panels share one width and one framed surface material', () => {
assert.match(cyberStyles, /--cyber-panel-width: 272px;/);
assert.match(cyberStyles, /--cyber-right-panel-width: 312px;/);
assert.match(cyberStyles, /--cyber-panel-collapsed-width: 200px;/);
assert.match(cyberStyles, /--cyber-panel-control-size: 30px;/);
assert.match(
cyberStyles,
/--cyber-panel-surface: rgba\(18, 24, 27, 0\.92\);/,
);
assert.match(
cyberStyles,
/\.cockpit-utility-control\.is-expanded \{[\s\S]*?width: var\(--cyber-right-panel-width\);[\s\S]*?background-color: var\(--cyber-panel-surface\);[\s\S]*?background-image: var\(--cyber-panel-surface-detail\);[\s\S]*?clip-path: var\(--cyber-panel-frame\);/,
);
assert.match(
cyberStyles,
/\.cockpit-utility-control\.is-expanded::after \{[\s\S]*?width: 36px;[\s\S]*?border-top: 1px solid rgba\(225, 102, 102, 0\.84\);/,
);
assert.match(
cyberStyles,
/#global-context-panel #radio-panel\.collapsed \{\s*width: 100%;/,
);
assert.match(
cyberStyles,
/#left-panel-stack\s*> :is\(#data-panel, #utilities-panel, #scene-panel\)\.collapsed \{\s*width: var\(--cyber-panel-collapsed-width\);/,
);
assert.match(
cyberStyles,
/:is\(#data-panel, #utilities-panel, #scene-panel\)\.collapsed\s+:is\(\.data-panel-inner, \.utilities-panel-inner, \.scene-panel-inner\) \{[\s\S]*?height: 50px;[\s\S]*?min-height: 50px;/,
);
assert.match(
cyberStyles,
/\.cockpit-utility-control:not\(\.is-expanded\)\s+\.cockpit-utility-launcher \{\s*width: var\(--cyber-panel-collapsed-width\);/,
);
assert.match(
cyberStyles,
/#pp-toggles\s*> \.pp-header-row\s+\.pp-collapse-btn \{[\s\S]*?width: var\(--cyber-panel-control-size\);[\s\S]*?height: var\(--cyber-panel-control-size\);/,
);
assert.match(
cyberStyles,
/#right-context-rail\s+:is\(\s*\.cctv-panel-inner,\s*\.weather-panel-inner,\s*\.recent-imagery-panel-inner,\s*\.street-level-panel-inner,\s*\.global-context-panel-inner\s*\) \{\s*padding-inline-end: 8px;/,
);
assert.match(
cyberStyles,
/#right-context-rail[\s\S]*?:is\(\s*#cctv-panel,\s*#weather-panel,\s*#recent-imagery-panel,\s*#street-level-panel,\s*#global-context-panel\s*\)\.collapsed[\s\S]*?> \.panel-header \{[\s\S]*?height: 48px;[\s\S]*?padding: 0 10px 0 14px;/,
);
assert.doesNotMatch(
cyberStyles,
/\.cockpit-utility-control\.is-expanded\s*\{[^}]*order:/,
'expanded Cockpit utilities must retain Display-then-Radio DOM order',
);
});
test('Cyber is a canonical HUD layout with a safe Tactical fallback', () => {
assert.deepEqual(HUD_LAYOUTS, ['tactical', 'minimal', 'cyber']);
assert.equal(normalizeHudLayout('CYBER'), 'cyber');
assert.equal(normalizeHudLayout('operator'), 'tactical');
assert.equal(normalizeHudLayout('unknown'), 'tactical');
});
test('the Cyber HUD owns the global shell skin and leaving it restores defaults', () => {
const root = { dataset: { unrelated: 'preserved' } };
assert.equal(applyHudUiTheme(root, 'cyber'), 'cyber');
assert.equal(root.dataset.uiTheme, 'cyber');
assert.equal(applyHudUiTheme(root, 'minimal'), null);
assert.equal(root.dataset.uiTheme, undefined);
assert.equal(root.dataset.unrelated, 'preserved');
});
test('an explicit transition into Cyber selects FLIR with Ironbow 0.42 once', () => {
assert.deepEqual(CYBER_VISUAL_DEFAULTS, {
style: 'thermal',
ironbow: 0.42,
});
assert.equal(
cyberVisualDefaultsForHudTransition('tactical', 'cyber', {
explicit: true,
}),
CYBER_VISUAL_DEFAULTS,
);
assert.equal(
cyberVisualDefaultsForHudTransition('cyber', 'cyber', {
explicit: true,
}),
null,
);
assert.equal(cyberVisualDefaultsForHudTransition('tactical', 'cyber'), null);
assert.equal(
cyberVisualDefaultsForHudTransition('cyber', 'minimal', {
explicit: true,
}),
null,
);
});
test('Cyber visual defaults update the style, thermal palette and render state', () => {
const calls = [];
const owner = {
stages: { thermal: { uniforms: { palette: 0 } } },
services: {
governorRequestRender: (reason) => calls.push(['render', reason]),
},
setStyle: (style, options) => calls.push(['style', style, options]),
_updateSliderPanel: (style, options) =>
calls.push(['sliders', style, options]),
};
VisualSettings.prototype._applyCyberVisualDefaults.call(
owner,
CYBER_VISUAL_DEFAULTS,
);
assert.equal(owner.stages.thermal.uniforms.palette, 0.42);
assert.deepEqual(calls, [
[
'style',
'thermal',
{
applyPreset: false,
revealParameters: false,
preserveCyberRestore: true,
},
],
['sliders', 'thermal', { reveal: false }],
['render', 'cyber-visual-defaults'],
]);
});
test('the Display selector, voice schema and final stylesheet expose Cyber', () => {
const display = read('./views/panels/DisplayPanel.vue');
const stylesheet = read('../../style.css');
const rightRail = read('./rightPanelRail.js');
const hud = read('../hud.js');
const hudView = read('./views/IntelHudView.vue');
const detection = read('../data/detection.js');
const aircraftModels = read('../data/aircraftModelLayer.js');
const setHud = GEV_ACTION_SCHEMAS.find((schema) => schema.name === 'set_hud');
assert.match(display, /<option value="cyber">\{\{ t\('Cyber'\) \}\}<\/option>/);
assert.match(display, /id="cyber-sonar-toggle"/);
assert.match(
display,
/id="cyber-sonar-opacity"[^>]*:model-value="sonar\?\.opacity \?\? 84" :aria-label="t\('Cyber contact and label opacity'\)"/,
);
assert.match(display, /id="cyber-sonar-sector"/);
assert.deepEqual(setHud.parameters.properties.layout.enum, HUD_LAYOUTS);
assert.match(stylesheet, /@import '\.\/src\/ui\/styles\/cyber\.css';\s*$/);
assert.match(cyberStyles, /:root\[data-ui-theme='cyber'\]/);
assert.match(cyberStyles, /\.material-symbols-outlined/);
assert.match(cyberStyles, /\.pp-label/);
assert.match(cyberStyles, /#intel-hud\[data-variant='cyber'\]/);
assert.match(cyberStyles, /#left-panel-stack/);
assert.match(cyberStyles, /#right-context-rail/);
assert.match(cyberStyles, /#command-dock/);
assert.match(cyberStyles, /--cyber-panel-frame: polygon/);
assert.match(cyberStyles, /\.data-panel-inner,/);
assert.match(cyberStyles, /#pp-toggles\.collapsed > \.pp-header-row/);
assert.match(
cyberStyles,
/\.panel-collapsible:not\(#location-bar\):not\(#control-panel\)::after/,
);
assert.match(cyberStyles, /clip-path: var\(--cyber-panel-frame\);/);
assert.match(hudView, /class="hud-sonar" aria-hidden="true"/);
assert.match(cyberStyles, /\.hud-sonar::before/);
assert.match(cyberStyles, /\.hud-sonar::after/);
assert.match(cyberStyles, /@keyframes cyber-sonar-sweep/);
assert.match(
cyberStyles,
/animation-delay:\s*var\(--cyber-sonar-phase-delay, 0ms\)/,
);
assert.doesNotMatch(cyberStyles, /--cyber-sonar-angle/);
assert.match(cyberStyles, /prefers-reduced-motion: reduce/);
assert.match(detection, /candidate\.sonarFactor \?\? 1/);
assert.match(detection, /sonarActive && !obj\.skipLabel/);
assert.match(detection, /const bracketAlpha = admissionAlpha \* sonarFactor/);
assert.match(detection, /sonarSampler\.label\(sonarFactor\)/);
assert.match(detection, /createCyberSonarSampler\(width, height, now\)/);
assert.match(cyberStyles, /data-cyber-sonar='off'/);
assert.match(detection, /governorRequestRender\('cyber-sonar-cadence'\)/);
assert.match(
detection,
/const animatingCount = countAnimatingRenderEntries\(renderEntries\);/,
);
assert.doesNotMatch(detection, /sonarActive \? 1 : 0/);
assert.match(
aircraftModels,
/alpha: state\._irBoost\s*\?\s*1\s*:\s*aircraftTreatmentAlpha\(/,
);
assert.match(
cyberStyles,
/#title-bar \.title-logo #globe \{[\s\S]*?fill: var\(--cyber-red\);[\s\S]*?stroke: var\(--cyber-red-bright\);/,
);
assert.match(cyberStyles, /#title-bar \.title-logo #globe_cage/);
assert.match(
cyberStyles,
/#top-center-actions button\s*\{[\s\S]*?border-radius:\s*0;[\s\S]*?clip-path:\s*polygon\(\s*29% 0,\s*71% 0,[\s\S]*?0 29%\s*\);/,
);
assert.match(cyberStyles, /#top-center-actions button::before/);
assert.match(cyberStyles, /\.hud-top-left/);
assert.match(cyberStyles, /transparent 0 min\(40vw, 52vh\)/);
assert.match(cyberStyles, /\.hud-bottom-bar \{\s*display: none;/);
assert.doesNotMatch(cyberStyles, /\.hud-top-bar/);
// Cyber shares the measured rail/credit keep-out rather than overriding it.
assert.doesNotMatch(
cyberStyles,
/#right-context-rail\s*\{[^}]*\b(?:top|bottom|height|max-height):/,
);
assert.match(cyberStyles, /--cyber-hud-card-top: max\(100px, 10\.25vh\);/);
assert.match(
cyberStyles,
/--cyber-left-rail-top: max\([\s\S]*?220px,[\s\S]*?calc\(var\(--cyber-hud-card-top\) \+ 120px\)/,
);
assert.match(
cyberStyles,
/\.hud-top-left \{[\s\S]*?top: var\(--cyber-hud-card-top\);/,
);
assert.match(
cyberStyles,
/#left-panel-stack \{[\s\S]*?top: var\(--cyber-left-rail-top\) !important;[\s\S]*?bottom: calc\(2vh \+ 13rem \+ var\(--world-timeline-lift, 0px\)\);/,
);
assert.match(
cyberStyles,
/\.hud-left-edge \{\s*top: calc\(var\(--cyber-left-rail-top\) - 18px\);\s*left: 14px;/,
);
assert.match(
rightRail,
/const leftStackTop = settledLeftRailTop\([\s\S]*?const alignedTop = Number\.isFinite\(leftStackTop\)[\s\S]*?baseTop: alignedTop,/,
);
assert.match(
cyberStyles,
/--right-display-collapsed-width: var\(--cyber-panel-collapsed-width\);/,
);
assert.match(
cyberStyles,
/clip-path: polygon\([\s\S]*?12px 0,[\s\S]*?0 12px/,
);
assert.match(cyberStyles, /\.hud-corner::before/);
assert.match(
cyberStyles,
/--cyber-telemetry-fill: rgba\(13, 20, 23, 0\.985\);/,
);
assert.match(cyberStyles, /var\(--cyber-telemetry-fill\)/);
assert.match(cyberStyles, />\s*\.panel-header\s+\.panel-title::before/);
assert.match(cyberStyles, /\.panel-collapsible\.collapsed::after/);
assert.match(cyberStyles, /\.panel-collapsible:not\(\.collapsed\)::after/);
assert.match(cyberStyles, /\.context-mode-standby:not\(\[hidden\]\)/);
// The base standby is borderless plain text, so the focus card must name its
// own frame width and centring rather than inherit them.
assert.match(
cyberStyles,
/\.context-mode-standby:not\(\[hidden\]\) \{[^}]*place-content: center;[^}]*border: 1px solid[^}]*text-align: center;/,
);
assert.match(
cyberStyles,
/:root\[data-ui-theme='cyber'\] \.global-context-modes \{[^}]*border: 0;/,
);
assert.match(cyberStyles, /mask-image: linear-gradient\(/);
assert.match(cyberStyles, /flex: 1 1 auto;/);
assert.match(cyberStyles, /#left-panel-stack:has/);
assert.match(
cyberStyles,
/inset-inline-start: calc\(54px \+ var\(--panel-rail-clearance\)\);/,
);
assert.match(cyberStyles, /right: calc\(51px \+ var\(--panel-rail-clearance\)\);/);
// Each side's edge line shows only beside an open panel.
assert.match(
cyberStyles,
/#left-panel-stack:has\(> \[data-panel-id\]:not\(\.collapsed, \[hidden\]\)\) \{\s*border-inline-start-color:/,
);
assert.match(
cyberStyles,
/#right-context-rail:has\(> \[data-panel-id\]:not\(\.collapsed, \[hidden\]\)\) \{\s*border-inline-end-color:/,
);
assert.match(cyberStyles, /bottom: calc\(2vh \+ 13rem \+ var\(--world-timeline-lift, 0px\)\);/);
assert.doesNotMatch(cyberStyles, /NAV 01 \/\/ COMMAND BUS \/\/ VIS 03/);
assert.match(cyberStyles, /data-layer-id='satellites'/);
assert.match(cyberStyles, /#search-toggle::before/);
assert.match(cyberStyles, /VISUAL MATRIX \/\/ 03/);
assert.match(cyberStyles, /body\.cockpit-mode #cockpit-hud/);
assert.match(cyberStyles, /TARGET SCANNING \/\/ LIVE VECTOR/);
assert.match(
cyberStyles,
/body\.cockpit-mode #global-loading-status \{[\s\S]*?top: 60px;[\s\S]*?z-index: 146;/,
);
assert.match(
cyberStyles,
/body\.cockpit-mode #global-loading-detail \{[\s\S]*?color: var\(--cockpit-accent\);/,
);
assert.match(cyberStyles, /body\.cockpit-mode \.cockpit-visor-shell::before/);
assert.match(cyberStyles, /body\.cockpit-mode \.cockpit-scan-array/);
assert.match(cyberStyles, /body\.cockpit-mode \.cockpit-target-side-arcs/);
assert.match(cyberStyles, /body\.cockpit-mode \.cockpit-target-ticks/);
assert.match(cyberStyles, /body\.cockpit-mode \.cockpit-target-core/);
assert.match(cyberStyles, /width: min\(48vw, 60vh\);/);
assert.match(cyberStyles, /body\.cockpit-mode \.cockpit-context-window/);
assert.match(cyberStyles, /body\.cockpit-mode \.cockpit-signal-window/);
assert.match(cyberStyles, /body\.cockpit-mode #intel-hud\.active/);
});
test('Cyber voice telemetry renders a live scan scope without replacing audio ownership', () => {
assert.match(
cyberStyles,
/#gev-voice-control\s*\{[\s\S]*?--cyber-voice-wave:/,
);
assert.match(cyberStyles, /\.gev-voice-visualizer::before/);
assert.match(cyberStyles, /\.gev-voice-visualizer::after/);
assert.match(cyberStyles, /@keyframes gev-cyber-voice-scan/);
assert.match(cyberStyles, /@keyframes gev-cyber-voice-lock/);
assert.match(cyberStyles, /\[data-speaker='user'\]/);
assert.match(cyberStyles, /\[data-speaker='ai'\]/);
assert.match(
cyberStyles,
/prefers-reduced-motion: reduce[\s\S]*?gev-voice-visualizer::after[\s\S]*?animation: none/,
);
});
test('Cyber Cockpit Display uses the released briefing lane instead of the legacy viewport cap', () => {
assert.match(
cyberStyles,
/body\.cockpit-mode\s+#cockpit-display-panel\s*\{[\s\S]*?max-height:\s*calc\(var\(--cockpit-utility-expanded-max-height, 72vh\) - 62px\)/,
);
assert.match(
cyberStyles,
/#cockpit-hud:has\(\.cockpit-utility-control\.is-expanded\)[\s\S]*?\.cockpit-signal-window\[data-collapsed='true'\][\s\S]*?bottom: 80px;[\s\S]*?visibility:\s*visible/,
);
});
test('Cyber Cockpit keeps Data Layers inside its bounded rail', () => {
assert.match(
cyberStyles,
/body:not\(\.cockpit-mode\)\s+#left-panel-stack:has\([\s\S]*?max-height:\s*none;/,
);
assert.match(
cyberStyles,
/body\.cockpit-mode\s+#left-panel-stack\s+> :is\(#data-panel, #utilities-panel\) \{[\s\S]*?max-height: min\(64vh, 610px\);/,
);
});
test('Cyber desktop cockpit collapsed utility frames match the 50px Data Layers frame', () => {
const desktop = cyberStyles.slice(
cyberStyles.indexOf('@media (min-width: 961px) and (min-height: 650px)'),
cyberStyles.indexOf('@media (max-width: 720px)'),
);
assert.match(
desktop,
/:root\[data-ui-theme='cyber'\]\s+body\.cockpit-mode\s+\.cockpit-utility-control:not\(\.is-expanded\)\s+\.cockpit-utility-launcher\s*\{\s*height: 50px;\s*min-height: 50px;\s*padding: 9px 18px 9px 24px;/,
);
assert.match(
desktop,
/\.cockpit-utility-control:not\(\.is-expanded\)\s+\.cockpit-utility-launcher::after\s*\{\s*bottom: 6px;/,
);
});
test('Cyber right panels preserve intrinsic sizing and the shared rail allocation', () => {
assert.doesNotMatch(
cyberStyles.slice(cyberStyles.indexOf(":root[data-ui-theme='cyber'] {")),
/#right-context-rail\s*>[^{}]+\{[^{}]*\b(?:flex|height|max-height):/,
);
});
test('Cyber panels retain clean edges without the added footer band', () => {
assert.doesNotMatch(cyberStyles, /--cyber-panel-foot-/);
assert.doesNotMatch(cyberStyles, /border-bottom: 24px solid transparent/);
});
test('Cyber keeps Sonar on/off without the removed CSS effect switch or dimmer', () => {
const template = readFileSync(
new URL('./views/panels/DisplayPanel.vue', import.meta.url),
'utf8',
);
assert.match(template, /id="cyber-sonar-toggle"/);
assert.doesNotMatch(template, /data-sonar-mode|cyber-sonar-mode-row/);
assert.doesNotMatch(cyberStyles, /cyber-scene-dimmer|data-cyber-sonar-mode/);
});
test('Cyber Display uses a red title without a panel-specific center tab', () => {
assert.match(
cyberStyles,
/#pp-toggles \.pp-header-label\s*\{\s*color: var\(--cyber-red-bright\);/,
);
assert.doesNotMatch(cyberStyles, /#pp-toggles[^,{]*::after\s*\{/);
assert.match(cyberStyles, /isolation: isolate;\s*clip-path: none;/);
assert.match(cyberStyles, /#pp-toggles:not\(\.collapsed\)::before/);
});
test('Cyber omits only the fictional classification and system header lines', () => {
assert.match(
cyberStyles,
/#intel-hud\[data-variant='cyber'\] \.hud-top-left \.hud-classification,\s*#intel-hud\[data-variant='cyber'\] \.hud-top-left \.hud-system\s*\{\s*display: none;\s*\}/,
);
});
+9 -7
View File
@@ -54,7 +54,7 @@ export class DisplayBindings {
documentRef: document,
searchInput: this._locationSearch,
actions: {
setStyle: (style) => this.setStyle(style, { userInitiated: true }),
setStyle: (style) => this.setStyle(style),
dismissSearch: () => this._closeLocationSearch?.({ ifOpen: true }),
toggleHud: () => {
this.shareLinkManager?.claimRestoreLane?.('visual');
@@ -82,7 +82,7 @@ export class DisplayBindings {
this._detachDisplayControls?.();
const store = this.displayStore ?? useDisplayStore(applicationPinia());
const token = store.connect({
setStyle: (style) => this.setStyle(style, { userInitiated: true }),
setStyle: (style) => this.setStyle(style),
toggleBloom: () => {
this.shareLinkManager?.claimRestoreLane?.('visual');
this._setBloomEnabled(!this.bloomEnabled);
@@ -116,7 +116,7 @@ export class DisplayBindings {
},
setHudLayout: (value) => {
this.shareLinkManager?.claimRestoreLane?.('visual');
this._setHudVariant(value, { applyVisualDefaults: true });
this._setHudVariant(value);
},
toggleCleanView: () => this.toggleCleanView(),
exitCleanView: () => this.toggleCleanView(false),
@@ -155,7 +155,10 @@ export class DisplayBindings {
this._updateHudButtonState();
this._syncShareState();
},
toggleSonar: () => this._setCyberSonarEnabled(),
toggleSonar: () => {
this.shareLinkManager?.claimRestoreLane?.('visual');
this._setCyberSonarEnabled();
},
setSonarRings: (value) => this._setCyberSonarSetting('rings', value),
setSonarRange: (value) => this._setCyberSonarSetting('range', value),
setSonarIntensity: (value) =>
@@ -178,9 +181,8 @@ export class DisplayBindings {
// feather and opacity, 3D aircraft on in Proximity.
resetVisual: () => {
this.shareLinkManager?.claimRestoreLane?.('visual');
this.setStyle('normal', { userInitiated: true });
// The HUD layout follows the Normal style, as choosing it does: the
// Cyber HUD stays Cyber.
this.setStyle('normal');
// The HUD layout and the Sonar style stay as the viewer set them.
this._applyGlobalPostDefaults({ keepHudVariant: true });
this._setDetectionAllocation('ELASTIC');
this._setScope({ enabled: true, featherPct: 100, opacityPct: 100 });
+24 -2
View File
@@ -238,20 +238,29 @@ test('the HUD and Sonar controls render what VisualSettings shows', async (t) =>
getVariant: () => variant,
});
owner._scheduleAdaptivePanelLayout = () => {};
assert.equal($('cyber-sonar-toggle').textContent, 'ON');
assert.equal($('cyber-sonar-toggle').getAttribute('aria-pressed'), 'true');
// Sonar is opt-in: OFF until the viewer turns it on.
assert.equal($('cyber-sonar-toggle').textContent, 'OFF');
assert.equal($('cyber-sonar-toggle').getAttribute('aria-pressed'), 'false');
assert.equal(
[...$('hud-layout-select').options].map((option) => option.value).join(),
'tactical,minimal',
);
owner._syncHudControls();
await nextTick();
assert.equal($('hud-toggle').classList.contains('active'), true);
assert.equal($('hud-layout-row').classList.contains('visible'), true);
assert.equal($('hud-layout-select').value, 'minimal');
// The toggle shows with the HUD; its sliders wait for Sonar ON.
assert.equal($('cyber-sonar-row').classList.contains('visible'), true);
assert.equal($('cyber-sonar-rings-row').classList.contains('visible'), false);
visible = false;
owner._updateHudButtonState();
await nextTick();
assert.equal($('hud-toggle').classList.contains('active'), false);
assert.equal($('hud-layout-row').classList.contains('visible'), false);
assert.equal($('cyber-sonar-row').classList.contains('visible'), false);
owner._sonarShown = {
enabled: false,
@@ -272,6 +281,19 @@ test('the HUD and Sonar controls render what VisualSettings shows', async (t) =>
assert.equal($('cyber-sonar-range-value').textContent, '90%');
assert.equal($('cyber-sonar-sector').value, '30');
assert.equal($('cyber-sonar-sector-value').textContent, '30°');
visible = true;
owner._updateHudButtonState();
owner._sonarShown = { ...owner._sonarShown, enabled: true };
owner._publishDisplay();
await nextTick();
assert.equal(toggle.textContent, 'ON');
for (const name of ['rings', 'range', 'intensity', 'opacity', 'sector'])
assert.equal(
$(`cyber-sonar-${name}-row`).classList.contains('visible'),
true,
name,
);
});
test('Scope and Celestial render what VisualSettings shows', async (t) => {
+1 -1
View File
@@ -321,7 +321,7 @@ test('DisplayBindings sets the scope opacity and resets Visual to its defaults',
document.querySelector('#pp-toggles .pp-reset-btn').click();
assert.deepEqual(calls, [
['claim', 'visual'],
['style', 'normal', { userInitiated: true }],
['style', 'normal', undefined],
['postDefaults', { keepHudVariant: true }],
['allocation', 'ELASTIC'],
['scope', { enabled: true, featherPct: 100, opacityPct: 100 }],
-6
View File
@@ -1,6 +0,0 @@
/** Cyber keeps the frame fixed; other layouts retain their existing scroller. */
export function displayPanelScroller(panel) {
return panel?.ownerDocument?.documentElement?.dataset.uiTheme === 'cyber'
? panel.querySelector('.pp-panel-body') || panel
: panel;
}
+666
View File
@@ -0,0 +1,666 @@
import {
getScopeMaskFeather,
getScopeMaskOpacity,
isScopeMaskEnabled,
setScopeMaskEnabled,
setScopeMaskFeather,
setScopeMaskOpacity,
} from '../scopeMask.js';
import assert from 'node:assert/strict';
import { readdirSync, readFileSync } from 'node:fs';
import test from 'node:test';
import {
HUD_LAYOUTS,
isLegacySonarHudLayout,
LEGACY_SONAR_HUD_LAYOUTS,
normalizeHudLayout,
} from '../hudLayouts.js';
import {
isCyberMapThemeActive,
isCyberSonarActive,
isCyberSonarEnabled,
setCyberSonarEnabled,
} from '../cyberSonar.js';
import { GEV_ACTION_SCHEMAS } from '../voice/actionSchemas.js';
import { createGevActionRunner } from '../voice/gevActions.js';
import { StyleManager } from './applicationShell.js';
import { setCyberSonarControls } from './cyberSonarControls.js';
import { createPinia } from 'pinia';
import { useDisplayStore } from './stores/display.js';
import { VisualSettings } from './visualSettings.js';
import { STYLES } from './visualPresets.js';
const read = (relative) =>
readFileSync(new URL(relative, import.meta.url), 'utf8');
function cssRuleBody(styles, selector) {
const match = styles.match(new RegExp(`${selector.source}\\s*\\{([^}]+)\\}`));
assert.ok(match, `Missing CSS rule: ${selector.source}`);
return match[1];
}
function styleOwner(t, initialVariant = 'tactical') {
const previous = { document: globalThis.document, window: globalThis.window };
const root = { dataset: {} };
globalThis.document = { documentElement: root, querySelectorAll: () => [] };
globalThis.window = { dispatchEvent() {} };
t.after(() => Object.assign(globalThis, previous));
let variant = initialVariant;
const calls = [];
const hud = {
getVariant: () => variant,
// Normalize like the real HUD so removed layouts fall back.
setVariant: (value) => (variant = normalizeHudLayout(value)),
setMode: (value) => calls.push(['mode', value]),
onStyleChange: (value) => calls.push(['style', value]),
visible: true,
};
hud.setVariant(initialVariant);
const owner = Object.create(VisualSettings.prototype);
Object.assign(owner, {
activeStyle: 'normal',
store: { publish() {} },
readHud: () => hud,
readShareLinks: () => ({ onStyleChange() {} }),
_visualEffects: {
stages: Object.fromEntries(
Object.entries(STYLES).map(([name, config]) => [
name,
{ uniforms: { ...config.uniforms, intensity: 0 } },
]),
),
},
services: {
governorRequestRender: (reason) => calls.push(['render', reason]),
setDetectionStyle() {},
},
_setBloomEnabled: (value) => calls.push(['bloom', value]),
_setSharpenEnabled: (value) => calls.push(['sharpen', value]),
_applyDetectionPreset: (value) => calls.push(['detection', value]),
_syncShareState: () => calls.push(['share', variant]),
});
for (const name of [
'setCelestialRingEnabled',
'_startTransition',
'_publishActiveStyle',
'_updateSliderPanel',
'_updateHudButtonState',
'_syncIrBoost',
'_syncCockpitInheritedStyle',
'_syncCyberSonarControl',
'_scheduleAdaptivePanelLayout',
'_setDetectionFade',
// Intensities: the fixture has no post-process stages to drive.
'_setBloomIntensity',
'_setSharpenIntensity',
])
owner[name] = () => {};
return { owner, hud, root, calls };
}
test('Tactical and Minimal are the HUD layouts; Cyber is only a Sonar alias', () => {
assert.deepEqual(HUD_LAYOUTS, ['tactical', 'minimal']);
assert.deepEqual(LEGACY_SONAR_HUD_LAYOUTS, ['cyber']);
assert.equal(normalizeHudLayout('cyber'), 'tactical');
assert.equal(normalizeHudLayout('CYBER'), 'tactical');
assert.equal(normalizeHudLayout('operator'), 'tactical');
assert.equal(normalizeHudLayout('Minimal'), 'minimal');
assert.equal(isLegacySonarHudLayout('Cyber'), true);
assert.equal(isLegacySonarHudLayout('operator'), false);
assert.equal(isLegacySonarHudLayout('tactical'), false);
});
test('a share link, scene or saved view naming Cyber opens Tactical with Sonar on', async (t) => {
const { owner, hud, root, calls } = styleOwner(t, 'minimal');
assert.equal(isCyberSonarEnabled(root), false);
await owner.restoreShareState({ hudVariant: 'cyber' });
assert.equal(hud.getVariant(), 'tactical');
assert.equal(root.dataset.cyberSonar, 'on');
assert.equal(root.dataset.uiTheme, undefined);
// Turning it on asks for a frame, so a parked map starts the sweep.
assert.ok(
calls.some(
([name, reason]) => name === 'render' && reason === 'cyber-sonar-toggle',
),
);
// The viewer's own layout choice afterwards leaves the Sonar style alone.
owner._setHudVariant('minimal');
assert.equal(hud.getVariant(), 'minimal');
assert.equal(isCyberSonarEnabled(root), true);
// A restored state is authoritative: one that does not name Cyber turns
// Sonar off, whether from a link or a scene shot.
await owner.restoreShareState({ hudVariant: 'tactical' });
assert.equal(isCyberSonarEnabled(root), false);
setCyberSonarEnabled(true, root);
await owner.applyVisualState({ hud: { variant: 'minimal' } });
assert.equal(hud.getVariant(), 'minimal');
assert.equal(isCyberSonarEnabled(root), false);
await owner.applyVisualState({ hud: { variant: 'cyber' } });
assert.equal(hud.getVariant(), 'tactical');
assert.equal(isCyberSonarEnabled(root), true);
});
test('links and scene shots record Tactical with Sonar as the Cyber code, and only that', (t) => {
const { owner, root } = styleOwner(t, 'tactical');
Object.assign(owner.services, {
getDetectionTuning: () => ({ allocationStrategy: 'ELASTIC' }),
getDetectionMode: () => 'OFF',
isScopeMaskEnabled: () => true,
getScopeMaskFeather: () => 1,
getScopeMaskOpacity: () => 1,
getScopeTerminusOverride: () => null,
});
owner.readCelestialRing = () => null;
const shared = () => owner._readShareState().options.hudVariant;
assert.equal(shared(), 'tactical');
owner._setCyberSonarEnabled(true);
assert.equal(shared(), 'cyber');
// Minimal has no code that carries Sonar; it stays local.
owner._setHudVariant('minimal');
assert.equal(shared(), 'minimal');
owner._setHudVariant('tactical');
assert.equal(shared(), 'cyber');
owner._setCyberSonarEnabled(false);
assert.equal(shared(), 'tactical');
assert.equal(isCyberSonarEnabled(root), false);
});
test('Sonar is opt-in and gated on its toggle, the HUD, Cockpit and motion, not a theme', () => {
const classes = new Set();
const root = { dataset: {} };
const body = { classList: { contains: (name) => classes.has(name) } };
const gate = (extra = {}) => ({
root,
body,
hudActive: true,
reducedMotion: false,
...extra,
});
assert.equal(isCyberSonarEnabled(root), false);
assert.equal(isCyberSonarActive(gate()), false);
assert.equal(isCyberMapThemeActive(gate()), false);
// The removed Cyber theme attribute no longer enables anything.
root.dataset.uiTheme = 'cyber';
assert.equal(isCyberSonarActive(gate()), false);
delete root.dataset.uiTheme;
assert.equal(setCyberSonarEnabled(true, root), true);
assert.equal(root.dataset.cyberSonar, 'on');
assert.equal(isCyberSonarActive(gate()), true);
assert.equal(isCyberMapThemeActive(gate()), true);
assert.equal(isCyberSonarActive(gate({ hudActive: false })), false);
assert.equal(isCyberMapThemeActive(gate({ hudActive: false })), false);
// Reduced motion keeps the static treatment and stops the sweep.
assert.equal(isCyberSonarActive(gate({ reducedMotion: true })), false);
assert.equal(isCyberMapThemeActive(gate({ reducedMotion: true })), true);
classes.add('cockpit-mode');
assert.equal(isCyberSonarActive(gate()), false);
assert.equal(isCyberMapThemeActive(gate()), false);
classes.delete('cockpit-mode');
assert.equal(setCyberSonarEnabled(false, root), false);
assert.equal(root.dataset.cyberSonar, 'off');
assert.equal(isCyberSonarActive(gate()), false);
assert.equal(isCyberMapThemeActive(gate()), false);
});
test('Sonar controls apply under Tactical and Minimal and still validate input', () => {
for (const layout of ['tactical', 'minimal']) {
const root = { dataset: {} };
const doc = {
documentElement: root,
body: { classList: { contains: () => false } },
getElementById: () => null,
};
const calls = [];
const owner = {
hud: { getVariant: () => layout, visible: true },
_setCyberSonarSetting: (name, value) => calls.push([name, value]),
_setCyberSonarEnabled: (value) => {
calls.push(['enabled', value]);
setCyberSonarEnabled(value, root);
},
};
const applied = setCyberSonarControls(
owner,
{ enabled: true, rings: 6, sectorDeg: 30 },
doc,
);
assert.equal(applied.ok, true, layout);
assert.equal(applied.sonar.enabled, true);
assert.equal('cyberSelected' in applied.sonar, false);
assert.deepEqual(calls, [
['rings', 6],
['sector', 30],
['enabled', true],
]);
assert.equal(
setCyberSonarControls(owner, { enabled: 'yes' }, doc).error,
'enabled must be a boolean.',
);
assert.equal(
setCyberSonarControls(owner, { pulse: 3 }, doc).error,
'Unknown sonar setting.',
);
assert.equal(
setCyberSonarControls(owner, { rings: 13 }, doc).error,
'rings must be an integer from 3 to 12.',
);
}
});
test('Display and voice HUD routes offer Tactical and Minimal, and Cyber turns Sonar on', async (t) => {
const makeOwner = () => {
const { owner, hud, root } = styleOwner(t, 'tactical');
owner.setStyle('noir');
owner.setHudLayout = (...args) =>
StyleManager.prototype.setHudLayout.call(owner, ...args);
owner.getControlState = () => ({
hud: { layout: hud.getVariant(), visible: true },
});
return { owner, hud, root };
};
const display = makeOwner();
const store = useDisplayStore(createPinia());
const token = store.connect({
setHudLayout: (value) => display.owner.setHudLayout(value),
setStyle: (value) => display.owner.setStyle(value),
});
store.act('setHudLayout', 'minimal');
assert.equal(display.hud.getVariant(), 'minimal');
// Switching layouts never changes the visual preset.
assert.equal(display.owner.activeStyle, 'noir');
store.act('setStyle', 'anime');
assert.equal(display.owner.activeStyle, 'anime');
store.detach(token);
const setHud = GEV_ACTION_SCHEMAS.find((tool) => tool.name === 'set_hud');
assert.deepEqual(setHud.parameters.properties.layout.enum, HUD_LAYOUTS);
const voice = makeOwner();
const eventSource = { addEventListener() {}, removeEventListener() {} };
const viewer = {
camera: { moveEnd: { addEventListener() {} } },
clock: { onTick: { addEventListener: () => () => {} } },
canvas: eventSource,
scene: { canvas: eventSource },
};
const runVoiceAction = createGevActionRunner({
viewer,
styleManager: voice.owner,
dataManager: {},
});
const minimal = await runVoiceAction('set_hud', { layout: 'minimal' });
assert.equal(minimal.ok, true);
assert.equal(voice.hud.getVariant(), 'minimal');
assert.equal(isCyberSonarEnabled(voice.root), false);
const legacy = await runVoiceAction('set_hud', { layout: 'cyber' });
assert.equal(legacy.ok, true);
assert.equal(legacy.layout, 'tactical');
assert.equal(voice.hud.getVariant(), 'tactical');
assert.equal(isCyberSonarEnabled(voice.root), true);
assert.equal(voice.owner.activeStyle, 'noir');
const unknown = await runVoiceAction('set_hud', { layout: 'operator' });
assert.equal(unknown.ok, false);
});
test('style presets keep their own HUD layout and never touch Sonar', (t) => {
const { owner, hud, root } = styleOwner(t);
setCyberSonarEnabled(true, root);
for (const variant of ['tactical', 'minimal']) {
owner._setHudVariant(variant);
assert.equal(hud.getVariant(), variant);
owner.setStyle('normal');
owner.setStyle('surveillance');
assert.equal(hud.getVariant(), 'tactical');
assert.equal(isCyberSonarEnabled(root), true);
}
});
test('the Display panel offers Sonar as an opt-in toggle under the HUD layout', () => {
const view = read('./views/panels/DisplayPanel.vue');
assert.doesNotMatch(view, /value="cyber"/);
assert.match(view, /<option value="tactical">/);
assert.match(view, /<option value="minimal">/);
assert.match(
view,
/const sonarOn = computed\(\(\) => sonar\.value\?\.enabled \?\? false\);/,
);
// The toggle shows with the HUD; its sliders only once Sonar is on.
assert.match(
view,
/cyber-sonar-toggle-row" :class="\{ visible: hud\?\.visible \}" id="cyber-sonar-row"/,
);
assert.equal(
view.match(
/cyber-sonar-setting" :class="\{ visible: hud\?\.visible && sonarOn \}"/g,
)?.length,
5,
);
assert.match(view, /:aria-label="t\('Sonar contact scanner'\)"/);
// Its renderer status speaks only for a Sonar the viewer turned on.
assert.match(
view,
/<output id="cyber-sonar-status"[^>]*:hidden="!\(hud\?\.visible && sonarOn\)"/,
);
assert.doesNotMatch(view, /t\('Cyber/);
});
test('stylesheets carry no Cyber theme and show the sweep only while Sonar is on', () => {
const entry = readFileSync(
new URL('../../style.css', import.meta.url),
'utf8',
);
assert.match(entry, /@import '\.\/src\/ui\/styles\/sonar\.css';/);
assert.doesNotMatch(entry, /cyber\.css/);
const dir = new URL('./styles/', import.meta.url);
for (const name of readdirSync(dir).filter((file) => file.endsWith('.css')))
assert.doesNotMatch(
readFileSync(new URL(name, dir), 'utf8'),
/data-ui-theme/,
name,
);
const sonar = read('./styles/sonar.css');
assert.match(cssRuleBody(sonar, /\n\.hud-sonar/), /display: none;/);
assert.match(
cssRuleBody(
sonar,
/\n:root\[data-cyber-sonar='on'\] #intel-hud \.hud-sonar/,
),
/display: block;/,
);
// Cockpit and a hidden HUD keep no sweep, not even an invisible one.
assert.match(
cssRuleBody(
sonar,
/:root\[data-cyber-sonar='on'\] body\.cockpit-mode #intel-hud \.hud-sonar,\s*:root\[data-cyber-sonar='on'\] #intel-hud:not\(\.active\) \.hud-sonar/,
),
/display: none;/,
);
assert.match(
sonar,
/@media \(prefers-reduced-motion: reduce\)\s*\{\s*:root\[data-cyber-sonar='on'\] #intel-hud \.hud-sonar::after\s*\{\s*display: none;\s*animation: none;/,
);
// The Vue bindings own the Sonar rows' visibility now.
const controls = read('./styles/controls.css');
assert.doesNotMatch(controls, /\.cyber-sonar-control\s*\{\s*display: none/);
assert.doesNotMatch(controls, /data-cyber-sonar='off'/);
});
test('the desktop bottom row: credits on the Power Up baseline, the dock lifted, the corners level', () => {
const rem = 16;
const lift = 'var\\(--world-timeline-lift, 0px\\)';
const value = (text, pattern) => {
const match = text.match(pattern);
assert.ok(match, pattern.source);
return Number(match[1]);
};
const block = (text, header) => {
const start = text.indexOf(header);
assert.ok(start >= 0, header);
let depth = 0;
for (let i = text.indexOf('{', start); i < text.length; i += 1) {
if (text[i] === '{') depth += 1;
else if (text[i] === '}' && --depth === 0)
return text.slice(start, i + 1);
}
assert.fail(`unclosed ${header}`);
};
// Measured constants: the Power Up / language row is 32px tall, 14px up
// and about 20rem wide in English; the attribution logo line is 28px; the
// single-row dock is 62px; the bottom-right readout is one 26px line
// taller than the coordinates.
const POWER_UP = { bottom: 14, height: 32 };
const CREDIT_HEIGHT = 28;
const DOCK_HEIGHT = 62;
const timeline = read('./styles/world-timeline.css');
const timelineLift = value(
timeline,
/body:has\(#world-timeline\) \{\s*--world-timeline-lift: (\d+)px;/,
);
// From 1200px the dock and the World Timeline leave the bottom 74px; below
// it they return to the bottom edge, where the dock spans the corners.
const dock = read('./styles/command-dock.css');
const dockFloor = value(
dock,
new RegExp(
`\\n#command-dock \\{[^}]*bottom: calc\\((\\d+)px \\+ ${lift}\\)`,
),
);
assert.match(
block(dock, '@media (max-width: 1199px)'),
new RegExp(`#command-dock \\{\\s*bottom: calc\\(2vh \\+ ${lift}\\);`),
);
assert.equal(
value(timeline, /\n#world-timeline \{[^}]*bottom: (\d+)px;/),
dockFloor,
);
assert.match(
block(timeline, '@media (max-width: 1199px)'),
/#world-timeline \{\s*bottom: 2vh;/,
);
assert.ok(dockFloor >= POWER_UP.bottom + POWER_UP.height + 8);
// Both credit renderers share Power Up's row, centred on it, below the
// dock, and stop short of the corner row instead of running under it:
// GEV's own line on its anchor, Cesium's on the absolutely placed box it
// draws inside its empty anchor.
const trays = read('./styles/command-dock-trays.css');
const trayWide = block(trays, '@media (min-width: 1200px)');
const caps = {
'gev-credits': trays.match(
/#gev-credits \{\s*right: auto;\s*bottom: ([\d.]+)rem;\s*left: 1\.5rem;\s*width: max-content !important;\s*max-width: calc\(100vw - 1\.5rem - ([\d.]+)rem\);\s*white-space: normal;/,
),
'cesium-credits': (() => {
const anchor = trays.match(
/#cesium-credits \{\s*right: auto;\s*bottom: ([\d.]+)rem;\s*left: 1\.5rem;/,
);
const box = trayWide.match(
/\n #cesium-credits \.cesium-widget-credits \{\s*width: max-content;\s*max-width: calc\(100vw - 1\.5rem - ([\d.]+)rem\);\s*white-space: normal;/,
);
return anchor && box && [null, anchor[1], box[1]];
})(),
};
for (const [id, match] of Object.entries(caps)) {
assert.ok(match, id);
const creditsBottom = Number(match[1]) * rem;
assert.equal(
creditsBottom + CREDIT_HEIGHT / 2,
POWER_UP.bottom + POWER_UP.height / 2,
);
assert.ok(creditsBottom + CREDIT_HEIGHT + 8 <= dockFloor);
assert.ok(Number(match[2]) >= 20 + 1.5, `${id} leaves the corner row room`);
}
// Below 1200px the row returns above the bottom-edge dock, on one line.
const narrow = block(trays, '@media (max-width: 1199px)');
for (const id of ['cesium-credits', 'gev-credits'])
assert.match(narrow, new RegExp(`#${id}[,\\s]`));
assert.match(
narrow,
new RegExp(
`\\{\\s*bottom: calc\\(2vh \\+ 5rem \\+ ${lift}\\);\\s*width: auto !important;\\s*max-width: calc\\(100vw - 3rem\\);\\s*white-space: nowrap;`,
),
);
// Right to left the corner row is at the bottom left, so the row moves right.
assert.match(
trayWide,
/html\[dir='rtl'\]\s*body:not\(\.context-docked\):not\(\.ui-clean-view\):not\(\.recording-mode\)\s*:is\(#cesium-credits, #gev-credits\) \{\s*right: 1\.5rem;\s*left: auto;/,
);
assert.match(
trayWide,
/#cesium-credits\s*\.cesium-widget-credits \{\s*right: 0;\s*left: auto;/,
);
const locale = read('./styles/locale-picker.css');
assert.match(locale, /#corner-actions \{[^}]*inset-inline-end: 0\.9rem;/);
// From 1200px the readout keeps 8px above Power Up and the coordinates
// start level with it. The World Timeline sits between the corners, so they
// do not move while it shows.
const split = read('./styles/rail-split.css');
const wide = block(split, '@media (min-width: 1200px)');
const readoutWide =
value(
wide,
/\n #intel-hud\[data-variant='tactical'\] \.hud-bottom-right \{\s*bottom: ([\d.]+)rem;/,
) * rem;
assert.equal(readoutWide, POWER_UP.bottom + POWER_UP.height + 8);
assert.equal(
value(wide, /\.hud-bottom-left \{\s*bottom: calc\(([\d.]+)rem \+ 26px\);/) *
rem,
readoutWide,
);
assert.doesNotMatch(
wide,
/hud-bottom-(left|right) \{[^}]*world-timeline-lift/,
);
// Corners: coordinates ~302px from 36px, readout ~292px to 36px from the
// right edge; the bar keeps 12px from each at every width from 1200px.
const gutter =
value(
wide,
/#world-timeline \{\s*width: min\(820px, calc\(100vw - ([\d.]+)rem\)\);/,
) * rem;
assert.ok(gutter / 2 >= 36 + 302 + 12);
assert.ok(timelineLift > 0);
// Toasts keep 12px above the raised dock.
assert.equal(
value(
wide,
new RegExp(`#toast \\{\\s*bottom: calc\\((\\d+)px \\+ ${lift}\\);`),
),
dockFloor + DOCK_HEIGHT + 12,
);
// The dock's panels lose the dock's rise from their height budgets.
assert.match(
wide,
/\.gev-voice-panel \{[^}]*calc\(100dvh - 12rem - 74px \+ 2vh - var\(--gev-provider-lift, 0px\)\)/,
);
assert.match(
block(read('./styles/ai-chat.css'), '@media (min-width: 1200px)'),
/#gev-chat-panel \{\s*max-height: min\(34rem, calc\(100dvh - 10rem - 74px \+ 2vh\)\);/,
);
// Below 1200px the corners keep the committed layout: the coordinates clear
// the raised credit row's logo line by 6px.
assert.ok(
value(
trays.slice(
trays.indexOf(
'/* The coordinate readout shares the bottom-left corner',
),
),
new RegExp(
`\\.hud-bottom-left \\{\\s*bottom: calc\\(2vh \\+ ([\\d.]+)rem \\+ ${lift}\\);`,
),
) *
rem >=
5 * rem + CREDIT_HEIGHT + 6,
);
// The desktop Omnibar layout outranks these rules; its readout keeps the
// same 8px above Power Up.
const omnibarReadout = value(
read('./styles/omnibar-dock.css'),
/#intel-hud\[data-variant='tactical'\] \.hud-bottom-right \{\s*bottom: ([\d.]+)rem;/,
);
assert.equal(omnibarReadout * rem, POWER_UP.bottom + POWER_UP.height + 8);
});
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);
});
Object.assign(owner.services, { setScopeMaskEnabled, setScopeMaskFeather });
let shown = null;
owner.store = { publish: (view) => (shown = view.scope) };
await owner.restoreShareState({ scopeEnabled: false, scopeFeatherPct: 200 });
assert.deepEqual(shown, { enabled: false, featherPct: 200, opacityPct: 100 });
for (const layout of ['minimal', 'cyber', 'tactical']) {
owner._setHudVariant(layout);
assert.equal(isScopeMaskEnabled(), false, layout);
assert.equal(getScopeMaskFeather(), 2, layout);
assert.equal(shown.enabled, false, layout);
}
await owner.applyVisualState({ scope: { enabled: true, featherPct: 175 } });
assert.equal(isScopeMaskEnabled(), true);
assert.equal(getScopeMaskFeather(), 1.75);
assert.deepEqual(shown, { enabled: true, featherPct: 175, opacityPct: 100 });
await owner.applyVisualState({ scope: { featherPct: 500 } });
assert.equal(getScopeMaskFeather(), 2);
assert.deepEqual(shown, { enabled: true, featherPct: 200, opacityPct: 100 });
});
test('a shared scope opacity is restored and rides in the next share state', async (t) => {
const { owner } = styleOwner(t, 'tactical');
const previous = getScopeMaskOpacity();
t.after(() => setScopeMaskOpacity(previous));
Object.assign(owner.services, {
setScopeMaskEnabled() {},
setScopeMaskFeather() {},
setScopeMaskOpacity,
});
let shown = null;
owner.store = { publish: (view) => (shown = view.scope) };
await owner.restoreShareState({ scopeOpacityPct: 60 });
assert.equal(getScopeMaskOpacity(), 0.6);
assert.equal(shown.opacityPct, 60);
// A state without it leaves the opacity alone.
await owner.restoreShareState({ scopeFeatherPct: 80 });
assert.equal(getScopeMaskOpacity(), 0.6);
assert.equal(shown.opacityPct, 60);
Object.assign(owner.services, {
getDetectionTuning: () => ({ allocationStrategy: 'ELASTIC' }),
getDetectionMode: () => 'OFF',
isScopeMaskEnabled: () => true,
getScopeMaskFeather: () => 0.8,
getScopeMaskOpacity,
getScopeTerminusOverride: () => null,
});
owner.readCelestialRing = () => null;
assert.equal(owner._readShareState().options.scopeOpacityPct, 60);
// A link asking for less than the floor opens at the floor, and says so.
await owner.restoreShareState({ scopeOpacityPct: 20 });
assert.equal(getScopeMaskOpacity(), 0.5);
assert.equal(owner._readShareState().options.scopeOpacityPct, 50);
});
test('a scene shot saved with the retired Snow style plays on Normal', async (t) => {
const { owner } = styleOwner(t, 'tactical');
owner.setStyle('noir');
await owner.applyVisualState({ style: 'snow' });
assert.equal(owner.activeStyle, 'normal');
});
test('shared panel hooks affect only opted-in rail surfaces without overriding disclosure and concealment', () => {
const styles = read('./styles/panel-surfaces.css');
const rail = cssRuleBody(
styles,
/:is\(#left-panel-stack, #right-context-rail\)\s+> \[data-panel-id\]:has\(> \[data-panel-surface\]\)/,
);
assert.match(rail, /pointer-events:\s*auto;/);
assert.doesNotMatch(rail, /(?:display|visibility):/);
assert.doesNotMatch(
styles,
/:is\(#left-panel-stack, #right-context-rail\)\s*> \[data-panel-id\]\s*\{/,
);
assert.match(
styles,
/\[data-panel-surface\]:not\(\[hidden\]\):not\(dialog:not\(\[open\]\)\)\s*\{\s*display: flex;/,
);
assert.match(
styles,
/dialog\[data-panel-surface\]:not\(\[open\]\)\s*\{\s*display: none !important;/,
);
assert.match(
styles,
/body:is\(\.ui-clean-view, \.recording-mode\)[^{]+\{[^}]*visibility: hidden !important;[^}]*pointer-events: none !important;/,
);
});
+1 -3
View File
@@ -279,9 +279,7 @@ export const FEATURE_GUIDES = Object.freeze({
prepare: () => $('#hud-toggle')?.scrollIntoView?.({ block: 'center' }),
targets: () => [$('#hud-toggle')],
text: () =>
t(
'Switch the HUD on or off here; Layout picks Tactical, Minimal or Cyber',
),
t('Switch the HUD on or off here; Layout picks Tactical or Minimal'),
},
],
scope: () => [
+1 -2
View File
@@ -2,7 +2,6 @@ import { UiLifetime } from './uiLifetime.js';
import { prefersCollapsed, readPanelState } from './rail/panelState.js';
import { usePanelChromeStore } from './stores/panelChrome.js';
import { applicationPinia } from './vueRuntime.js';
import { displayPanelScroller } from './displayPanelScroll.js';
import { PanelPositionControls } from './panelPositionControls.js';
import { PanelLayoutController } from './panelLayoutController.js';
import {
@@ -121,7 +120,7 @@ export class PanelChrome {
readDisplayScrollTop: () =>
this._displayPortalScrollRestoreOwner === 'standard'
? this._standardDisplayScrollTop
: displayPanelScroller(this._ppToggles)?.scrollTop || 0,
: this._ppToggles?.scrollTop || 0,
});
}
get hud() {
+9 -23
View File
@@ -1,5 +1,4 @@
import { readStylesheet } from '../testSupport/readStylesheet.mjs';
import { displayPanelScroller } from './displayPanelScroll.js';
import assert from 'node:assert/strict';
import test from 'node:test';
import {
@@ -9,21 +8,9 @@ import {
} from './panelRails.js';
import { applyPanelState, readPanelState } from './rail/panelState.js';
test('Display uses an inner scroll body only in Cyber', () => {
const body = { scrollTop: 95 };
const panel = {
ownerDocument: { documentElement: { dataset: { uiTheme: 'cyber' } } },
querySelector: () => body,
};
assert.equal(displayPanelScroller(panel), body);
panel.ownerDocument.documentElement.dataset.uiTheme = 'tactical';
assert.equal(displayPanelScroller(panel), panel);
assert.equal(displayPanelScroller(null), null);
});
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']) {
for (const variant of ['tactical', 'minimal']) {
const f = fixture(side, { hud: { visible: true, variant } });
f.expand(f.first, 250);
f.expand(f.second, 250);
@@ -232,7 +219,7 @@ test('left corridor respects a lower obstacle but ignores an obstacle hidden by
assert.equal(Number(f.stack.dataset.safeBottomPct), 65.47);
});
test('a centered timeline only shortens the corridor when it reaches the visible panel', () => {
test('a centered timeline only shortens the corridor when it reaches a laid-out panel', () => {
const f = fixture('left');
f.stack.rect.width = 360;
f.stack.rect.right = f.stack.rect.left + 360;
@@ -245,6 +232,11 @@ test('a centered timeline only shortens the corridor when it reaches the visible
f.run();
assert(clear > 85);
assert(Number(f.stack.dataset.safeBottomPct) < 73);
// Any other obstacle in the same gutter still bounds the corridor.
const blocker = element('blocker', { top: 650, left: 320 });
f.options.obstacles = [blocker];
f.run();
assert(Number(f.stack.dataset.safeBottomPct) < 73);
});
test('Data Layers extends to the HUD even if its list is currently short', () => {
@@ -413,12 +405,6 @@ test('left rail buttons hold still whether the open panel is short or tall', ()
assert.equal(f.stack.dataset.layoutMode, 'focus');
assert.notEqual(short.stack.dataset.layoutMode, 'focus');
assert.ok(Math.abs(railTop(f.stack) - railTop(short.stack)) < 0.2);
// A theme that pins the stack's top (Cyber) leaves nothing to offset.
f.stack.computed.getPropertyValue = (name) =>
name === '--panel-stack-top-pinned' ? ' 1' : '';
f.run();
assert.equal(f.stack.style.getPropertyValue('--panel-rail-offset'), '0.0px');
});
// The left rail's `top` animates after the right pass runs, and nothing
@@ -459,9 +445,9 @@ test('right rail falls back to the committed left target when the transition end
});
test('right rail follows a settled left rail whose CSS overrides the committed target', () => {
// Cyber pins the left rail with `top: ... !important`, so the committed
// A stylesheet that pins the left rail's `top` means the committed
// percentage is not where it renders and no `top` transition runs.
const f = fixture('right', { hud: { visible: true, variant: 'cyber' } });
const f = fixture('right', { hud: { visible: true, variant: 'minimal' } });
f.options.leftStack.rect.top = 220;
f.options.leftStack.dataset.safeTopPct = '26.00';
f.options.leftStack.getAnimations = () => [];
+2 -6
View File
@@ -329,18 +329,14 @@ test('while the OAuth check runs, the toggle is busy and repeat presses are igno
localStorage.removeItem(CLOUD_VOICE_AUTH_STORAGE_KEY);
});
test('Cyber moves the chip into the top toolbar and other themes return it to the corner', async (t) => {
test('the chip stays first in the corner row whatever the HUD layout', async (t) => {
const { $, toolbar } = await fixture(t);
const corner = $('#corner-actions');
assert.equal(corner.firstElementChild?.id, 'key-setup-chip');
// The removed Cyber skin no longer moves it into the top toolbar.
document.documentElement.dataset.uiTheme = 'cyber';
await wait();
await nextTick();
assert.equal(toolbar.lastElementChild?.id, 'key-setup-chip');
assert.equal(corner.querySelector('#key-setup-chip') === null, true);
document.documentElement.dataset.uiTheme = 'tactical';
await wait();
await nextTick();
assert.equal(corner.firstElementChild?.id, 'key-setup-chip');
assert.equal(toolbar.querySelector('#key-setup-chip') === null, true);
delete document.documentElement.dataset.uiTheme;
+1 -4
View File
@@ -91,10 +91,7 @@ export class RadioControls {
*/
async _revealRadioControlsAfterExplicitEnable(trigger) {
const contextPanel = document.getElementById('global-context-panel');
const scroller =
(document.documentElement?.dataset.uiTheme === 'cyber' &&
contextPanel?.querySelector('.cyber-panel-body')) ||
contextPanel?.querySelector('.global-context-panel-inner');
const scroller = contextPanel?.querySelector('.global-context-panel-inner');
const directory = this._radioPanel?.querySelector('.radio-directory-row');
const transport = this._radioPanel?.querySelector('.radio-transport');
if (
+1 -34
View File
@@ -140,7 +140,7 @@ test('a collapsed launcher drops its divider so English titles fit whole', () =>
);
});
test('the default theme geometry change leaves cyber gutters alone', () => {
test('the default theme geometry change leaves the base gutters alone', () => {
for (const surface of [
'.data-panel-inner',
'.utilities-panel-inner',
@@ -193,39 +193,6 @@ test('rail titles and dock labels share one set of label tokens', () => {
);
});
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', () => {
// The divider, gap and toggle rules; the translated type rule is checked
// above.
+1 -2
View File
@@ -4,7 +4,6 @@ import {
} from '../panelStackLayout.js';
import { resolveHudRailLayout } from './panelRailGeometry.js';
import { displayPanelScroller } from './displayPanelScroll.js';
import { settleSideAccordion } from './panelAccordion.js';
const pendingCollapseRetries = new WeakSet();
@@ -356,7 +355,7 @@ export function layoutRightPanelRail({
stack.dataset.expandedCount = String(expandedPanels.length);
if (displayPanel && expandedPanels.includes(displayPanel)) {
const scroller = displayPanelScroller(displayPanel);
const scroller = displayPanel;
const maxScrollTop = Math.max(
0,
scroller.scrollHeight - scroller.clientHeight,
-17
View File
@@ -52,18 +52,6 @@ test('the dock trays open from their own wing in right-to-left', () => {
);
});
test('the Cyber cockpit keeps Data Layers on the left edge in every language', () => {
const body = ruleBody(
sheet('cyber.css'),
":root[data-ui-theme='cyber'] body.cockpit-mode #left-panel-stack",
);
// inset-inline-start would become right: 30px in Arabic and beat
// rtl.css's reset, landing the stack on the utility controls.
assert.doesNotMatch(body, /inset-inline-start/);
assert.match(body, /left: 30px;/);
assert.match(body, /right: auto;/);
});
test('the panel rails stay on the outer side of their stacks in right-to-left', () => {
const layers = sheet('layers.css');
// Each rail is placed by its screen-side edge; a physical side would put
@@ -90,11 +78,6 @@ test('the panel rails stay on the outer side of their stacks in right-to-left',
ruleBody(kit, '.ui-tooltip__tip--left'),
/inset-inline-end: calc\(100% \+ 10px\);/,
);
// Cyber's right stack keeps its rail clearance on the left edge.
assert.match(
sheet('rtl.css'),
/html\[dir='rtl'\]\[data-ui-theme='cyber'\] #right-context-rail \{\s*right: auto;\s*left: calc\(51px \+ var\(--panel-rail-clearance\)\);/,
);
});
test('phone top-bar actions mirror with the logo', () => {
+3 -3
View File
@@ -4,7 +4,7 @@ import { PanelChrome } from './panelChrome.js';
import { presentPanelLocally } from '../testSupport/panelState.mjs';
import { readPanelState } from './rail/panelState.js';
function fixture(theme = 'cyber') {
function fixture(theme = 'tactical') {
const nodes = new Map();
const node = (id, collapsed = true) => {
const classes = new Set(collapsed ? ['collapsed'] : []);
@@ -49,7 +49,7 @@ function fixture(theme = 'cyber') {
}
test('explicit opening collapses side peers and claims their restoration lanes in every theme', () => {
for (const theme of ['tactical', 'minimal', 'cyber']) {
for (const theme of ['tactical', 'minimal']) {
const f = fixture(theme), prior = globalThis.document;
globalThis.document = f.doc;
try {
@@ -86,7 +86,7 @@ test('opening already-expanded Radio reveals Context and closes Display', () =>
});
test('restored preferences keep every saved panel open for the layout to normalize', () => {
for (const theme of ['tactical', 'minimal', 'cyber']) {
for (const theme of ['tactical', 'minimal']) {
const f = fixture(theme), prior = globalThis.document;
globalThis.document = f.doc;
try {
+19 -15
View File
@@ -366,15 +366,12 @@
flex-basis: 1.25rem;
}
/* At this width main shows the wings' icons only (command-dock-trays.css);
centre them in the slim wings. Cyber keeps its labels. */
centre them in the slim wings. */
@media (max-width: 900px) {
:root:not([data-ui-theme='cyber'])
#command-dock
> :is(#location-bar, #control-panel)
.dock-tray-toggle {
:root #command-dock > :is(#location-bar, #control-panel) .dock-tray-toggle {
justify-content: center;
}
:root:not([data-ui-theme='cyber'])
:root
#command-dock
:is(#location-bar, #control-panel)
:is(.location-toolbar-label, .panel-title) {
@@ -382,7 +379,7 @@
min-width: 0;
justify-content: center;
}
:root:not([data-ui-theme='cyber']) #command-dock .dock-label-icon {
:root #command-dock .dock-label-icon {
width: 1.25rem;
height: 1.25rem;
flex-basis: 1.25rem;
@@ -1448,16 +1445,15 @@ body[data-assistant-docked='true'] #right-context-rail {
box-shadow: 0 0 0 1px currentColor;
}
/* Assistant panels share the left panels' glass surface (layers.css). Cyber
keeps its own surfaces. */
:root:not([data-ui-theme='cyber']) #gev-voice-control {
/* Assistant panels share the left panels' glass surface (layers.css). */
:root #gev-voice-control {
--assistant-glass: var(--glass-bg);
--assistant-glass-border: var(--glass-border);
--assistant-glass-shadow:
0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03) inset,
0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
:root:not([data-ui-theme='cyber'])
:root
#command-dock
#gev-voice-control
:is(
@@ -1472,14 +1468,14 @@ body[data-assistant-docked='true'] #right-context-rail {
}
/* The mini reply sits inside the chat panel, whose own blur makes it the
backdrop root: a blur on the reply could not reach the map. */
:root:not([data-ui-theme='cyber'])
:root
#command-dock
#gev-voice-control
:is(#gev-chat-panel, #gev-voice-panel, #gev-voice-panel[data-minimized]) {
-webkit-backdrop-filter: blur(24px) saturate(1.4);
backdrop-filter: blur(24px) saturate(1.4);
}
:root:not([data-ui-theme='cyber'])
:root
#command-dock
#gev-voice-control
#gev-chat-panel[data-minimized='true']:focus-within {
@@ -1488,12 +1484,12 @@ body[data-assistant-docked='true'] #right-context-rail {
/* A backdrop-filter on the voice control would stop the panels inside it
from blurring the map, so its own blur moves to a layer behind it. */
:root:not([data-ui-theme='cyber']) #command-dock > #gev-voice-control {
:root #command-dock > #gev-voice-control {
isolation: isolate;
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
:root:not([data-ui-theme='cyber']) #command-dock > #gev-voice-control::before {
:root #command-dock > #gev-voice-control::before {
content: '';
position: absolute;
inset: 0;
@@ -1698,3 +1694,11 @@ body[data-assistant-docked='true'] #right-context-rail {
--dock-side-compact: 3.25rem;
}
}
/* From 1200px the dock sits 74px up (command-dock.css), 74px - 2vh higher
than the bottom-edge dock this height budget was written for. */
@media (min-width: 1200px) {
#gev-chat-panel {
max-height: min(34rem, calc(100dvh - 10rem - 74px + 2vh));
}
}
+41 -63
View File
@@ -123,7 +123,7 @@
}
/* Display / Radio: the closed launchers and the open panels match too. */
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-control.is-expanded {
border-color: rgba(255, 255, 255, 0.08);
@@ -139,14 +139,14 @@
person, Utilities has nothing to do there, and the cockpit's own Display
panel stands in for Visual), one panel opens beside it, and the collapsed
header strips the cockpit used instead are hidden. */
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
#left-panel-stack
> .gev-panel-rail--left {
display: block;
}
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
#left-panel-stack
> .gev-panel-rail--left
@@ -155,7 +155,7 @@
[data-rail-item='utilities-panel'],
[data-rail-item='pp-toggles']
),
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
#left-panel-stack
> .gev-panel-rail--left
@@ -171,7 +171,7 @@
/* With some icons hidden, the runs between them break up: with a panel
open, each icon left is its own island. */
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
#left-panel-stack
> .gev-panel-rail--left
@@ -184,7 +184,7 @@
/* Authoring, Utilities or Visual may still be open underneath; its hidden icon must
not split the rail into islands. */
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
#left-panel-stack
> .gev-panel-rail--left
@@ -196,7 +196,7 @@
)[aria-pressed='true']
)
> .ui-tooltip::before,
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
#left-panel-stack
> .gev-panel-rail--left
@@ -211,7 +211,7 @@
display: none;
}
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
#left-panel-stack
> .gev-panel-rail--left
@@ -229,11 +229,11 @@
-webkit-backdrop-filter: blur(20px);
}
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
#left-panel-stack
> [data-panel-id].collapsed,
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
#left-panel-stack
> :is(
@@ -247,9 +247,7 @@
/* Both rails start at one height, just under the top HUD text, so their top
edges line up; the cockpit layout pass places Display and Radio at the
same height (COCKPIT_UTILITY_MIN_TOP_PX / _RATIO in cockpitPresentation.js). */
:root:not([data-ui-theme='cyber'])
body.cockpit-mode:not(.mobile-shell)
#left-panel-stack {
:root body.cockpit-mode:not(.mobile-shell) #left-panel-stack {
top: max(206px, 22vh) !important;
}
@@ -415,14 +413,14 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
}
/* ── Open Display / Radio panels: the main panels' header and size ───── */
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-control.is-expanded {
min-width: 295px;
box-sizing: border-box;
}
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-control.is-expanded
.cockpit-utility-launcher {
@@ -435,7 +433,7 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
letter-spacing: 0.22em;
}
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-control.is-expanded
.cockpit-utility-divider {
@@ -448,16 +446,14 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
/* The launcher's own toggle steps aside: the rail and "−" open and close
the panel instead. */
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-control.is-expanded
.cockpit-utility-glyph {
display: none;
}
:root:not([data-ui-theme='cyber'])
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-collapse {
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-collapse {
display: grid;
flex: none;
place-items: center;
@@ -472,10 +468,8 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
cursor: pointer;
}
:root:not([data-ui-theme='cyber'])
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-collapse:hover,
:root:not([data-ui-theme='cyber'])
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-collapse:hover,
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-collapse:focus-visible {
border-color: rgba(0, 212, 255, 0.45);
@@ -486,9 +480,7 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
/* ── Right rail as on the left: an icon column that stays, labels beside it
while nothing is open, and the open panel to its left. The launchers'
own strips give way to it. ─────────────────────────────────────────── */
:root:not([data-ui-theme='cyber'])
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-controls {
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-controls {
display: grid;
grid-template-columns: auto auto;
align-items: start;
@@ -496,13 +488,13 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
column-gap: 6px;
}
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-control:not(.is-expanded) {
display: none;
}
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-control.is-expanded {
grid-column: 1;
@@ -510,16 +502,14 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
margin-top: 0 !important;
}
/* Cyber and the phone keep the launchers' own toggles, so the rail and "−"
are for the desktop look only. */
/* The phone keeps the launchers' own toggles, so the rail and "−" are for
the desktop look only. */
.cockpit-utility-rail,
.cockpit-utility-collapse {
display: none;
}
:root:not([data-ui-theme='cyber'])
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-rail {
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail {
grid-column: 2;
grid-row: 1;
display: flex;
@@ -528,7 +518,7 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
pointer-events: auto;
}
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
:is(.cockpit-utility-rail__labels, .cockpit-utility-rail__icons) {
display: flex;
@@ -545,15 +535,13 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
-webkit-backdrop-filter: blur(20px);
}
:root:not([data-ui-theme='cyber'])
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-rail__labels {
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail__labels {
box-sizing: border-box;
width: 170px;
padding-inline: 14px;
}
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-rail__labels
> span {
@@ -569,16 +557,14 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
letter-spacing: 2.08px;
}
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-rail.is-open
.cockpit-utility-rail__labels {
display: none;
}
:root:not([data-ui-theme='cyber'])
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-rail__item {
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail__item {
display: grid;
place-items: center;
width: 32px;
@@ -595,24 +581,20 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
border-color var(--transition-fast, 120ms);
}
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-rail__item
.material-symbols-outlined {
font-size: 18px;
}
:root:not([data-ui-theme='cyber'])
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-rail__item:hover {
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail__item:hover {
background: rgba(255, 255, 255, 0.05);
color: var(--text-primary, #fff);
}
:root:not([data-ui-theme='cyber'])
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-rail__item.is-on,
:root:not([data-ui-theme='cyber'])
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail__item.is-on,
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-rail__item.is-on:hover {
border-color: rgba(0, 212, 255, 0.15);
@@ -621,7 +603,7 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
}
/* With a panel open, each icon is its own island, as on the main rails. */
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-rail.is-open
.cockpit-utility-rail__icons {
@@ -632,14 +614,14 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
-webkit-backdrop-filter: none;
}
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-rail.is-open
.cockpit-utility-rail__item {
position: relative;
}
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-rail.is-open
.cockpit-utility-rail__item::before {
@@ -657,12 +639,12 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
}
/* Hovering an icon lights its label too, as on the left. */
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-rail:has(.cockpit-utility-rail__item:nth-child(1):hover)
.cockpit-utility-rail__labels
> span:nth-child(1),
:root:not([data-ui-theme='cyber'])
:root
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-rail:has(.cockpit-utility-rail__item:nth-child(2):hover)
.cockpit-utility-rail__labels
@@ -671,22 +653,18 @@ body.cockpit-mode #intel-hud .hud-bottom-right {
}
/* Mirror the left rail's 52px inset, clear of the HUD's vertical readouts. */
:root:not([data-ui-theme='cyber'])
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-controls {
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-controls {
right: 52px;
}
/* Like the cockpit's other windows (rtl.css), the rail keeps its physical
side in a right-to-left language: icons at the screen edge, the open panel
inside them. Only the text reads right to left. */
html[dir='rtl']:not([data-ui-theme='cyber'])
body.cockpit-mode:not(.mobile-shell)
.cockpit-utility-controls {
html[dir='rtl'] body.cockpit-mode:not(.mobile-shell) .cockpit-utility-controls {
direction: ltr;
}
html[dir='rtl']:not([data-ui-theme='cyber'])
html[dir='rtl']
body.cockpit-mode:not(.mobile-shell)
:is(.cockpit-utility-control.is-expanded, .cockpit-utility-rail__labels) {
direction: rtl;
+2 -47
View File
@@ -15,13 +15,8 @@
var(--cockpit-radar-label-height) + 14px
);
}
:root[data-ui-theme='cyber'] #cockpit-hud[data-subject='vessel'] {
--cockpit-radar-right: 30px;
}
:root[data-ui-theme='cyber'] #cockpit-hud[data-subject='vessel']::before {
clip-path: none;
}
:root:not([data-ui-theme='cyber']) body.cockpit-bridge {
:root body.cockpit-bridge {
--panel-radius: 2px;
--btn-radius: 2px;
}
@@ -252,25 +247,6 @@ body.cockpit-bridge #view-switcher button {
border-radius: 2px;
transform: none;
}
/* Cyber anchors the card's top from the layout pass; bound its height. */
:root[data-ui-theme='cyber']
#cockpit-hud[data-subject='vessel']
.cockpit-signal-window {
bottom: auto;
max-height: max(
44px,
min(
30vh,
280px,
calc(
100vh - var(--cockpit-signal-top, clamp(255px, 28vh, 300px)) -
var(--cockpit-radar-clearance)
)
)
);
clip-path: none;
}
/* The radar console: CockpitRadar fills it, label row included. */
#cockpit-hud[data-subject='vessel'] .cockpit-radar-console {
position: absolute;
@@ -296,15 +272,6 @@ body.cockpit-bridge #view-switcher button {
.cockpit-radar-console:has(> .cockpit-radar[hidden]) {
display: none;
}
:root[data-ui-theme='cyber']
#cockpit-hud[data-subject='vessel']
.cockpit-radar-console {
border-color: rgba(105, 203, 209, 0.34);
border-top-color: rgba(196, 84, 84, 0.82);
background:
linear-gradient(135deg, rgba(105, 203, 209, 0.07), transparent 38%),
rgba(8, 23, 27, 0.78);
}
@media (min-width: 761px) {
/* The heading tape narrows to stay clear of the console. */
@@ -318,18 +285,6 @@ body.cockpit-bridge #view-switcher button {
)
);
}
:root[data-ui-theme='cyber']
#cockpit-hud[data-subject='vessel']
.cockpit-compass {
width: min(
650px,
56vw,
calc(
100vw - 2 *
(var(--cockpit-radar-right) + var(--cockpit-radar-size) + 24px)
)
);
}
}
@media (min-width: 761px) and (min-height: 601px) {
/* The console takes the intel HUD's bottom-right corner. */
+2 -4
View File
@@ -489,10 +489,8 @@
#cockpit-hud[data-subject='satellite'] .cockpit-topline > div:first-child {
visibility: hidden;
}
:root[data-ui-theme='cyber'] #cockpit-hud[data-subject='satellite']::before {
clip-path: none;
}
:root:not([data-ui-theme='cyber']) body.cockpit-orbit {
:root body.cockpit-orbit {
--panel-radius: 2px;
--btn-radius: 2px;
}
+73 -17
View File
@@ -448,14 +448,18 @@
letter-spacing: 0.035rem;
}
/* Keep the complete inline attribution row above the command dock. */
/* From 1200px the attribution row sits on the bottom edge, on the Power Up
baseline, below the raised command dock (command-dock.css). It stops 26rem
short of the right edge, clear of the corner row (Power Up and the language
picker), and wraps rather than running under it. Below 1200px the dock
keeps to the bottom edge and the row sits above it. */
body:not(.ui-clean-view):not(.recording-mode) #cesium-credits,
body:not(.ui-clean-view):not(.recording-mode):has(
#intel-hud[data-variant='minimal'].active
)
#cesium-credits {
right: auto;
bottom: calc(2vh + 5rem + var(--world-timeline-lift, 0px));
bottom: 1rem;
left: 1.5rem;
width: auto !important;
max-width: calc(100vw - 3rem);
@@ -468,10 +472,11 @@ body:not(.ui-clean-view):not(.recording-mode):has(
)
#gev-credits {
right: auto;
bottom: calc(2vh + 5rem + var(--world-timeline-lift, 0px));
bottom: 1rem;
left: 1.5rem;
width: auto !important;
max-width: calc(100vw - 3rem);
width: max-content !important;
max-width: calc(100vw - 1.5rem - 26rem);
white-space: normal;
text-align: left;
}
@@ -494,6 +499,64 @@ body:not(.ui-clean-view):not(.recording-mode):has(
bottom: calc(2vh + 9rem + var(--world-timeline-lift, 0px));
}
/* The coordinate readout shares the bottom-left corner with the attribution
row below 1200px: it sits clear of the row's 28px logo line, with a 6px gap
(from 1200px, rail-split.css). */
#intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
.hud-bottom-left,
:root[data-scope-mask='off']
#intel-hud[data-variant='minimal']
.hud-bottom-left {
bottom: calc(2vh + 7.125rem + var(--world-timeline-lift, 0px));
}
@media (max-width: 1199px) {
body:not(.ui-clean-view):not(.recording-mode) #cesium-credits,
body:not(.ui-clean-view):not(.recording-mode):has(
#intel-hud[data-variant='minimal'].active
)
#cesium-credits,
body:not(.ui-clean-view):not(.recording-mode) #gev-credits,
body:not(.ui-clean-view):not(.recording-mode):has(
#intel-hud[data-variant='minimal'].active
)
#gev-credits {
bottom: calc(2vh + 5rem + var(--world-timeline-lift, 0px));
width: auto !important;
max-width: calc(100vw - 3rem);
white-space: nowrap;
}
}
@media (min-width: 1200px) {
/* Cesium draws the line in an absolutely placed box inside the empty
#cesium-credits anchor, so the cap and the wrapping go on that box. */
#cesium-credits .cesium-widget-credits {
width: max-content;
max-width: calc(100vw - 1.5rem - 26rem);
white-space: normal;
}
/* Right to left, the corner row sits at the bottom left
(locale-picker.css), so the attribution row takes the bottom right.
Expanded Context places it itself (context-dock.css). */
html[dir='rtl']
body:not(.context-docked):not(.ui-clean-view):not(.recording-mode)
:is(#cesium-credits, #gev-credits) {
right: 1.5rem;
left: auto;
text-align: right;
}
html[dir='rtl']
body:not(.context-docked):not(.ui-clean-view):not(.recording-mode)
#cesium-credits
.cesium-widget-credits {
right: 0;
left: auto;
}
}
@media (max-width: 900px) {
body:not(.ui-clean-view):not(.recording-mode) #cesium-credits,
body:not(.ui-clean-view):not(.recording-mode):has(
@@ -522,13 +585,9 @@ body:not(.ui-clean-view):not(.recording-mode):has(
/* The wings shrink to --dock-side-compact at this width, open or closed (an
open tray pops out above the dock), which is too narrow for the text
labels; they would spill over the voice control and take its taps. The
wings show only their icon; the toggles keep their aria-label. Cyber sets
a wider --dock-side-compact that fits its labels, so it keeps them. */
:root:not([data-ui-theme='cyber'])
#command-dock
:is(#location-bar, #control-panel)
.panel-title,
:root:not([data-ui-theme='cyber'])
wings show only their icon; the toggles keep their aria-label. */
:root #command-dock :is(#location-bar, #control-panel) .panel-title,
:root
#command-dock
:is(#location-bar, #control-panel)
.location-toolbar-label {
@@ -538,11 +597,8 @@ body:not(.ui-clean-view):not(.recording-mode):has(
gap: 0;
}
:root:not([data-ui-theme='cyber'])
#command-dock
:is(#location-bar, #control-panel)
.panel-title::after,
:root:not([data-ui-theme='cyber'])
:root #command-dock :is(#location-bar, #control-panel) .panel-title::after,
:root
#command-dock
:is(#location-bar, #control-panel)
.location-toolbar-label::after {
+11 -2
View File
@@ -2,8 +2,9 @@
#command-dock {
position: fixed;
right: auto;
/* Above the world timeline while it shows (world-timeline.css). */
bottom: calc(2vh + var(--world-timeline-lift, 0px));
/* 74px up from 1200px, leaving the bottom row to the map credits and
Power Up; above the world timeline while it shows (world-timeline.css). */
bottom: calc(74px + var(--world-timeline-lift, 0px));
left: 50%;
z-index: 145;
display: grid;
@@ -273,6 +274,14 @@ body.recording-mode #gev-credits {
bottom: calc(2vh + 11.5rem + var(--world-timeline-lift, 0px));
}
/* Below 1200px the dock reaches the bottom corners, so it keeps to the
bottom edge and the credits and coordinates sit above it. */
@media (max-width: 1199px) {
#command-dock {
bottom: calc(2vh + var(--world-timeline-lift, 0px));
}
}
@media (max-width: 980px) {
#command-dock {
grid-template-areas:
+15 -33
View File
@@ -97,7 +97,7 @@
/* 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'])
:root
:is(#left-panel-stack, #right-context-rail)
:is(
.panel-header > .panel-title,
@@ -112,9 +112,8 @@
}
/* 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'])
ends in an ellipsis. */
:root
:is(#left-panel-stack, #right-context-rail)
:is(.panel-header > .panel-title, .pp-header-label) {
min-width: 0;
@@ -126,25 +125,25 @@
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'])
:root
:is(#left-panel-stack, #right-context-rail)
> .panel-collapsible.collapsed
> [class$='-panel-inner']
> .panel-header,
:root:not([data-ui-theme='cyber'])
:root
:is(#left-panel-stack, #right-context-rail)
> #pp-toggles.collapsed
> .pp-header-row {
gap: 8px;
}
:root:not([data-ui-theme='cyber'])
:root
:is(#left-panel-stack, #right-context-rail)
> .panel-collapsible.collapsed
> [class$='-panel-inner']
> .panel-header
> .panel-divider,
:root:not([data-ui-theme='cyber'])
:root
:is(#left-panel-stack, #right-context-rail)
> #pp-toggles.collapsed
> .pp-header-row
@@ -152,13 +151,13 @@
display: none;
}
:root:not([data-ui-theme='cyber'])
:root
:is(#left-panel-stack, #right-context-rail)
> .panel-collapsible.collapsed
> [class$='-panel-inner']
> .panel-header
> .panel-collapse-btn,
:root:not([data-ui-theme='cyber'])
:root
:is(#left-panel-stack, #right-context-rail)
> #pp-toggles.collapsed
> .pp-header-row
@@ -216,7 +215,7 @@ html:not([lang='en']):not(:lang(zh)):not(:lang(ja))
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'])
:root
:is(#left-panel-stack, #right-context-rail)
:where(
.data-panel-inner,
@@ -233,7 +232,7 @@ html:not([lang='en']):not(:lang(zh)):not(:lang(ja))
transition: border-color var(--transition-fast);
}
:root:not([data-ui-theme='cyber'])
:root
:is(#left-panel-stack, #right-context-rail)
:where(
.data-panel-inner,
@@ -560,14 +559,12 @@ html:not([lang='en']):not(:lang(zh)):not(:lang(ja))
}
/* Display's title and toggle sit where the other panels' do: 14px of panel
padding plus a 4px header inset. The cyber theme sets its own insets. */
:root:not([data-ui-theme='cyber']) #pp-toggles.collapsed > .pp-header-row {
padding plus a 4px header inset. */
:root #pp-toggles.collapsed > .pp-header-row {
padding: 8px 18px;
}
:root:not([data-ui-theme='cyber'])
#pp-toggles:not(.collapsed)
> .pp-header-row {
:root #pp-toggles:not(.collapsed) > .pp-header-row {
padding: 0 10px;
}
@@ -580,10 +577,7 @@ html:not([lang='en']):not(:lang(zh)):not(:lang(ja))
}
/* 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 {
:root #pp-toggles > .pp-header-row .pp-collapse-btn {
width: 22px;
height: 22px;
font-size: 13px;
@@ -746,14 +740,6 @@ html:not([lang='en']) .pp-slider-row > .pp-slider-mini-label {
min-width: 200px;
}
.cyber-sonar-control {
display: none;
}
:root[data-ui-theme='cyber'] .cyber-sonar-control {
display: flex;
}
.cyber-sonar-toggle-row,
.cyber-sonar-setting {
min-width: 200px;
@@ -764,10 +750,6 @@ html:not([lang='en']) .pp-slider-row > .pp-slider-mini-label {
min-width: 48px;
}
:root[data-cyber-sonar='off'] .cyber-sonar-setting {
display: none;
}
/* Map Source tiles live with Visual Presets in the bottom command tray. */
.map-source-section {
display: grid;
File diff suppressed because it is too large. Load diff
+3 -5
View File
@@ -1020,10 +1020,8 @@ body.recording-mode .gev-panel-rail {
}
/* 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) {
theme panels, so every title and toggle sits 19px from its edge. */
:root :is(.data-panel-inner, .global-context-panel-inner) {
padding-right: 14px;
padding-left: 14px;
}
@@ -1328,7 +1326,7 @@ body.recording-mode #right-context-rail > [data-panel-id] {
}
/* Draw marks its on state with an accent edge, like an active DISPLAY
button; Cyber swaps in its red edge (cyber.css). */
button. */
#utilities-panel
.utilities-tools
.pp-toggle-btn:is([aria-pressed='true'], .active) {
+2 -25
View File
@@ -47,8 +47,8 @@
color: var(--text-primary);
-webkit-backdrop-filter: blur(22px) saturate(1.3);
backdrop-filter: blur(22px) saturate(1.3);
/* The blur follows the surface's shape (Cyber's cut corners). The dialog
has no outward popups for a clip to hide. */
/* The blur follows the surface's shape. The dialog has no outward popups
for a clip to hide. */
clip-path: var(--panel-surface-frame);
}
@@ -102,14 +102,6 @@
overflow-wrap: anywhere;
}
:root[data-ui-theme='cyber'] .data-library-stat {
border-radius: 0;
}
:root[data-ui-theme='cyber'] .data-library-stat-value {
font-family: var(--font-mono);
}
.data-library-intro {
margin: 0 0 10px;
color: rgba(232, 234, 237, 0.72);
@@ -321,21 +313,6 @@
font: 10px/1.5 var(--font-mono);
}
:root[data-ui-theme='cyber'] .data-library-dialog {
--glass-bg: rgba(18, 24, 27, 0.62);
width: min(600px, calc(100vw - 32px));
}
:root[data-ui-theme='cyber'] .data-library-item {
border-radius: 0;
}
:root[data-ui-theme='cyber']
:is(.data-library-icon, .data-library-badge--good) {
color: var(--cyber-red-bright);
border-color: var(--cyber-red-bright);
}
@media (max-width: 720px) {
.data-library-stats {
grid-template-columns: repeat(2, minmax(0, 1fr));
-5
View File
@@ -94,11 +94,6 @@
width: 100%;
}
}
:root[data-ui-theme='cyber'] .news-panel-inner {
border-radius: 0;
clip-path: var(--cyber-panel-frame);
box-shadow: var(--cyber-panel-shadow);
}
.news-readout {
display: flex;
+3 -1
View File
@@ -326,8 +326,10 @@ body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(
:is(#cesium-credits, #gev-credits) {
bottom: 1rem;
}
/* 8px above the bottom-right corner row (Power Up and the language picker:
32px tall, 14px up), as outside the Omnibar layout. */
#intel-hud[data-variant='tactical'] .hud-bottom-right {
bottom: calc(4.2rem - 26px);
bottom: 3.375rem;
}
#intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
.hud-bottom-left {
+7 -15
View File
@@ -329,7 +329,7 @@
:root[data-scope-mask='off']
#intel-hud:is([data-variant='minimal'], [data-variant='tactical'])
.hud-readout,
:root[data-scope-mask='off']:not([data-ui-theme='cyber']) .scene-text-holdout {
:root[data-scope-mask='off'] .scene-text-holdout {
background: rgba(0, 0, 0, 0.7);
box-shadow: none;
border-radius: 2px;
@@ -357,9 +357,7 @@
#intel-hud:is([data-variant='minimal'], [data-variant='tactical'])
:is(.hud-top-right, .hud-bottom-right)
.hud-readout,
:root[data-scope-mask='off']:not([data-ui-theme='cyber'])
#style-indicator
.scene-text-holdout {
:root[data-scope-mask='off'] #style-indicator .scene-text-holdout {
margin-inline-start: auto;
}
@@ -399,9 +397,7 @@
text-overflow: ellipsis;
}
:root[data-scope-mask='off']:not([data-ui-theme='cyber'])
#title-bar
h1::before {
:root[data-scope-mask='off'] #title-bar h1::before {
content: '';
position: absolute;
inset: -0.12em -6px;
@@ -410,18 +406,16 @@
background: rgba(0, 0, 0, 0.7);
}
:root[data-scope-mask='off']:not([data-ui-theme='cyber'])
:root[data-scope-mask='off']
:is(#title-bar .subtitle, #style-indicator .indicator-label) {
color: var(--text-secondary);
}
:root[data-scope-mask='off']:not([data-ui-theme='cyber']) #title-bar .subtitle {
:root[data-scope-mask='off'] #title-bar .subtitle {
margin-top: 8px;
}
:root[data-scope-mask='off']:not([data-ui-theme='cyber'])
#style-indicator
.indicator-value {
:root[data-scope-mask='off'] #style-indicator .indicator-value {
margin-top: 4px;
}
@@ -431,8 +425,6 @@
display: none;
}
:root[data-scope-mask='off']:not([data-ui-theme='cyber'])
#title-bar
.frame-rate-readout {
:root[data-scope-mask='off'] #title-bar .frame-rate-readout {
margin-top: 6px;
}
-17
View File
@@ -42,23 +42,6 @@
--panel-surface-collapsed-width: var(--left-collapsed-width);
}
:root[data-ui-theme='cyber'] {
--panel-surface-font: var(--font-mono);
--panel-surface-detail: var(--cyber-panel-surface-detail);
--panel-surface-frame: var(--cyber-panel-frame);
--panel-surface-shadow: var(--cyber-panel-shadow);
--panel-surface-title: var(--cyber-red-bright);
--panel-surface-error: var(--cyber-red-bright);
--panel-surface-width: var(--cyber-panel-width);
--panel-surface-collapsed-width: var(--cyber-panel-collapsed-width);
}
:root[data-ui-theme='cyber']
#right-context-rail
> [data-panel-id]:has(> [data-panel-surface]) {
--panel-surface-width: var(--cyber-right-panel-width);
}
:is([data-panel-surface], [data-panel-popup]) {
isolation: isolate;
min-width: 0;
+37 -3
View File
@@ -104,8 +104,8 @@
/* In clean view the screen-edge gutters stay empty: the HUD's vertical edge
readouts (ONA / COLL on the left, BAND / BITS / LVL on the right) are not
shown. Cyber lays its HUD out differently and keeps them. */
:root:not([data-ui-theme='cyber']) body.ui-clean-view #intel-hud .hud-edge {
shown. */
:root body.ui-clean-view #intel-hud .hud-edge {
display: none !important;
}
@@ -116,9 +116,43 @@
bottom: calc(2vh + 6.5rem - 26px);
}
/* From 1200px the dock sits 74px up (command-dock.css) and clears both
corners, which are at most ~340px wide beside a ~500px dock. The readout
sits 8px above the bottom-right corner row (Power Up and the language
picker: 32px tall, 14px up) and the coordinates start level with it. The
World Timeline sits on the dock's floor between the corners (44rem
narrower than the screen), so the corners stay put while it shows. */
@media (min-width: 1200px) {
#intel-hud[data-variant='tactical'] .hud-bottom-right {
bottom: calc(4.2rem - 26px);
bottom: 3.375rem;
}
#intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
.hud-bottom-left,
:root[data-scope-mask='off']
#intel-hud[data-variant='minimal']
.hud-bottom-left {
bottom: calc(3.375rem + 26px);
}
#world-timeline {
width: min(820px, calc(100vw - 44rem));
}
/* The raised dock is 74px - 2vh higher than the bottom-edge dock these
height budgets were written for. Toasts keep 12px above the 62px dock. */
#gev-voice-control .gev-voice-panel {
max-height: min(
28rem,
max(
7.5rem,
calc(100dvh - 12rem - 74px + 2vh - var(--gev-provider-lift, 0px))
)
);
}
body:not(.ui-clean-view):not(.recording-mode):not(.cockpit-mode) #toast {
bottom: calc(148px + var(--world-timeline-lift, 0px));
}
}
-6
View File
@@ -92,12 +92,6 @@ html:lang(he) :is(#intel-hud, #cockpit-hud) {
left: var(--right-rail-x);
}
}
@media (min-width: 961px) and (min-height: 650px) {
html[dir='rtl'][data-ui-theme='cyber'] #right-context-rail {
right: auto;
left: calc(51px + var(--panel-rail-clearance));
}
}
/* The dock's wings swap sides (Location on the right, Visual presets on the
left), so each slide-up tray is anchored from the wing's outer edge and
+1 -1
View File
@@ -220,7 +220,7 @@ html:not([lang='en']) #scene-panel .scene-controls .scene-btn {
}
/* One primary action per step: CAPTURE SHOT and PLAY. The panel id keeps
this above Cyber's shared button surface. */
this above the shared button surface. */
#scene-panel .scene-btn-primary:not(:disabled) {
color: var(--accent);
border-color: color-mix(in srgb, var(--accent) 55%, transparent);
+89
View File
@@ -0,0 +1,89 @@
/* Sonar is an opt-in visual style over any HUD layout (Display > HUD >
Sonar). Off by default; cockpit mode and reduced motion keep the map still. */
.hud-sonar {
display: none;
}
:root[data-cyber-sonar='on'] #intel-hud .hud-sonar {
position: fixed;
top: 50%;
left: 50%;
display: block;
width: min(
var(--cyber-sonar-size-vw, 80vw),
var(--cyber-sonar-size-vh, 104vh)
);
aspect-ratio: 1;
border: 1px solid rgba(226, 235, 236, 0.2);
border-radius: 50%;
opacity: var(--cyber-sonar-visual-intensity, 0.57);
overflow: hidden;
pointer-events: none;
transform: translate(-50%, -50%);
box-shadow:
0 0 0 1px rgba(196, 84, 84, 0.12),
inset 0 0 48px rgba(196, 84, 84, 0.035);
}
:root[data-cyber-sonar='on'] #intel-hud .hud-sonar::before,
:root[data-cyber-sonar='on'] #intel-hud .hud-sonar::after {
position: absolute;
inset: 0;
border-radius: inherit;
content: '';
}
:root[data-cyber-sonar='on'] #intel-hud .hud-sonar::before {
opacity: 0.52;
background: repeating-radial-gradient(
circle,
transparent 0 calc(var(--cyber-sonar-ring-step, 12.5%) - 1px),
rgba(226, 235, 236, 0.17) calc(var(--cyber-sonar-ring-step, 12.5%) - 1px)
var(--cyber-sonar-ring-step, 12.5%)
);
}
:root[data-cyber-sonar='on'] #intel-hud .hud-sonar::after {
background: conic-gradient(
from 0deg,
rgba(245, 250, 250, 0.3) 0deg,
rgba(235, 116, 116, 0.14) 0.55deg,
rgba(196, 84, 84, 0.075) var(--cyber-sonar-sector-quarter, 6deg),
rgba(150, 206, 215, 0.035) var(--cyber-sonar-sector-middle, 14.4deg),
transparent var(--cyber-sonar-sector-width, 24deg) 360deg
);
filter: drop-shadow(0 0 4px rgba(226, 235, 236, 0.1));
mask-image: radial-gradient(
circle,
#000 0 84%,
rgba(0, 0, 0, 0.65) 92%,
transparent 100%
);
transform-origin: 50% 50%;
will-change: transform;
animation: cyber-sonar-sweep 5.2s linear infinite;
animation-delay: var(--cyber-sonar-phase-delay, 0ms);
}
@keyframes cyber-sonar-sweep {
to {
transform: rotate(360deg);
}
}
#cyber-sonar-status:empty {
display: none;
}
:root[data-cyber-sonar='on'] body.cockpit-mode #intel-hud .hud-sonar,
:root[data-cyber-sonar='on'] #intel-hud:not(.active) .hud-sonar {
display: none;
}
@media (prefers-reduced-motion: reduce) {
:root[data-cyber-sonar='on'] #intel-hud .hud-sonar::after {
display: none;
animation: none;
}
}
+24 -68
View File
@@ -158,9 +158,8 @@ body.mobile-shell #pp-toggles .visual-presets {
margin-top: 0.2rem;
}
/* The card skin below is the default look; the Cyber HUD keeps its own red
skin for these controls (cyber.css), so the skin stands aside there. */
:root:not([data-ui-theme='cyber']) #pp-toggles .pp-toggle-group {
/* The Display panel's card skin. */
:root #pp-toggles .pp-toggle-group {
width: 100%;
overflow: hidden;
background: rgba(255, 255, 255, 0.03);
@@ -169,11 +168,8 @@ body.mobile-shell #pp-toggles .visual-presets {
}
/* The header row of a card, and the lone Clean UI button. */
:root:not([data-ui-theme='cyber'])
#pp-toggles
.pp-toggle-group
> .pp-toggle-btn,
:root:not([data-ui-theme='cyber']) #pp-toggles .pp-panel-body > .pp-toggle-btn {
:root #pp-toggles .pp-toggle-group > .pp-toggle-btn,
:root #pp-toggles .pp-panel-body > .pp-toggle-btn {
position: relative;
box-sizing: border-box;
width: 100%;
@@ -188,20 +184,20 @@ body.mobile-shell #pp-toggles .visual-presets {
-webkit-backdrop-filter: none;
}
:root:not([data-ui-theme='cyber']) #pp-toggles .pp-panel-body > .pp-toggle-btn {
:root #pp-toggles .pp-panel-body > .pp-toggle-btn {
background: rgba(255, 255, 255, 0.03) !important;
border: 1px solid rgba(255, 255, 255, 0.07) !important;
border-radius: 10px !important;
}
:root:not([data-ui-theme='cyber']) #pp-toggles .pp-toggle-btn .pp-icon {
:root #pp-toggles .pp-toggle-btn .pp-icon {
width: 18px;
font-size: 15px;
text-align: center;
color: rgba(199, 214, 222, 0.75);
}
:root:not([data-ui-theme='cyber']) #pp-toggles .pp-toggle-btn .pp-label {
:root #pp-toggles .pp-toggle-btn .pp-label {
color: rgba(236, 244, 248, 0.9);
font-family: var(--font-mono);
font-size: 0.62rem;
@@ -211,14 +207,8 @@ body.mobile-shell #pp-toggles .visual-presets {
/* An on/off pill at the right of every button header (Scope keeps its
checkbox, which already says it). */
:root:not([data-ui-theme='cyber'])
#pp-toggles
.pp-toggle-group
> button.pp-toggle-btn::after,
:root:not([data-ui-theme='cyber'])
#pp-toggles
.pp-panel-body
> button.pp-toggle-btn::after {
:root #pp-toggles .pp-toggle-group > button.pp-toggle-btn::after,
:root #pp-toggles .pp-panel-body > button.pp-toggle-btn::after {
/* The state is the button's own (aria-pressed); the pill only shows it. */
content: var(--pp-pill-off, 'OFF') / '';
margin-inline-start: auto;
@@ -231,68 +221,40 @@ body.mobile-shell #pp-toggles .visual-presets {
border-radius: 999px;
}
:root:not([data-ui-theme='cyber'])
#pp-toggles
.pp-toggle-group
> button.pp-toggle-btn.active::after,
:root:not([data-ui-theme='cyber'])
:root #pp-toggles .pp-toggle-group > button.pp-toggle-btn.active::after,
:root
#pp-toggles
.pp-toggle-group
> button.pp-toggle-btn[aria-pressed='true']::after,
:root:not([data-ui-theme='cyber'])
#pp-toggles
.pp-panel-body
> button.pp-toggle-btn.active::after {
:root #pp-toggles .pp-panel-body > button.pp-toggle-btn.active::after {
content: var(--pp-pill-on, 'ON') / '';
color: #7af0ff;
border-color: rgba(54, 220, 255, 0.5);
background: rgba(54, 220, 255, 0.1);
}
:root:not([data-ui-theme='cyber']) #pp-toggles .pp-toggle-btn.active .pp-icon,
:root:not([data-ui-theme='cyber'])
#pp-toggles
.pp-toggle-btn[aria-pressed='true']
.pp-icon,
:root:not([data-ui-theme='cyber']) #pp-toggles .pp-toggle-btn.active .pp-label,
:root:not([data-ui-theme='cyber'])
#pp-toggles
.pp-toggle-btn[aria-pressed='true']
.pp-label {
:root #pp-toggles .pp-toggle-btn.active .pp-icon,
:root #pp-toggles .pp-toggle-btn[aria-pressed='true'] .pp-icon,
:root #pp-toggles .pp-toggle-btn.active .pp-label,
:root #pp-toggles .pp-toggle-btn[aria-pressed='true'] .pp-label {
color: #7af0ff;
}
:root:not([data-ui-theme='cyber'])
#pp-toggles
.pp-toggle-group
> .pp-toggle-btn:hover,
:root:not([data-ui-theme='cyber'])
#pp-toggles
.pp-panel-body
> .pp-toggle-btn:hover {
:root #pp-toggles .pp-toggle-group > .pp-toggle-btn:hover,
:root #pp-toggles .pp-panel-body > .pp-toggle-btn:hover {
background: rgba(255, 255, 255, 0.04) !important;
}
:root:not([data-ui-theme='cyber'])
#pp-toggles
.pp-scope-toggle
input[type='checkbox'] {
:root #pp-toggles .pp-scope-toggle input[type='checkbox'] {
margin-inline-start: auto;
}
/* Settings inside a card: separated by hairlines, no boxes of their own. */
:root:not([data-ui-theme='cyber'])
:root #pp-toggles .pp-toggle-group .pp-slider-row.visible,
:root
#pp-toggles
.pp-toggle-group
.pp-slider-row.visible,
:root:not([data-ui-theme='cyber'])
#pp-toggles
.pp-toggle-group
.pp-slider-row:not([class*='cyber-sonar']):is(
.visible,
#scope-slider-row,
#scope-opacity-row
) {
.pp-slider-row:is(.visible, #scope-slider-row, #scope-opacity-row) {
margin: 0;
padding: 7px 12px;
background: transparent;
@@ -302,14 +264,8 @@ body.mobile-shell #pp-toggles .visual-presets {
}
/* The Dense button lights green elsewhere; in a card it uses the shared pill. */
:root:not([data-ui-theme='cyber'])
#pp-toggles
.pp-toggle-group
> .pp-toggle-btn.panoptic,
:root:not([data-ui-theme='cyber'])
#pp-toggles
.pp-toggle-group
> .pp-toggle-btn.active {
:root #pp-toggles .pp-toggle-group > .pp-toggle-btn.panoptic,
:root #pp-toggles .pp-toggle-group > .pp-toggle-btn.active {
color: inherit;
}
Loaded 100 of 112 files, more files were not shown because too many files have changed in this diff. Show more