Merge pull request #1824 from bilawalsidhu/manjunath/search-bar

Add the Omnibar: one field for places, layers, commands and questions
This commit is contained in:
Sameh Khamis authored and GitHub committed 2026-11-18 15:44:16 -08:00
commit 35b87c75f2
40 files changed
+4865 -78

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
- Add the Omnibar: one field for places, coordinates, map items, layers
and commands, with a strip of nearby places, guided walks through the
real controls (found by everyday wording such as "how do I change the
map style"), plans such as "go to Austin and show flights", and Ask GEV
for questions. On desktop the dock rises to a bar above the bottom with
the map credits below it on the Power Up row, World Time hides while
suggestions or chat are open, and the dock's Location and Visual trays
and the HUD's mode readout give way to the Omnibar and the Visual panel.
Phones get the field too, with the HUD readout under it on short
screens. The last 20 places you went to from the Omnibar are kept in
this browser (`localStorage` `gev:omnibar:recent-places`)
(manjunath22466, samehkhamis, #1824).
+285
View File
@@ -7814,6 +7814,291 @@ and unreachable upstream (502/504) separately from road geometry.
- `partial` is a feed state of its own, ranked between `fallback` and `nominal`, so one partial layer, or partial plus nominal, reads partial, not off or nominal (HUD, voice view state, `analyst_query`, `brief`, the agent world packet). Its narration note says coverage is incomplete rather than not live.
- A summary asked for before the camera starts moving never paints over the next view: `moveStart` marks the summary dirty and bumps its revision, as `moveEnd` does, aborts the request in flight and stops a reply still typing; neither a reply nor a fallback line (on an error, the 5 s timeout, the abort, or a failed context build) paints once the revision has moved. A dropped request forgets its signature and a timeout counts as a failure, so the next 15 s tick asks again even over the same place. An interrupted typewriter reply also forgets its signature; fully displayed answers remain reusable.
### Omnibar
The desktop Omnibar sits above the footer with the existing mic and chat
buttons on either side. Suggestions open upward. On phones the Omnibar is
a field near the top, beside the Search sheet, and opens downward. While voice is on, the desktop field shows
three audio traces in place of the search text and icon. The thinking dots
sit on the field's top edge. World Time appears immediately above the dock
and hides while suggestions, chat, or voice settings are visible. `/`
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.
Pending owner decision: in the desktop Omnibar layout
(`src/ui/styles/omnibar-dock.css`) the legacy Location and Visual trays of
the command dock are hidden (`#command-dock > :is(#location-bar,
#control-panel)`), as is the tactical and minimal HUD's mode readout
(`.hud-readout:has(> #hud-mode)`). Search moves to the Omnibar and presets to
the Visual rail; the phone shell and exclusive modes keep their layouts.
The field offers places, latitude/longitude and grid coordinates, named map
entities, and layer controls. The strip can show cities and landmarks,
nearby small places from the bundled Wikidata packs, selected items and
drawing shapes. The cities of a state or country are those inside its
extent and in its country (by the ISO code Photon returns); with only one of
the two known, that one decides. Selecting a
guided result highlights the existing app controls. "Show me how", "how do
I …" and "how to …" find a walk by the words people use: a layer's name
("how to turn on flights"), or a feature's (`FEATURE_TOPICS` in
`src/ui/omnibarRows.js`): the style or look ("change the map style"), the
map underneath ("change the map", "switch to OpenStreetMap"), the HUD,
north or the compass, tilt, the globe or a reset ("get back to the globe"),
sharing, clearing all layers, and drawing and measuring ("how to measure
distance": open Utilities, press Draw, pick Line for a distance or Area for
its size). A leading `>` opens the
command menu; use it for exact layer commands such as `> show flights`.
The rows come from one pure pipeline, `createOmnibar` in
`src/ui/omnibarRows.js`: the line is normalised once (`normalizeLine` in
`src/ui/omnibarIntent.js`, through `readLine` in `src/ui/omnibarRows.js`:
full-width forms folded, curly apostrophes made straight, a closing full
stop or "!" dropped (an initial's kept, as in "Washington D.C."), and a
"please" before or after a request dropped, never one in a name ("Please
Touch Museum", "Pretty Please")), read once (`parseOmnibar`), turned into
rows, and ordered by the Enter rule; the same reader decides what may go
to Photon and what is a count request. A whole line searched as a place is
searched as typed ("Paris, Texas.", "Yahoo!"). The
component (`Omnibar.vue`) supplies the layers, Photon's answers, the map's
items and the selection, and runs the chosen row; the strip of chips under
the field (landmarks, cities of a region, villages, recent places, draw
shapes) is built in the component from the same normalised line. What Enter does with no
row chosen follows one rule, in `src/ui/omnibarEnter.js` (`enterDefault`),
pinned by an input-to-outcome table in `src/ui/omnibarRows.test.mjs` and
by the mounted table in `src/ui/commandDock.test.mjs`. Only the first row can be the default; an
empty field and a bare `>` have none; the pointer never chooses a row
(hovering then pressing Enter runs the default, a click runs the row), and
the arrow keys choose any row. Enter performs an action (a plan, a layer
switch, a command, Ask GEV) only when the line asks for it outright:
- the action's own clause starts with a verb from the one list
(`ACTION_VERB` in `src/ui/omnibarIntent.js`, read in any letter case by
`hasActionVerb`): show, hide, turn, switch, toggle, enable, disable, add,
remove, display (with something after it), play, start, open, close,
enter, listen, tune, mute, unmute, follow, track, draw, measure, share,
copy, reset, silence, pause, "nearest plane" and the like, or a clause
ending in "on" or "off" ("radio off"). A style, map, camera move, HUD or
layer followed by "on" or "off" reads as that switch ("noir off" and
"turn off noir" go back to the normal style, "orbit off" stops the camera,
"osm off" runs nothing), never as a place called "off"; words that also start names count
only alone or before what they act on ("clear the map", "zoom in",
"tilt", "orbit", "stop the radio", "kill the radio", "face north"). Verbs
are read per clause, so a verb inside a place's name asks for nothing
("radio near Clear Lake", "radio in Show Low", "radio near Stop,
Arkansas" search the place). A layer is asked for only by a switch (show,
display, add, enable, turn or switch on, hide, remove, disable, turn or
switch off) right before its word: "Show Low radio" and "Kill Devil Hills
radio" name places, and a verb with a name left beside its keywords asks
for nothing else in its clause ("Show Low noir", "Start Point noir",
"Track Hill noir"). A clause joined to a "go to"
clause by "and" or "then" counts as asked ("go to Paris, Texas and
noir");
- or it is a command's exact label, alone or after `>` ("North up", "Noir",
"> Clear all layers"). A command row runs on nothing else: a bare switch
verb ("hide", "turn off", "disable") only lists what it could switch;
- or a data layer's whole shown name or synonym alone, which names that
layer as a command's label does ("flights", "earthquakes", "Satellite");
- or, for Ask GEV, it is a real question: it ends with "?" (full-width
"?" and Arabic "؟" too), has a word of two letters or more, and has a
question's form (below), or two words in a
non-Latin script; or five Han, Kana or Hangul characters ("what?", "??",
"N Y?", "New York?", "Truth or Consequences?" and "東京都?" are not:
Ask GEV is offered first and Enter runs nothing; small talk such as "what's up" or "how's it going" is never one); or, without "?", it
starts with
what/where/when/who/why/how/which followed by is, are, was, do, does,
did, can, could, should, would, will, 's, many, much, far, long or to,
then has a word about something ("what is here", "how far is paris"; not
"what is", "how to", "who is it"), and is not written as a name (three
words or more, each capitalised: "Where Is My Mind"). A line starting
with an auxiliary and a pronoun or determiner (is it, can you, do it…)
asks only with "?": without it, Ask GEV is offered first and Enter runs
nothing ("can you show me", "is it raining in tokyo"), and with a capital
after its first two words it is a name and searches the place ("Can You
Imagine", "Do it Best Hardware"). "Can Tho City" and "Is Kinabalu Park"
are places. A line
with a comma and no "?" is a place ("Why, Arizona"), never a question.
Any other line, small talk and question words included ("why", "help",
"what cheer", "List"), still offers the place row first, with Ask GEV
after it.
A whole layer name with a place after near, in, around, over, across or
above ("flights near Tokyo", "earthquakes above m5 in japan") asks outright
too; after "of" or "at" the line may be a name and the whole line is
offered as a place first ("Planes of Fame Air Museum", "Boats at Sea"). Keywords without a
verb ask for nothing, however many clauses they fill ("New York City
noir", "Fire and Rain", "noir and cctv near austin, north up"): with a
place after near or in that place is searched, and otherwise the whole
line is offered as a place first ("Storm Lake and Spencer", "Thermal and
Indio"), the plan after it. Draw opens on Enter only for "draw" itself or a
draw verb with something to draw ("draw a line"; not "Draw Bridge"), and a
guided walk found by forgiving a typo, or on a line written as a title
("How To Train Your Dragon"), is offered, never run. A switch verb before
a capitalised name that names no layer is a place ("Remove Island",
"Toggle Inn"). A
layer row runs only when the line names that layer before any other, by a
whole word of its shown or English name (never its id, and not a word of
kind such as local, global, live, world, new, open, data, map, view or
level) or a synonym, with a plural "s" allowed from four letters
("flights" yes; "a", "display", "Local", "Global", "new" no). "show
flights" with Live Flights already on offers Live Flights, which then
switches nothing; Military Flights, which also has the word, is only
offered after it. Words about a layer after a switch are no place ("show radio
stations", "show flights here"); without the switch the line may be a name
("Train Station"). A line of more than six words left over as a
place (ten with a number in it), or of more than eight words that asks for
nothing outright, is a sentence (pasted text, a remark): it is never sent to
Photon, Ask GEV is offered, and so is a row that searches the whole line as a
place when picked ("San Miguel de las Piedras Primera Sección"); Enter runs
neither. A word that is
both a bundled place's name and, alone, a command, style or layer word
(`PLACE_WORDS` in `src/ui/omnibarEnter.js`: Bike, Hurricane, Normal, Rain,
Ski, Street, Thermal) searches the place first and offers the switch
second. The list comes from sweeping every bundled name (139,502), alone
and with " radio" and " noir" after it, through the mounted Omnibar; after
it, none defaults to anything but a place. A test samples about 2,000 of
them. Some actions need more: sound (the Radio layer and command),
clearing the map, closing panels and the cockpit need a verb or their exact
label ("turn on radio", "close all panels", "enter cockpit"; not "radio near
tokyo" or "Radio, Tokyo"), and the microphone, sharing the view, resetting
it and the globe view need their exact label ("Talk to GEV", "Share this
view", "Reset view", "Globe view"; not "mic", "share", "home" or "start
over").
Otherwise the place row is the default and moves first ("Thermal,
California", "radio near tokyo" searches Tokyo), and any plan or command is
offered after it; a line with neither ("hi", "NY", "?") runs nothing. "hide everything near tokyo" clears the layers and flies to
Tokyo. Following needs a callsign or ICAO address (letters and a digit), a
nine-digit MMSI or the name of something loaded on the map, so "Track
Hill" and "Track 29" are places; "nearest plane" counts alone or before a
place ("Nearest Plane Crash Site" is a name), and "goto" only with a place
after it ("Goto" is a town). A row chosen with the arrow keys is kept by its key while rows
arrive above it, and the default comes back if it goes away. After a row
runs with Enter, the field empties and keeps focus for the next line on
desktop; a tapped or clicked row lets go of it, and on the phone shell any
row does (so the keyboard does not stay over the map), and so do Ask GEV, the mic, the cockpit, following, a guided
walk, and any row while drawing is on (the draw tool reads Enter, Backspace
and Esc). Escape closes the list, and on an empty, closed field lets go of
it, so the app's own keys work again. While voice
is on, the list is closed (not expanded) and Enter runs nothing. Text that
may be private is never looked up or searched while typed or on Enter: only
things already loaded on the map may match it, locally, and when only a
long run of digits makes it look private and it has words (an address can:
"Москва, ул. Тверская, д. 13, 125009") one row searches it as a place only
when picked (see below).
After "go to" (or "fly to" and the like) the rest of the clause, and a
following part after a comma that has no verb, is the place, read before
any keyword in it: "go to Thermal, California" only searches there. A
request ending that clause is peeled off and offered as a plan after the
place: "in", "with" or "at" and a style, map or layer ("go to tokyo in
noir", "go to London with flights"), a switch and a layer ("go to tokyo show
flights"), or a comma part that is exactly a style, map, camera move or
layer ("go to Tokyo, north up"). A line with one keyword and no verb beside
the rest of a name ("Tilt Cove", "tokyo traffic", "Hurricane, Utah") offers
the whole line as a place first and the plan second. Further places joined
with "and" are offered as their own rows. Things loaded on the map that
match the line are offered too: a callsign, tail number or transponder
code puts them first, and otherwise the place row keeps the top, so
"Hamburg" goes to the city before the ship HAMBURG. An unrecognized explicit command
stays in search. Questions can be sent through Ask GEV, which uses the
existing typed chat.
Han, Hangul and Kana names are looked up from two characters (東京), others
from three.
Plans run step by step, and a layer step reads the layer's state when it
runs, not when the line was read. A step the app refuses (an action
answering `ok: false`, a layer switch answering `false`, a globe action no
connected owner answers, a panel to open with no rail button) stops the
plan and shows the same error under the field as a single action, with
the action's own short spoken reason (`say`) when it gives one and the
interface is in English (the runner speaks English, so other languages
get the translated message alone); a flight cancelled by a newer
one stops the plan quietly. A running plan is superseded, and none of its
later steps run, when the field's text changes, another row or chip is
chosen, Escape is pressed, the field is reset after a finished choice, or the
Omnibar unmounts. Focus leaving the field (a click on the map, the mic, the
search shortcut) does not cancel it. The guide's placement check pauses
while the tab is hidden.
A place search on its own runs through Location and shares its cancellation
and errors, keeping the separate Location draft intact.
While typing, a short line (six words or fewer, no `?`, not a command,
coordinates, a hex code, a callsign such as UAL2110 or N123AB, and nothing
that may be private) is sent to
Photon for place suggestions: at most one request every 500 ms per tab,
and none for a minute after a refusal. Photon is the keyless geocoder the
place search already uses; a submitted search is not part of this spacing.
A line that may be one name ("Satellite Beach") is looked up whole. While
its suggestions show, or a recent-place chip that came from them, the
OpenStreetMap credit shows too; recent chips from the bundled packs credit
Wikidata. Private text, by `mayBePrivate` in
`src/search/placeSuggestions.js`, is never sent to Photon, offered as a
place, searched or sent to GEV; only things already loaded on the map may
match it, locally. The line is read after NFKC, so full-width letters,
digits and "@" count, and digits of any script count as digits. It is
any line with: an "@" with something right on both sides, ending a word,
starting a lowercase handle ("@jdoe"), or spaced before a domain ("john @
gmail.com") (an email address or a handle, also while it is typed; spaced, as in "Nanjampeta @
Chandambylu", it is part of a name); seven digits or more with nothing but spaces,
punctuation, symbols or format characters between them (a phone, card,
SSN or account number or its start: "+1 415 555", "4111 1111", "123 45
6789", "123456789", "4111.1111.1111.1111", "123–45–6789"; a street address's house number
and its postcode are read apart: five digits, or between the street and
the city "00-950", "111 21", "125009", "1100-053", or four digits after a
comma ("Straße 120, 1070 Wien"); and so are a US ZIP+4 after a word,
a Brazilian CEP, a Japanese postcode after "〒" or before the address, and
digits on either side of "#", so "Hauptstrasse 12 10115 Berlin", "DC
20500-0003", "〒100-0001 東京都千代田区" and "Calle 100 # 19-61" are places,
while a seven-digit postcode alone such as "Tel Aviv 6100000" still reads
as private); a phone number written with dots; two letters, two
digits and ten more letters or digits (an IBAN's shape); "password",
"passcode", "passwd", "ssn", "pw", "pwd" or "bearer" followed by anything,
"token", "secret", "api key", "key" or "pass" followed by ":" or "=", a
door, access, gate, alarm, entry or security code followed by a digit, "api
key", "access token" or "secret key" followed by a word of six characters
or more, the word for "password" in the interface's languages
(contraseña, Passwort, mot de passe, пароль…) followed by anything, or "pin"
(also "pin code", "pin number", "pin is") followed by a digit; a word
starting `sk_`, `sk-`, `rk_`, `pk_live`, `ghp_` or a Slack token's `xoxb-` and the like (any case) or
`AIza`, `eyJ` or `AKIA`; or a word that may be a password or key, with letters and digits mixed
within one run (a number beside a word, as in "Yanino-1", "2-chōme" or
"Route-66", is a name): eight characters or more, six or more with four
letters and a digit ("hunter22", "Area51"), or six or more with letters,
digits and a symbol ("Tr0ub4dor&3"). The password words match whole words
only ("Sachsenhausen" is a place). Over the bundled names (139,502), five
read as private: two with stray digits ("Maliga0N", "Jerónim67") and three
with number lists or codes. When the text may be private the field says
so ("Looks private, so nothing is searched or sent"), and a line whose
only private sign is an address-sized run of digits (no group over six
digits, nine at most in all, counted as they fold, and no word such as
card, code, key, phone or account beside them, in English and some other
European languages; compounds such as "Kreditkartennummer" and words in
other scripts are not read), with words beside it, gets a row
to search it as a place on purpose ("Search … as a place anyway"), which
runs the ordinary place search and its online services only when picked; a
bare number, an email or handle, a password, key, code or IBAN gets none.
A nine-digit number or a short phone number written with no such word
still gets the row: only picking it sends anything. One-time and verification codes,
OTP, 2FA, MFA, CVV and CVC values, "card ending" digits, passphrases,
recovery or seed phrases, "my secret is …" and an email spelled out ("john
at example dot com") are private too. Text that parses as coordinates or a
grid reference is not private. A place's name is six words at most, or ten
when it has a number in it (an address: "1600 Pennsylvania Ave NW
Washington DC 20500"). The places picked from the Omnibar's rows and chips that carry a position
(a typed name searched as a place, or a plan's place, is not kept; the last 20:
name, position and where the name came from) are kept in this browser's
`localStorage` under `gev:omnibar:recent-places` for the strip; nothing
clears them but the browser's own site data. Setting `PHOTON_URL`
empty turns the suggestions off along with it. Small places come from the
bundled Wikidata packs and are never looked up online; a small place with
the name of a city within 3 km in the same country is that city, and only
the city is listed. At most 64 detail tiles are kept in memory, the least
recently used dropped first.
### Place-search providers
Coordinate input requires exactly two nonempty components; extra comma or semicolon separators decline to geocoding rather than silently choosing a location.
+4 -1
View File
@@ -1588,5 +1588,8 @@
"scripts/wikidataPlaceTiles.mjs",
"src/tooling/wikidataPlaceTiles.test.mjs",
"src/ui/omnibarIntent.test.mjs",
"src/ui/omnibarRows.test.mjs"
"src/ui/omnibarRows.test.mjs",
"src/ui/styles/omnibar-dock.css",
"src/ui/styles/guide.css",
"src/ui/commandDock.test.mjs"
]
+19 -2
View File
@@ -289,7 +289,23 @@
"src/render/modelParts.js",
"src/ui/views/panels/AircraftModelHero.vue",
"src/data/retryableLoad.js",
"src/data/local_data/wikidata_places/files.js"
"src/data/local_data/wikidata_places/files.js",
"src/ui/views/panels/Omnibar.vue",
"src/exclusiveSurfaces.js",
"src/geoDistance.js",
"src/ui/omnibarGuide.js",
"src/cityPois.js",
"src/search/photonSetting.js",
"src/sources/requestDeadline.js",
"src/ui/omnibarEnter.js",
"src/ui/omnibarIntent.js",
"src/data/placeNames.js",
"src/search/plusCode.js",
"src/keylessGeocoder.js",
"src/ui/omnibarRows.js",
"src/search/gridReference.js",
"src/search/coordinateParser.js",
"src/search/placeSuggestions.js"
],
"external": ["vue", "pinia", "vue-i18n"]
},
@@ -1657,7 +1673,8 @@
"src/ui/entityContextBridge.js",
"src/data/trackingClickGesture.js",
"src/ui/stores/sceneSharing.js",
"src/maps/attribution.js"
"src/maps/attribution.js",
"src/data/dataCredits.js"
],
"external": [
"cesium",
+226 -33
View File
@@ -6,6 +6,12 @@ import test from 'node:test';
import { fileURLToPath } from 'node:url';
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
// The Omnibar's desktop footer (src/ui/styles/omnibar-dock.css) is part of
// the cascade below like every other stylesheet; its rules carry the
// Omnibar scope, so they are modelled as a layout of their own.
const omnibarCss = readStylesheet(
path.join(ROOT, 'src/ui/styles/omnibar-dock.css'),
);
const css = readStylesheet(path.join(ROOT, 'style.css'));
/*
@@ -125,11 +131,56 @@ function specificity(selector) {
return [ids, classes, types];
}
/** Flatten style.css into rules carrying their raw media stack. */
/** Collapse whitespace and the padding inside brackets of a selector. */
const tidySelector = (part) =>
part
.replace(/\s+/g, ' ')
.trim()
.replace(/\(\s+/g, '(')
.replace(/\s+\)/g, ')');
/**
* A nested selector resolved against its parent rule's selectors, as CSS
* nesting does: `&` stands for the parent, and a selector without one is a
* descendant of it.
*/
function nestSelectors(parents, head) {
const own = splitTopLevel(head, ',').map(tidySelector).filter(Boolean);
if (!parents) return own;
return parents.flatMap((parent) =>
own.map((part) =>
part.includes('&') ? part.replaceAll('&', parent) : `${parent} ${part}`,
),
);
}
/**
* Flatten style.css into rules carrying their raw media stack. Nested style
* rules (CSS nesting) and media queries nested in a rule are resolved to
* full selectors, so a nested rule is modelled like any other.
*/
function flattenRules(source) {
const src = source.replace(/\/\*[\s\S]*?\*\//g, '');
const rules = [];
const mediaStack = [];
// Open blocks, innermost last: media queries and style rules.
const stack = [];
const mediaStack = () =>
stack.filter((frame) => frame.media).map((frame) => frame.media);
const parentRule = () =>
[...stack].reverse().find((frame) => frame.rule)?.rule || null;
const declare = (text) => {
const rule = parentRule();
const trimmed = text.trim();
if (!rule || !trimmed) return;
const colon = trimmed.indexOf(':');
if (colon < 0) return;
const value = trimmed.slice(colon + 1).trim();
rule.decls.push({
prop: trimmed.slice(0, colon).trim().toLowerCase(),
value: value.replace(/\s*!important$/i, '').trim(),
important: /!important\s*$/i.test(value),
});
};
let index = 0;
let prelude = '';
while (index < src.length) {
@@ -137,14 +188,13 @@ function flattenRules(source) {
if (char === '{') {
const head = prelude.replace(/\s+/g, ' ').trim();
prelude = '';
index += 1;
if (head.startsWith('@media')) {
mediaStack.push(head.slice('@media'.length).trim());
index += 1;
stack.push({ media: head.slice('@media'.length).trim() });
continue;
}
if (head.startsWith('@')) {
let level = 1;
index += 1;
while (index < src.length && level > 0) {
if (src[index] === '{') level += 1;
else if (src[index] === '}') level -= 1;
@@ -152,43 +202,34 @@ function flattenRules(source) {
}
continue;
}
const close = src.indexOf('}', index);
assert.ok(close > index, `unterminated rule block for "${head}"`);
const decls = [];
for (const raw of src.slice(index + 1, close).split(';')) {
const text = raw.trim();
if (!text) continue;
const colon = text.indexOf(':');
if (colon < 0) continue;
const value = text.slice(colon + 1).trim();
decls.push({
prop: text.slice(0, colon).trim().toLowerCase(),
value: value.replace(/\s*!important$/i, '').trim(),
important: /!important\s*$/i.test(value),
});
}
rules.push({
const rule = {
order: rules.length,
media: [...mediaStack],
parts: splitTopLevel(head, ',')
.map((part) =>
part.trim().replace(/\(\s+/g, '(').replace(/\s+\)/g, ')'),
)
.filter(Boolean),
decls,
});
index = close + 1;
media: mediaStack(),
parts: nestSelectors(parentRule()?.parts, head),
decls: [],
};
rules.push(rule);
stack.push({ rule });
continue;
}
if (char === ';') {
declare(prelude);
prelude = '';
index += 1;
continue;
}
if (char === '}') {
mediaStack.pop();
// The last declaration of a block may omit its semicolon.
declare(prelude);
prelude = '';
stack.pop();
index += 1;
continue;
}
prelude += char;
index += 1;
}
assert.equal(stack.length, 0, 'unbalanced braces in style.css');
return rules;
}
@@ -227,6 +268,29 @@ const RECOGNIZED = new Set([
]);
const DOCKED_RAIL = 'body.context-docked #right-context-rail';
// The desktop Omnibar layout: the scope its stylesheet nests every rule in.
// It applies on the desktop shell (above the 720px phone breakpoint) while
// the Omnibar and the voice control share the dock; outside it the legacy
// layout below governs.
const OMNIBAR_SCOPE =
'body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(.ui-clean-view):not(.recording-mode):where(:has(#gev-omnibar):has(#command-dock > #gev-voice-control))';
const OMNIBAR = Object.freeze({
dock: `${OMNIBAR_SCOPE} #command-dock`,
credit: `${OMNIBAR_SCOPE} :is(#cesium-credits, #gev-credits)`,
minimalCredit: `${OMNIBAR_SCOPE}:has(#intel-hud[data-variant='minimal'].active) :is(#cesium-credits, #gev-credits)`,
minimalRail: `${OMNIBAR_SCOPE}:not(.context-docked):has(#intel-hud[data-variant='minimal'].active) #right-context-rail`,
trays: `${OMNIBAR_SCOPE} #command-dock > :is(#location-bar, #control-panel)`,
});
// What each Omnibar-scope rule may set on a modelled box; the Omnibar
// clearance test resolves every one of them through the full cascade.
const OMNIBAR_RECOGNIZED = new Map([
[OMNIBAR.dock, new Set(['top', 'bottom', 'height', 'min-height'])],
[OMNIBAR.credit, new Set(['bottom'])],
[OMNIBAR.minimalCredit, new Set(['bottom'])],
[OMNIBAR.minimalRail, new Set(['max-height'])],
]);
const OMNIBAR_MIN_WIDTH = 721;
const ELEMENT_KEYS = [
'#cesium-credits',
'#command-dock',
@@ -300,8 +364,11 @@ function ownBoxEntries() {
// So is Stories, with GEV's chrome stepped aside; storiesCredit.test.mjs
// pins its attribution placement.
if (
/^body\.stories-mode:not\(#gs-a\):not\(#gs-b\) #(cesium|gev)-credits$/.test(part)
) continue;
/^body\.stories-mode:not\(#gs-a\):not\(#gs-b\) #(cesium|gev)-credits$/.test(
part,
)
)
continue;
entries.push({ rule, part });
}
}
@@ -521,6 +588,22 @@ test('the model refuses every cascade construct it cannot resolve', () => {
// Expanded Context covers the right edge top to bottom; the credit row
// stops short of it instead (the docked-Context test below).
if (part === DOCKED_RAIL) continue;
if (part.startsWith(OMNIBAR_SCOPE)) {
const allowed = OMNIBAR_RECOGNIZED.get(part);
for (const decl of guarded) {
if (!allowed?.has(decl.prop))
complaints.push(
`unrecognized Omnibar rule positions a modelled element: "${part}" (${decl.prop})`,
);
if (decl.important)
complaints.push(`!important on ${decl.prop} of "${part}"`);
}
if (rule.media.length)
complaints.push(
`media query on Omnibar rule "${part}": ${rule.media.join(' && ')}`,
);
continue;
}
if (!RECOGNIZED.has(part)) {
complaints.push(
`unrecognized selector positions a modelled element: "${part}" (${guarded.map((d) => d.prop).join(', ')})`,
@@ -771,6 +854,116 @@ test('right rail measurement cannot persist into a painted attribution layout',
// ── Clearance ───────────────────────────────────────────────────────────────
/** A custom property's value as the Omnibar scope declares it. */
function omnibarVar(name) {
const decls = RULES.filter((rule) => rule.parts.includes(OMNIBAR_SCOPE))
.flatMap((rule) => rule.decls)
.filter((decl) => decl.prop === name);
assert.equal(decls.length, 1, `${name} is declared once in the Omnibar scope`);
return decls[0].value;
}
/** A length in the Omnibar layout, with its scope's own custom properties. */
function omnibarPx(value, viewportHeight, where) {
const substituted = value.replace(
/var\((--omnibar-[\w-]+)\)/g,
(_, name) => omnibarVar(name),
);
return toPx(substituted, viewportHeight, where);
}
test('Omnibar reserves a non-overlapping desktop footer at native credit sizing', () => {
// The Omnibar layout resolves through the same cascade as the legacy one:
// every legacy rule that could still match competes with the scope's.
const trayOpen = [
'#command-dock:has(#location-bar:not(.collapsed))',
'#command-dock:has(#control-panel:not(.collapsed))',
];
assert.equal(
omnibarVar('--world-timeline-lift'),
'0px',
'the Omnibar layout holds the timeline lift at 0',
);
for (const width of WIDTHS.filter((w) => w >= OMNIBAR_MIN_WIDTH)) {
for (const height of HEIGHTS) {
for (const minimal of [false, true]) {
const dock = resolve(
['#command-dock', ...trayOpen, OMNIBAR.dock],
'bottom',
width,
'Omnibar dock',
);
assert.equal(dock.part, OMNIBAR.dock, `the Omnibar owns the dock at ${width}px`);
// Its top and height too: a legacy top or height winning here would
// move or stretch the dock the clearance below is measured from.
for (const [prop, value] of [
['top', 'auto'],
['height', '56px'],
]) {
const own = resolve(
['#command-dock', ...trayOpen, OMNIBAR.dock],
prop,
width,
`Omnibar dock ${prop}`,
);
assert.equal(own.part, OMNIBAR.dock, `the Omnibar owns the dock ${prop} at ${width}px`);
assert.equal(own.decl.value, value, `Omnibar dock ${prop} at ${width}px`);
}
const credit = resolve(
[
...CREDIT_SELECTORS,
OMNIBAR.credit,
...(minimal ? [MINIMAL_HUD_CREDIT, OMNIBAR.minimalCredit] : []),
],
'bottom',
width,
'Omnibar credit',
);
assert.ok(
credit.part.startsWith(OMNIBAR_SCOPE),
`the Omnibar owns the credit row at ${width}px`,
);
const dockBottom = omnibarPx(dock.decl.value, height, 'Omnibar dock bottom');
const creditTop =
omnibarPx(credit.decl.value, height, 'Omnibar credit bottom') +
CREDIT_HEIGHT_PX;
assert.ok(
dockBottom - creditTop >= MIN_CLEARANCE_PX,
`at ${width}x${height}${minimal ? ' (minimal HUD)' : ''} the Omnibar dock (${dockBottom}px) must clear the credit line (${creditTop}px)`,
);
}
}
}
// No legacy tray opens over the credit: both are hidden in this layout,
// and no rule elsewhere forces them back.
const trays = RULES.find((rule) => rule.parts.includes(OMNIBAR.trays));
assert.ok(trays, 'the Omnibar layout hides the legacy trays');
assert.equal(trays.decls.find((decl) => decl.prop === 'display')?.value, 'none');
for (const rule of RULES) {
for (const part of rule.parts) {
if (!/#(location-bar|control-panel)$/.test(lastCompound(part))) continue;
assert.ok(
!rule.decls.some((decl) => decl.prop === 'display' && decl.important),
`"${part}" forces a hidden tray back with !important`,
);
}
}
// The minimal-HUD rail cap only shortens the rail, which is anchored at
// its top, so it can only add room above the credit.
const rail = RULES.find((rule) => rule.parts.includes(OMNIBAR.minimalRail));
const cap = rail.decls.find((decl) => decl.prop === '--omnibar-minimal-rail-height');
assert.match(cap?.value || '', /^min\(\s*var\(--right-stack-max-height, 70vh\),/);
assert.equal(
rail.decls.find((decl) => decl.prop === 'max-height')?.value,
'var(--omnibar-minimal-rail-height)',
);
assert.doesNotMatch(
omnibarCss,
/\.cesium-widget-credits|\.cesium-credit-logoContainer|\.cesium-credit-textContainer/,
'the footer uses the original credit text and logo sizing',
);
});
test('every open dock tray clears the required credit at every modelled viewport', () => {
// Below 900px the tray widens to nearly the viewport and lands on the
// bottom-left corner where the credit lives. The clearance is NOT one fixed
+30 -1
View File
@@ -4675,5 +4675,34 @@
"other": "عرض {what} في {place} ({count} عنصر)"
},
"Go there": "انتقل إلى هناك",
"Open draw options": "فتح خيارات الرسم"
"Open draw options": "فتح خيارات الرسم",
"{what} in {place}: {count} items": {
"zero": "{what} في {place}: ‏{count} عنصر",
"one": "{what} في {place}: ‏{count} عنصر",
"two": "{what} في {place}: ‏{count} عنصران",
"few": "{what} في {place}: ‏{count} عناصر",
"many": "{what} في {place}: ‏{count} عنصرًا",
"other": "{what} في {place}: ‏{count} عنصر"
},
"{count} items in view": {
"zero": "{count} عنصر في العرض",
"one": "{count} عنصر في العرض",
"two": "{count} عنصران في العرض",
"few": "{count} عناصر في العرض",
"many": "{count} عنصرًا في العرض",
"other": "{count} عنصر في العرض"
},
"Selected · near {name}": "محدّد · قرب {name}",
"Near {name}": "بالقرب من {name}",
"Stop drawing": "إيقاف الرسم",
"{place} · landmarks": "{place} · معالم",
"In {place}": "داخل {place}",
"Near {place}": "بالقرب من {place}",
"Unable to complete this action: {reason}": "تعذر إكمال هذا الإجراء: ‏{reason}",
"Unable to complete this action. Please try again.": "تعذر إكمال هذا الإجراء. يرجى المحاولة مرة أخرى.",
"{layer} M{mag}+": "{layer} بقوة M{mag} فأكثر",
"Search places, layers and things on the map, or ask GEV": "ابحث عن أماكن وطبقات وعناصر على الخريطة، أو اسأل GEV",
"Search places, layers, flights… or ask GEV · > for commands": "ابحث عن أماكن وطبقات ورحلات جوية… أو اسأل GEV · > للأوامر",
"No matching command": "لا يوجد أمر مطابق",
"Looks private, so nothing is searched or sent": "يبدو خاصًا، لذا لا يُبحث عنه ولا يُرسل"
}
+22 -1
View File
@@ -4259,5 +4259,26 @@
"other": "{what} in der Region {place} anzeigen ({count} Elemente)"
},
"Go there": "Dorthin wechseln",
"Open draw options": "Zeichenoptionen öffnen"
"Open draw options": "Zeichenoptionen öffnen",
"{what} in {place}: {count} items": {
"one": "{what} in der Region {place}: {count} Element",
"other": "{what} in der Region {place}: {count} Elemente"
},
"{count} items in view": {
"one": "{count} Element im Blick",
"other": "{count} Elemente im Blick"
},
"Selected · near {name}": "Auswahl · nahe {name}",
"Near {name}": "Nahe {name}",
"Stop drawing": "Zeichnen beenden",
"{place} · landmarks": "{place} · Sehenswürdigkeiten",
"In {place}": "In der Region {place}",
"Near {place}": "Nahe {place}",
"Unable to complete this action: {reason}": "Diese Aktion konnte nicht abgeschlossen werden: {reason}",
"Unable to complete this action. Please try again.": "Diese Aktion konnte nicht abgeschlossen werden. Bitte versuche es erneut.",
"{layer} M{mag}+": "{layer} ab Magnitude {mag}",
"Search places, layers and things on the map, or ask GEV": "Suche Orte, Ebenen und Kartenelemente oder frage GEV",
"Search places, layers, flights… or ask GEV · > for commands": "Orte, Ebenen, Flüge suchen… oder GEV fragen · > für Befehle",
"No matching command": "Kein passender Befehl",
"Looks private, so nothing is searched or sent": "Sieht privat aus, daher wird nichts gesucht oder gesendet"
}
+24 -1
View File
@@ -4363,5 +4363,28 @@
"other": "Mostrar {what} en {place} ({count} elementos)"
},
"Go there": "Ir allí",
"Open draw options": "Abrir opciones de dibujo"
"Open draw options": "Abrir opciones de dibujo",
"{what} in {place}: {count} items": {
"one": "{what} en {place}: {count} elemento",
"many": "{what} en {place}: {count} de elementos",
"other": "{what} en {place}: {count} elementos"
},
"{count} items in view": {
"one": "{count} elemento a la vista",
"many": "{count} de elementos a la vista",
"other": "{count} elementos a la vista"
},
"Selected · near {name}": "Selección · cerca de {name}",
"Near {name}": "Cerca de {name}",
"Stop drawing": "Dejar de dibujar",
"{place} · landmarks": "{place} · lugares de interés",
"In {place}": "En {place}",
"Near {place}": "Cerca de {place}",
"Unable to complete this action: {reason}": "No se pudo completar esta acción: {reason}",
"Unable to complete this action. Please try again.": "No se pudo completar esta acción. Inténtalo de nuevo.",
"{layer} M{mag}+": "{layer} de M{mag} o más",
"Search places, layers and things on the map, or ask GEV": "Busca lugares, capas y elementos del mapa, o pregunta a GEV",
"Search places, layers, flights… or ask GEV · > for commands": "Busca lugares, capas, vuelos… o pregunta a GEV · > para comandos",
"No matching command": "Ningún comando coincide",
"Looks private, so nothing is searched or sent": "Parece privado, así que no se busca ni se envía nada"
}
+24 -1
View File
@@ -4363,5 +4363,28 @@
"other": "Afficher {what} dans la zone de {place} ({count} éléments)"
},
"Go there": "Y aller",
"Open draw options": "Ouvrir les options de dessin"
"Open draw options": "Ouvrir les options de dessin",
"{what} in {place}: {count} items": {
"one": "{what} dans la zone de {place} : {count} élément",
"many": "{what} dans la zone de {place} : {count} d’éléments",
"other": "{what} dans la zone de {place} : {count} éléments"
},
"{count} items in view": {
"one": "{count} élément visible",
"many": "{count} d’éléments visibles",
"other": "{count} éléments visibles"
},
"Selected · near {name}": "Sélection · près de {name}",
"Near {name}": "Près de {name}",
"Stop drawing": "Arrêter le dessin",
"{place} · landmarks": "{place} · points d’intérêt",
"In {place}": "Dans la zone de {place}",
"Near {place}": "Près de {place}",
"Unable to complete this action: {reason}": "Impossible de terminer cette action : {reason}",
"Unable to complete this action. Please try again.": "Impossible de terminer cette action. Veuillez réessayer.",
"{layer} M{mag}+": "{layer} de magnitude {mag} ou plus",
"Search places, layers and things on the map, or ask GEV": "Recherchez des lieux, des couches et des éléments sur la carte, ou interrogez GEV",
"Search places, layers, flights… or ask GEV · > for commands": "Recherchez des lieux, des couches, des vols… ou interrogez GEV · > pour les commandes",
"No matching command": "Aucune commande correspondante",
"Looks private, so nothing is searched or sent": "Semble privé, donc rien n’est recherché ni envoyé"
}
+24 -1
View File
@@ -4363,5 +4363,28 @@
"other": "הצגת {what} ב{place} ({count} פריטים)"
},
"Go there": "מעבר למקום",
"Open draw options": "פתיחת אפשרויות הציור"
"Open draw options": "פתיחת אפשרויות הציור",
"{what} in {place}: {count} items": {
"one": "{what} ב{place}: ‏{count} פריט",
"two": "{what} ב{place}: ‏{count} פריטים",
"other": "{what} ב{place}: ‏{count} פריטים"
},
"{count} items in view": {
"one": "{count} פריט בתצוגה",
"two": "{count} פריטים בתצוגה",
"other": "{count} פריטים בתצוגה"
},
"Selected · near {name}": "נבחר · ליד {name}",
"Near {name}": "ליד {name}",
"Stop drawing": "הפסקת הציור",
"{place} · landmarks": "{place} · אתרים בולטים",
"In {place}": "בתוך {place}",
"Near {place}": "בסביבת {place}",
"Unable to complete this action: {reason}": "לא ניתן להשלים את הפעולה: ‏{reason}",
"Unable to complete this action. Please try again.": "לא ניתן להשלים את הפעולה. נסו שוב.",
"{layer} M{mag}+": "{layer} בעוצמה M{mag} ומעלה",
"Search places, layers and things on the map, or ask GEV": "חפשו מקומות, שכבות ופריטים במפה, או שאלו את GEV",
"Search places, layers, flights… or ask GEV · > for commands": "חיפוש מקומות, שכבות וטיסות… או שאלה ל‑GEV · > לפקודות",
"No matching command": "אין פקודה תואמת",
"Looks private, so nothing is searched or sent": "נראה פרטי, ולכן שום דבר לא מחופש או נשלח"
}
+24 -1
View File
@@ -4363,5 +4363,28 @@
"other": "Mostra {what} a {place} ({count} elementi)"
},
"Go there": "Vai lì",
"Open draw options": "Apri le opzioni di disegno"
"Open draw options": "Apri le opzioni di disegno",
"{what} in {place}: {count} items": {
"one": "{what} a {place}: {count} elemento",
"many": "{what} a {place}: {count} di elementi",
"other": "{what} a {place}: {count} elementi"
},
"{count} items in view": {
"one": "{count} elemento in vista",
"many": "{count} di elementi in vista",
"other": "{count} elementi in vista"
},
"Selected · near {name}": "Selezione · vicino a {name}",
"Near {name}": "Vicino a {name}",
"Stop drawing": "Interrompi il disegno",
"{place} · landmarks": "{place} · punti di interesse",
"In {place}": "A {place}",
"Near {place}": "Vicino a {place}",
"Unable to complete this action: {reason}": "Impossibile completare questa azione: {reason}",
"Unable to complete this action. Please try again.": "Impossibile completare questa azione. Riprova.",
"{layer} M{mag}+": "{layer} di magnitudo {mag} o superiore",
"Search places, layers and things on the map, or ask GEV": "Cerca luoghi, livelli ed elementi sulla mappa oppure chiedi a GEV",
"Search places, layers, flights… or ask GEV · > for commands": "Cerca luoghi, livelli, voli… oppure chiedi a GEV · > per i comandi",
"No matching command": "Nessun comando corrispondente",
"Looks private, so nothing is searched or sent": "Sembra privato, quindi non viene cercato né inviato nulla"
}
+20 -1
View File
@@ -4155,5 +4155,24 @@
"other": "{place}の{what}を表示({count}件)"
},
"Go there": "その場所に移動",
"Open draw options": "描画オプションを開く"
"Open draw options": "描画オプションを開く",
"{what} in {place}: {count} items": {
"other": "{place}の{what}:{count}件"
},
"{count} items in view": {
"other": "{count}件表示中"
},
"Selected · near {name}": "選択中 · {name}の周辺",
"Near {name}": "{name}の周辺",
"Stop drawing": "描画を終了",
"{place} · landmarks": "{place} · 名所",
"In {place}": "{place}の範囲内",
"Near {place}": "{place}の周辺",
"Unable to complete this action: {reason}": "この操作を完了できませんでした:{reason}",
"Unable to complete this action. Please try again.": "この操作を完了できませんでした。もう一度お試しください。",
"{layer} M{mag}+": "{layer}(M{mag}以上)",
"Search places, layers and things on the map, or ask GEV": "場所、レイヤー、マップ上の対象を検索するか、GEVに質問",
"Search places, layers, flights… or ask GEV · > for commands": "場所、レイヤー、航空便を検索… またはGEVに質問 · > でコマンド",
"No matching command": "一致するコマンドがありません",
"Looks private, so nothing is searched or sent": "個人情報の可能性があるため、検索も送信もしません"
}
+24 -1
View File
@@ -4363,5 +4363,28 @@
"other": "Mostrar {what} em {place} ({count} itens)"
},
"Go there": "Ir até lá",
"Open draw options": "Abrir opções de desenho"
"Open draw options": "Abrir opções de desenho",
"{what} in {place}: {count} items": {
"one": "{what} em {place}: {count} item",
"many": "{what} em {place}: {count} de itens",
"other": "{what} em {place}: {count} itens"
},
"{count} items in view": {
"one": "{count} item à vista",
"many": "{count} de itens à vista",
"other": "{count} itens à vista"
},
"Selected · near {name}": "Seleção · perto de {name}",
"Near {name}": "Perto de {name}",
"Stop drawing": "Parar de desenhar",
"{place} · landmarks": "{place} · pontos de interesse",
"In {place}": "Em {place}",
"Near {place}": "Perto de {place}",
"Unable to complete this action: {reason}": "Não foi possível concluir esta ação: {reason}",
"Unable to complete this action. Please try again.": "Não foi possível concluir esta ação. Tente novamente.",
"{layer} M{mag}+": "{layer} de magnitude {mag} ou mais",
"Search places, layers and things on the map, or ask GEV": "Busque lugares, camadas e elementos no mapa ou pergunte ao GEV",
"Search places, layers, flights… or ask GEV · > for commands": "Busque lugares, camadas, voos… ou pergunte ao GEV · > para comandos",
"No matching command": "Nenhum comando correspondente",
"Looks private, so nothing is searched or sent": "Parece privado, por isso nada é pesquisado nem enviado"
}
+26 -1
View File
@@ -4467,5 +4467,30 @@
"other": "Показать {what} · {place} ({count} объекта)"
},
"Go there": "Перейти туда",
"Open draw options": "Открыть параметры рисования"
"Open draw options": "Открыть параметры рисования",
"{what} in {place}: {count} items": {
"one": "{what} · {place}: {count} объект",
"few": "{what} · {place}: {count} объекта",
"many": "{what} · {place}: {count} объектов",
"other": "{what} · {place}: {count} объекта"
},
"{count} items in view": {
"one": "{count} объект в поле зрения",
"few": "{count} объекта в поле зрения",
"many": "{count} объектов в поле зрения",
"other": "{count} объекта в поле зрения"
},
"Selected · near {name}": "Выбрано · рядом с {name}",
"Near {name}": "Рядом с {name}",
"Stop drawing": "Завершить рисование",
"{place} · landmarks": "{place} · достопримечательности",
"In {place}": "Места в {place}",
"Near {place}": "Рядом с {place}",
"Unable to complete this action: {reason}": "Не удалось выполнить действие: {reason}",
"Unable to complete this action. Please try again.": "Не удалось выполнить действие. Попробуйте ещё раз.",
"{layer} M{mag}+": "{layer} с магнитудой от {mag}",
"Search places, layers and things on the map, or ask GEV": "Ищите места, слои и объекты на карте или спросите GEV",
"Search places, layers, flights… or ask GEV · > for commands": "Ищите места, слои, рейсы… или спросите GEV · > для команд",
"No matching command": "Подходящая команда не найдена",
"Looks private, so nothing is searched or sent": "Похоже на личные данные, поэтому ничего не ищется и не отправляется"
}
+22 -1
View File
@@ -4259,5 +4259,26 @@
"other": "Visa {what} i {place} ({count} objekt)"
},
"Go there": "Gå dit",
"Open draw options": "Öppna ritalternativ"
"Open draw options": "Öppna ritalternativ",
"{what} in {place}: {count} items": {
"one": "{what} i {place}: {count} objekt",
"other": "{what} i {place}: {count} objekt"
},
"{count} items in view": {
"one": "{count} objekt i vyn",
"other": "{count} objekt i vyn"
},
"Selected · near {name}": "Valt objekt · nära {name}",
"Near {name}": "Nära {name}",
"Stop drawing": "Sluta rita",
"{place} · landmarks": "{place} · sevärdheter",
"In {place}": "I {place}",
"Near {place}": "Nära {place}",
"Unable to complete this action: {reason}": "Det gick inte att slutföra åtgärden: {reason}",
"Unable to complete this action. Please try again.": "Det gick inte att slutföra åtgärden. Försök igen.",
"{layer} M{mag}+": "{layer} med magnitud {mag} eller högre",
"Search places, layers and things on the map, or ask GEV": "Sök efter platser, lager och objekt på kartan eller fråga GEV",
"Search places, layers, flights… or ask GEV · > for commands": "Sök efter platser, lager, flyg… eller fråga GEV · > för kommandon",
"No matching command": "Inget matchande kommando",
"Looks private, so nothing is searched or sent": "Ser privat ut, så inget söks eller skickas"
}
+26 -1
View File
@@ -4467,5 +4467,30 @@
"other": "Показати {what} · {place} ({count} об’єкта)"
},
"Go there": "Перейти туди",
"Open draw options": "Відкрити параметри малювання"
"Open draw options": "Відкрити параметри малювання",
"{what} in {place}: {count} items": {
"one": "{what} · {place}: {count} об’єкт",
"few": "{what} · {place}: {count} об’єкти",
"many": "{what} · {place}: {count} об’єктів",
"other": "{what} · {place}: {count} об’єкта"
},
"{count} items in view": {
"one": "{count} об’єкт у полі зору",
"few": "{count} об’єкти у полі зору",
"many": "{count} об’єктів у полі зору",
"other": "{count} об’єкта у полі зору"
},
"Selected · near {name}": "Вибране · поблизу {name}",
"Near {name}": "Поблизу {name}",
"Stop drawing": "Припинити малювання",
"{place} · landmarks": "{place} · визначні місця",
"In {place}": "Місця в {place}",
"Near {place}": "Поблизу {place}",
"Unable to complete this action: {reason}": "Не вдалося виконати цю дію: {reason}",
"Unable to complete this action. Please try again.": "Не вдалося виконати цю дію. Спробуйте ще раз.",
"{layer} M{mag}+": "{layer} з магнітудою від {mag}",
"Search places, layers and things on the map, or ask GEV": "Шукайте місця, шари й об’єкти на карті або запитайте GEV",
"Search places, layers, flights… or ask GEV · > for commands": "Шукайте місця, шари, рейси… або запитайте GEV · > для команд",
"No matching command": "Відповідної команди не знайдено",
"Looks private, so nothing is searched or sent": "Схоже на особисті дані, тому нічого не шукається й не надсилається"
}
+20 -1
View File
@@ -4155,5 +4155,24 @@
"other": "显示{place}的{what}({count} 个)"
},
"Go there": "前往该地点",
"Open draw options": "打开绘制选项"
"Open draw options": "打开绘制选项",
"{what} in {place}: {count} items": {
"other": "{place}的{what}:{count} 个"
},
"{count} items in view": {
"other": "视野内 {count} 个"
},
"Selected · near {name}": "已选中 · {name}附近",
"Near {name}": "{name}附近",
"Stop drawing": "停止绘制",
"{place} · landmarks": "{place} · 地标",
"In {place}": "{place}境内",
"Near {place}": "{place}附近",
"Unable to complete this action: {reason}": "无法完成此操作:{reason}",
"Unable to complete this action. Please try again.": "无法完成此操作。请重试。",
"{layer} M{mag}+": "{layer}(震级 M{mag} 及以上)",
"Search places, layers and things on the map, or ask GEV": "搜索地点、图层和地图上的对象,或向 GEV 提问",
"Search places, layers, flights… or ask GEV · > for commands": "搜索地点、图层、航班… 或问 GEV · > 输入命令",
"No matching command": "没有匹配的命令",
"Looks private, so nothing is searched or sent": "疑似隐私信息,因此不会搜索或发送"
}
+20 -1
View File
@@ -4155,5 +4155,24 @@
"other": "顯示{place}的{what}({count} 個)"
},
"Go there": "前往該地點",
"Open draw options": "打開繪製選項"
"Open draw options": "打開繪製選項",
"{what} in {place}: {count} items": {
"other": "{place}的{what}:{count} 個"
},
"{count} items in view": {
"other": "視野內 {count} 個"
},
"Selected · near {name}": "已選中 · {name}附近",
"Near {name}": "{name}附近",
"Stop drawing": "停止繪製",
"{place} · landmarks": "{place} · 地標",
"In {place}": "{place}境內",
"Near {place}": "{place}附近",
"Unable to complete this action: {reason}": "無法完成此操作:{reason}",
"Unable to complete this action. Please try again.": "無法完成此操作。請重試。",
"{layer} M{mag}+": "{layer}(震級 M{mag} 及以上)",
"Search places, layers and things on the map, or ask GEV": "搜索地點、圖層和地圖上的對象,或向 GEV 提問",
"Search places, layers, flights… or ask GEV · > for commands": "搜索地點、圖層、航班… 或問 GEV · > 輸入命令",
"No matching command": "沒有匹配的命令",
"Looks private, so nothing is searched or sent": "疑似隱私信息,因此不會搜索或發送"
}
+14
View File
@@ -78,6 +78,12 @@ import { useCockpitStore } from './stores/cockpit.js';
import { useGlobeActionsStore } from './stores/globeActions.js';
import { useRecordingStore } from './stores/recording.js';
import { onPlacePacksLoadingChange } from '../data/placeBelow.js';
import {
hideOsmCredit,
registerDynamicCredit,
showOsmCredit,
WIKIDATA_PLACES_CREDIT,
} from '../data/dataCredits.js';
import { withPlacePacks } from './placePacksLoading.js';
import { preloadOwnerFlags } from './ownerFlag.js';
@@ -182,6 +188,14 @@ export class StyleManager extends ShellFacade {
layers: () => this._dataManager?.getAll?.() || [],
setLayer: (id, enabled) =>
this._dataManager?.setEnabled(id, enabled, { origin: 'user' }),
// The Omnibar shows names from the bundled Wikidata packs.
creditPlaces: () =>
registerDynamicCredit(this.viewer, WIKIDATA_PLACES_CREDIT),
// Photon's suggestions are OpenStreetMap data: credited while shown.
creditSuggestions: (shown) =>
shown
? showOsmCredit(this.viewer, 'omnibar')
: hideOsmCredit(this.viewer, 'omnibar'),
});
// Scrolling at a screen edge steps through that side's rail panels.
this._removeRailEdgeScroll = installRailEdgeScroll();
File diff suppressed because it is too large. Load diff
+10 -2
View File
@@ -62,7 +62,7 @@ export function installEntityContext({
const voice = useVoiceStore(pinia);
const cockpitStore = useCockpitStore(pinia);
const chrome = usePanelChromeStore(pinia);
/** Whether Context is open; a closed panel reads nothing. */
/** Whether Context is open. (readView also reads while the Omnibar is focused.) */
const isOpen = () =>
chrome.panels['global-context-panel']?.collapsed === false;
const doc = globalThis.document;
@@ -223,7 +223,8 @@ export function installEntityContext({
// the height. Read when the camera settles, not every frame.
const readView = () => {
const port = camera();
if (!port || !isOpen()) return;
if (!port || (!isOpen() && doc?.activeElement?.id !== 'gev-omnibar-input'))
return;
const pose = port.pose();
if (![pose.lat, pose.lon, pose.height].every(Number.isFinite)) return;
const middle = pickWorld?.(viewer, 0.5, 0.5);
@@ -272,6 +273,12 @@ export function installEntityContext({
listen();
readView();
}, 0);
// The Omnibar's nearby suggestions also need a fresh center even with
// Context closed. Its focus event requests one camera read.
const onSearchFocus = (event) => {
if (event.target?.id === 'gev-omnibar-input') readView();
};
doc?.addEventListener('focusin', onSearchFocus);
// Opening the panel describes the view as it is now.
let wasOpen = isOpen();
const offChrome = chrome.$subscribe(() => {
@@ -356,6 +363,7 @@ export function installEntityContext({
clearTimeout(trailing);
offFollow();
offChrome();
doc?.removeEventListener('focusin', onSearchFocus);
clearTimeout(followCheck);
globalThis.removeEventListener?.('gev:entity-selected', onSelected);
store.connect(null);
+46 -7
View File
@@ -7,6 +7,27 @@ import {
import { measurePanelNaturalHeight } from './panelMeasurement.js';
import { settleSideAccordion } from './panelAccordion.js';
/**
* Whether the desktop Omnibar dock is laid out, by the condition
* omnibar-dock.css lays it out by: the bar and the voice control in the
* dock, outside the phone layout, the cockpit, playback, clean view and
* recording.
*/
const DOCK_OFF = [
'mobile-shell',
'cockpit-mode',
'scene-playback-mode',
'ui-clean-view',
'recording-mode',
];
function desktopOmnibarDock(documentRef) {
if (!documentRef?.getElementById?.('gev-omnibar')) return false;
const body = documentRef.body;
if (DOCK_OFF.some((name) => body?.classList?.contains?.(name))) return false;
const voice = documentRef.getElementById('gev-voice-control');
return Boolean(voice) && voice.parentElement?.id === 'command-dock';
}
/**
* Measure and place the left panel rail for one synchronous layout pass.
* The caller owns scheduling, obstacle selection, disclosure preferences and
@@ -115,8 +136,15 @@ export function layoutLeftPanelRail({
if (hiddenByAncestor) continue;
const rect = obstacle.getBoundingClientRect();
if (rect.width <= 0 || rect.height <= 0) continue;
const overlapsHorizontally =
rect.right > stackRect.left && rect.left < stackRect.right;
// The centered controls can enter the stack's transparent outer gutter.
// Only constrain the lane if they reach an expanded panel itself, whose
// actual bounds also include the edge-rail offset.
const lanes = ['world-timeline', 'gev-voice-control'].includes(obstacle.id)
? laidOutPanels.map((panel) => panel.getBoundingClientRect())
: [stackRect];
const overlapsHorizontally = lanes.some(
(lane) => rect.right > lane.left && rect.left < lane.right,
);
if (!overlapsHorizontally) continue;
if (rect.top < baseTop && rect.bottom <= viewportHeight * 0.5) {
@@ -220,11 +248,20 @@ export function layoutLeftPanelRail({
const tailLayoutBottom = tailLayoutTop + tailRequiredHeight;
const tailAvailableHeight = Math.max(0, obstacleSafeBottom - obstacleSafeTop);
const tailTolerance = wasTail ? stabilityBand : -stabilityBand;
// Data Layers has a scrollable list and a fixed footer. Give it the full
// desktop lane while short control panels keep their natural height.
const fillDataLayers =
exclusive &&
expandedPanels.length === 1 &&
expandedPanels[0].id === 'data-panel' &&
desktopOmnibarDock(documentRef);
const shouldTail =
!fillDataLayers &&
expandedPanels.length > 0 &&
tailLayoutTop >= obstacleSafeTop - tailTolerance &&
tailLayoutBottom <= obstacleSafeBottom + tailTolerance;
const shouldFocus = exceedsCenteredCorridor && !shouldTail;
const shouldFocus =
fillDataLayers || (exceedsCenteredCorridor && !shouldTail);
// Focus mode owns the lane, so let every expanded panel share the full
// obstacle-safe corridor. Tail/normal layouts keep the balanced
// viewport centering used for compact accordion stacks.
@@ -250,10 +287,12 @@ export function layoutLeftPanelRail({
rowGap * Math.max(0, expandedPanels.length - 1),
)
: naturalExpandedHeight;
const allocatedExpandedHeights = allocatePanelStackHeights({
naturalHeights: naturalExpandedHeights,
availableHeight: expandedAvailableHeight,
});
const allocatedExpandedHeights = fillDataLayers
? [expandedAvailableHeight]
: allocatePanelStackHeights({
naturalHeights: naturalExpandedHeights,
availableHeight: expandedAvailableHeight,
});
const autoCollapseIndices = hud.visible
? panelStackAutoCollapseIndices({
naturalHeights: naturalExpandedHeights,
+35 -3
View File
@@ -46,6 +46,7 @@ export class LocationControls {
onCity,
onPoi,
onSearch,
onSearchEdit,
onReset,
publish,
doc,
@@ -74,6 +75,7 @@ export class LocationControls {
poi: t('Landmark: --'),
};
this.searchError = null;
this.searchOrigin = 'dock';
// The search field: whether it is open, and whether a lookup runs.
this.searchExpanded = Boolean(searchExpanded);
this.searching = false;
@@ -96,12 +98,16 @@ export class LocationControls {
onPoi(cityId, index);
});
this.bind(elements.search, 'keydown', (event) => {
if (event.key === 'Enter') void onSearch(elements.search.value);
if (event.key === 'Enter')
void this.search(elements.search.value, { origin: 'dock' });
});
// Typing corrects a failed query; closing the field (which empties it) drops its error.
this.bind(elements.search, 'input', () => onSearchEdit?.());
this.bind(elements.search, 'input', () => {
if (this.searchOrigin === 'dock') onSearchEdit?.();
});
this.bind(elements.search, 'blur', () => {
if (!elements.search.value) onSearchEdit?.();
if (this.searchOrigin === 'dock' && !elements.search.value)
onSearchEdit?.();
});
this.present();
}
@@ -138,9 +144,29 @@ export class LocationControls {
searchError: this.searchError,
searchExpanded: this.searchExpanded,
searching: this.searching,
searchOrigin: this.searchOrigin,
orbit: this.orbit && { ...this.orbit },
};
}
/** Search through the same lifecycle as the location field. */
search(query, { origin = 'omnibar' } = {}) {
if (this.destroyed || !String(query || '').trim()) return false;
this._requestedSearchOrigin = origin;
// Beginning navigation synchronously settles the previous lookup. That
// handoff must not clear or blur the draft just submitted by either field.
this._startingSearch = true;
try {
return this.onSearch(query);
} finally {
this._startingSearch = false;
this._requestedSearchOrigin = null;
}
}
/** Editing an external query clears its prior lookup error. */
editSearch() {
if (!this.destroyed && this.searchOrigin === 'omnibar')
this.onSearchEdit?.();
}
/** A city pill was clicked. */
chooseCity(id) {
if (!this.destroyed) this.onCity(id);
@@ -233,6 +259,8 @@ export class LocationControls {
/** Mark the search field while a lookup runs. */
setSearching(active) {
if (this.destroyed) return;
if (active && this._requestedSearchOrigin)
this.searchOrigin = this._requestedSearchOrigin;
this.searching = Boolean(active);
this.present();
}
@@ -243,6 +271,10 @@ export class LocationControls {
settleSearch({ keepQuery = false } = {}) {
if (this.destroyed) return;
this.searching = false;
if (this._startingSearch || this.searchOrigin === 'omnibar') {
this.present();
return;
}
if (!keepQuery) {
this.closeSearch();
return;
+1
View File
@@ -108,6 +108,7 @@ test('the tray presents its cities, empty status and no landmarks at first', ()
searchError: null,
searchExpanded: false,
searching: false,
searchOrigin: 'dock',
orbit: null,
});
f.controls.highlightCity('b');
+2
View File
@@ -101,6 +101,8 @@ export class LocationSearch {
destination: { ...destination },
};
this.channel.publish(change('found'));
// Found and still the current search: a plan may go on.
return current() && !controller.signal.aborted;
} else {
this.onMissing?.();
if (!current() || controller.signal.aborted) return;
+5 -6
View File
@@ -185,8 +185,8 @@ const AUX_FORM =
/**
* Whether a line is a real question, which Ask GEV may answer on Enter (a
* billed call):
* - one ending with "?" that has two words and two letters or more (or
* three Han, Kana or Hangul characters);
* - one ending with "?" that has a question form or two non-Latin words
* with a word of two letters or more, or five Han, Kana or Hangul characters;
* - without "?", only a question word's form ("what is here", "how far is
* paris") with a word about something after it, and not written as a
* name ("Where Is My Mind").
@@ -209,13 +209,12 @@ export function isRealQuestion(text) {
const words = line.replace(/\?+$/, '').split(/\s+/).filter(Boolean);
if (line.endsWith('?'))
// A name with "?" ("New York?", "Truth or Consequences?", "東京都?") is
// offered to GEV, not sent: a question's form, or four words or more
// (five Han, Kana or Hangul characters, written without spaces; two
// words in other non-Latin scripts).
// offered to GEV, not sent: a question's form, or five Han, Kana or
// Hangul characters written without spaces, or two words in other
// non-Latin scripts.
return (
((WH_FORM.test(line) ||
AUX_FORM.test(line) ||
words.length >= 4 ||
// Question words in other scripts are not read: two words do.
(words.length >= 2 && !/\p{Script=Latin}/u.test(line))) &&
words.some((word) => (word.match(/\p{L}/gu) || []).length >= 2)) ||
+1
View File
@@ -252,6 +252,7 @@ test('ar and he mark every Omnibar string alike with a right-to-left mark', asyn
// U+200F, so the punctuation stays with the right-to-left text before it.
const sources = await Promise.all(
[
'./views/panels/Omnibar.vue',
'./views/panels/VoiceVisualizer.vue',
'./omnibarIntent.js',
'./omnibarRows.js',
+4 -5
View File
@@ -148,16 +148,15 @@ const OUTCOMES = [
['remove island', 'nothing'],
['show noir and show cctv', 'style(noir) + layer(cctv,on)'],
// a name with "?" is offered to GEV,
// never sent; a question's form or four words are.
// never sent; a question's form is.
['New York?', 'nothing'],
['Truth or Consequences?', 'nothing'],
['Ho Chi Minh City?', 'nothing'],
['Santa Cruz de la Sierra?', 'nothing'],
['東京都?', 'nothing'],
['東京はどこ?', 'ask(東京はどこ?)'],
['is it far?', 'ask(is it far?)'],
[
'how about the weather in paris today?',
'ask(how about the weather in paris today?)',
],
['how about the weather in paris today?', 'nothing'],
['123–45–6789', 'nothing'],
['what is 4111–1111–1111–1111?', 'nothing'],
// a switch with its place after "in" asks;
+25
View File
@@ -57,6 +57,9 @@ const RIGHT_STACK_OBSTACLE_SELECTOR = [
'#intel-hud .hud-right-edge',
'#cockpit-context',
'#cockpit-signal-stream',
// The "NEW: GEV Stories" card under the Stories button: panels start below
// it while it is up, so its buttons never sit over a panel's controls.
'#hPop',
'#cesium-credits .cesium-credit-logoContainer',
'#cesium-credits .cesium-credit-textContainer',
'#gev-credits',
@@ -64,6 +67,14 @@ const RIGHT_STACK_OBSTACLE_SELECTOR = [
'#gev-voice-control',
'#world-timeline',
].join(', ');
/** True when a mutation adds or removes the Stories card (`#hPop`). */
function movesStoriesCard(record) {
for (const list of [record.addedNodes, record.removedNodes])
for (const node of list)
if (node.id === 'hPop' || node.querySelector?.('#hPop')) return true;
return false;
}
export class PanelLayoutController {
constructor({
readHud,
@@ -92,6 +103,7 @@ export class PanelLayoutController {
this._rightStackPreferredPanelId = null;
this._rightStackReconsiderAutoCollapse = false;
this._rightStackResizeObserver = null;
this._storiesCardObserver = null;
this._cockpitLayoutFrame = null;
this._cockpitLayoutTimer = null;
this._leftPanelStack = document.getElementById('left-panel-stack');
@@ -246,6 +258,18 @@ export class PanelLayoutController {
attributes: true,
attributeFilter: ['class', 'hidden', 'data-variant'],
});
// The Stories card comes and goes inside the Stories view; only its
// arrival or departure moves the rail, not the view's other changes.
const storiesHost = document.getElementById('gev-stories-host');
if (storiesHost) {
this._storiesCardObserver = new MutationObserver((records) => {
if (records.some(movesStoriesCard)) this._scheduleRightPanelLayout();
});
this._storiesCardObserver.observe(storiesHost, {
subtree: true,
childList: true,
});
}
const hud = document.getElementById('intel-hud');
if (hud) {
this._rightStackMutationObserver.observe(hud, {
@@ -464,6 +488,7 @@ export class PanelLayoutController {
'_leftStackMutationObserver',
'_rightStackResizeObserver',
'_rightStackMutationObserver',
'_storiesCardObserver',
]) {
this[field]?.disconnect();
this[field] = null;
+37
View File
@@ -232,6 +232,43 @@ 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', () => {
const f = fixture('left');
f.stack.rect.width = 360;
f.stack.rect.right = f.stack.rect.left + 360;
f.expand(f.first, 850);
const timeline = element('world-timeline', { top: 650, left: 320 });
f.options.obstacles = [timeline];
f.run();
const clear = Number(f.stack.dataset.safeBottomPct);
timeline.rect.left = 280;
f.run();
assert(clear > 85);
assert(Number(f.stack.dataset.safeBottomPct) < 73);
});
test('Data Layers extends to the HUD even if its list is currently short', () => {
const f = fixture('left');
f.first.id = 'data-panel';
const dock = { id: 'command-dock' };
f.options.documentRef.getElementById = (id) =>
id === 'gev-omnibar'
? {}
: id === 'gev-voice-control'
? { parentElement: dock }
: null;
f.expand(f.first, 250);
f.options.obstacles = [element('hud', { top: 760, height: 45 })];
f.run();
assert.equal(f.stack.dataset.layoutMode, 'focus');
assert(Number(f.stack.dataset.safeBottomPct) > 80);
assert(
parseFloat(
f.first.style.getPropertyValue('--left-panel-allocated-height'),
) > 500,
);
});
for (const side of ['left', 'right']) {
test(`${side} mobile layout releases desktop height/position styles and labels`, () => {
const f = fixture(side, { mobile: true });
+6
View File
@@ -6,6 +6,7 @@ import {
describeEntity,
layerBreakdown,
nearbyByKind,
nearbyEntities,
layerMatches,
searchEntities,
viewSummary,
@@ -204,6 +205,10 @@ export const useEntityCardStore = defineStore('gev-entity-card', () => {
return nearbyByKind(shell.value?.dataManager?.(), { lat, lon }, options);
}
function nearbySelected() {
return nearbyEntities(dataManager(), card.value);
}
/** Whether a card's layer is known to the layer manager and switched off. */
function layerOff(layerId) {
const dm = dataManager();
@@ -333,6 +338,7 @@ export const useEntityCardStore = defineStore('gev-entity-card', () => {
following,
search,
nearbyGroups,
nearbySelected,
alertsAt,
liveLayers,
breakdown,
+3
View File
@@ -79,6 +79,8 @@ export const useGlobeActionsStore = defineStore('gev-globe-actions', () => {
}
const { act, owns } = owners;
/** Whether a connected owner answers this action at all. */
const answers = (name) => Boolean(owners.ownerOf(name));
return {
clearBusy,
@@ -91,5 +93,6 @@ export const useGlobeActionsStore = defineStore('gev-globe-actions', () => {
detach,
act,
owns,
answers,
};
});
+6 -3
View File
@@ -5,11 +5,14 @@ import { markRaw, shallowRef } from 'vue';
* The top-bar omnibar's link to the shell. The shell connects the actions
* the omnibar offers: `layers()` lists the data layers as `{id, name,
* enabled}`, and `setLayer(id, enabled)` turns one on or off as a user click
* would. Place search runs through the location controls and Ask GEV through
* the voice controls, so neither is repeated here.
* would. `creditPlaces()`, optional, credits the bundled Wikidata place
* packs once a name from them is shown, and `creditSuggestions(shown)`,
* optional, shows the OpenStreetMap credit while Photon's suggestions are. Place search runs through the
* location controls and Ask GEV through the voice controls, so neither is
* repeated here.
*/
export const useOmnibarStore = defineStore('gev-omnibar', () => {
/** `{layers(), setLayer(id, enabled)}`, or null while disconnected. */
/** `{layers(), setLayer(id, enabled), creditPlaces?()}`, or null while disconnected. */
const controls = shallowRef(null);
/** @param {?object} next The shell's omnibar actions, or null. */
+413
View File
@@ -0,0 +1,413 @@
/* ── "Show me how" guide ───────────────────────────────────────────────
A spotlight dims everything but the control to press and frames it with
tactical corner brackets; a second frame marks a part of it (a layer's
switch). A glass callout beside it, with an arrow to the target, says
what to do and how far along the walk is. Clicks pass through to the
app: the guide only points. */
.gev-guide {
--gev-guide-accent: #ff9f43;
--gev-guide-accent-soft: rgba(255, 159, 67, 0.5);
position: fixed;
z-index: 400;
inset: 0;
pointer-events: none;
}
/* ── Spotlight ── */
.gev-guide-ring {
position: fixed;
border: 1px solid rgba(255, 159, 67, 0.28);
border-radius: 8px;
box-shadow: 0 0 0 200vmax rgba(3, 8, 14, 0.55);
opacity: 0;
transition:
left 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
top 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
width 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
height 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
opacity 160ms ease;
}
/* Corner brackets, drawn as eight short gradient strokes. */
.gev-guide-ring::before {
position: absolute;
inset: -3px;
background:
linear-gradient(var(--gev-guide-accent) 0 0) top left / 12px 2px,
linear-gradient(var(--gev-guide-accent) 0 0) top left / 2px 12px,
linear-gradient(var(--gev-guide-accent) 0 0) top right / 12px 2px,
linear-gradient(var(--gev-guide-accent) 0 0) top right / 2px 12px,
linear-gradient(var(--gev-guide-accent) 0 0) bottom left / 12px 2px,
linear-gradient(var(--gev-guide-accent) 0 0) bottom left / 2px 12px,
linear-gradient(var(--gev-guide-accent) 0 0) bottom right / 12px 2px,
linear-gradient(var(--gev-guide-accent) 0 0) bottom right / 2px 12px;
background-repeat: no-repeat;
content: '';
filter: drop-shadow(0 0 4px rgba(255, 159, 67, 0.6));
}
/* A soft ping that grows out of the frame: "press here". */
.gev-guide-ring > i {
position: absolute;
inset: 0;
border: 1px solid var(--gev-guide-accent-soft);
border-radius: inherit;
animation: gev-guide-ping 1.8s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
}
/* A second frame inside the spotlight does not dim the screen again. */
.gev-guide-ring--sub {
border-color: rgba(255, 159, 67, 0.4);
border-radius: 6px;
box-shadow: none;
}
.gev-guide-ring--sub::before {
inset: -2px;
background-size:
8px 2px,
2px 8px,
8px 2px,
2px 8px,
8px 2px,
2px 8px,
8px 2px,
2px 8px;
}
/* ── Callout ── */
.gev-guide-callout {
position: fixed;
width: 280px;
padding: 0.7rem 0.8rem 0.65rem;
color: rgba(232, 238, 242, 0.95);
background: rgba(40, 44, 52, 0.9);
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 12px;
box-shadow:
0 16px 40px rgba(0, 0, 0, 0.55),
inset 0 1px 0 rgba(255, 255, 255, 0.06);
backdrop-filter: blur(22px) saturate(1.3);
-webkit-backdrop-filter: blur(22px) saturate(1.3);
opacity: 0;
transform: translateY(4px);
transition:
left 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
top 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
opacity 180ms ease,
transform 180ms ease;
pointer-events: auto;
}
.gev-guide.visible .gev-guide-callout {
opacity: 1;
transform: none;
}
/* A leader line from the callout to the target's frame, ending in a dot. */
.gev-guide-callout::before,
.gev-guide-callout::after {
position: absolute;
top: var(--gev-guide-arrow-y, 50%);
content: '';
transition: top 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gev-guide-callout::before {
width: 18px;
height: 1px;
background: var(--gev-guide-accent);
box-shadow: 0 0 6px rgba(255, 159, 67, 0.7);
}
.gev-guide-callout::after {
width: 5px;
height: 5px;
margin-top: -2px;
background: var(--gev-guide-accent);
border-radius: 50%;
box-shadow: 0 0 6px rgba(255, 159, 67, 0.9);
}
.gev-guide-callout[data-side='right']::before {
right: 100%;
}
.gev-guide-callout[data-side='right']::after {
right: calc(100% + 15px);
}
.gev-guide-callout[data-side='left']::before {
left: 100%;
}
.gev-guide-callout[data-side='left']::after {
left: calc(100% + 15px);
}
.gev-guide-callout[data-side='none']::before,
.gev-guide-callout[data-side='none']::after {
display: none;
}
/* The edge the line leaves from picks up the accent. */
.gev-guide-callout[data-side='right'] {
border-left-color: rgba(255, 159, 67, 0.55);
}
.gev-guide-callout[data-side='left'] {
border-right-color: rgba(255, 159, 67, 0.55);
}
/* Header: what this walk is about, how far along, and a close. */
.gev-guide-head {
display: flex;
align-items: center;
gap: 0.5rem;
}
.gev-guide-title,
.gev-guide-count {
margin: 0;
font-family: var(--font-mono);
font-size: 0.56rem;
letter-spacing: 0.12rem;
text-transform: uppercase;
}
.gev-guide-title {
flex: 1;
min-width: 0;
overflow: hidden;
color: var(--gev-guide-accent);
text-overflow: ellipsis;
white-space: nowrap;
}
.gev-guide-count {
color: rgba(214, 220, 226, 0.55);
font-variant-numeric: tabular-nums;
letter-spacing: 0.06rem;
}
.gev-guide-close {
display: grid;
place-items: center;
width: 20px;
height: 20px;
margin: -2px -4px 0 0;
padding: 0;
color: rgba(214, 220, 226, 0.55);
font-size: 0.95rem;
line-height: 1;
background: none;
border: 0;
border-radius: 5px;
cursor: pointer;
}
.gev-guide-close:hover,
.gev-guide-close:focus-visible {
color: #fff;
background: rgba(255, 255, 255, 0.08);
}
/* Progress: one segment per step. */
.gev-guide-progress {
display: flex;
gap: 3px;
margin: 0.45rem 0 0.6rem;
padding: 0;
list-style: none;
}
.gev-guide-progress li {
flex: 1;
height: 2px;
background: rgba(214, 220, 226, 0.16);
border-radius: 2px;
transition: background 220ms ease;
}
.gev-guide-progress li.done {
background: rgba(255, 159, 67, 0.55);
}
.gev-guide-progress li.current {
background: var(--gev-guide-accent);
box-shadow: 0 0 6px rgba(255, 159, 67, 0.6);
}
.gev-guide-callout.swap .gev-guide-body {
animation: gev-guide-swap 260ms ease both;
}
.gev-guide-text {
margin: 0;
font-size: 0.84rem;
line-height: 1.45;
}
/* "Press the highlighted control", with a live dot. */
.gev-guide-hint {
display: flex;
align-items: center;
gap: 0.45rem;
margin: 0.4rem 0 0;
color: rgba(214, 220, 226, 0.6);
font-size: 0.68rem;
}
.gev-guide-hint[hidden] {
display: none;
}
.gev-guide-hint-dot {
width: 6px;
height: 6px;
flex: none;
background: var(--gev-guide-accent);
border-radius: 50%;
animation: gev-guide-blink 1.4s ease-in-out infinite;
}
/* Footer: the Esc hint on the left, the buttons on the right. */
.gev-guide-actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.4rem;
margin-top: 0.7rem;
padding-top: 0.55rem;
border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.gev-guide-actions > span {
display: flex;
gap: 0.4rem;
}
.gev-guide-keys {
display: flex;
align-items: center;
gap: 0.35rem;
margin: 0;
color: rgba(214, 220, 226, 0.45);
font-size: 0.62rem;
}
.gev-guide-keys[hidden] {
display: none;
}
/* With the Esc hint gone, the offer's buttons sit on the right. */
.gev-guide-actions > span:only-of-type {
margin-left: auto;
}
.gev-guide-keys kbd {
padding: 0.05rem 0.3rem;
font-family: var(--font-mono);
font-size: 0.54rem;
border: 1px solid rgba(214, 220, 226, 0.22);
border-radius: 4px;
}
.gev-guide-actions button {
padding: 0.28rem 0.6rem;
color: #1a1206;
font-family: var(--font-mono);
font-size: 0.58rem;
font-weight: 600;
letter-spacing: 0.1rem;
text-transform: uppercase;
white-space: nowrap;
background: var(--gev-guide-accent);
border: 1px solid var(--gev-guide-accent);
border-radius: 6px;
cursor: pointer;
transition:
background 140ms ease,
color 140ms ease,
border-color 140ms ease;
}
.gev-guide-actions button[hidden] {
display: none;
}
.gev-guide-actions button:hover,
.gev-guide-actions button:focus-visible {
background: #ffb36b;
border-color: #ffb36b;
}
/* Secondary buttons: skip a step that waits, or decline the offer. */
.gev-guide-actions button.quiet,
.gev-guide-actions .gev-guide-skip {
color: rgba(214, 220, 226, 0.75);
font-weight: 400;
background: none;
border-color: rgba(214, 220, 226, 0.2);
}
.gev-guide-actions button.quiet:hover,
.gev-guide-actions button.quiet:focus-visible,
.gev-guide-actions .gev-guide-skip:hover,
.gev-guide-actions .gev-guide-skip:focus-visible {
color: #fff;
background: rgba(255, 255, 255, 0.06);
border-color: rgba(255, 159, 67, 0.6);
}
@keyframes gev-guide-ping {
0% {
opacity: 0.9;
transform: scale(1);
}
100% {
opacity: 0;
transform: scale(1.12);
}
}
@keyframes gev-guide-blink {
50% {
opacity: 0.3;
}
}
@keyframes gev-guide-swap {
from {
opacity: 0;
transform: translateY(3px);
}
}
@media (prefers-reduced-motion: reduce) {
.gev-guide-ring,
.gev-guide-callout,
.gev-guide-callout::before {
transition: none;
}
.gev-guide-ring > i,
.gev-guide-hint-dot,
.gev-guide-callout.swap .gev-guide-body {
animation: none;
}
}
/* The guide's live status: read by screen readers, not shown. */
.gev-guide-status {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
+360
View File
@@ -0,0 +1,360 @@
/* Shared desktop command surface. Mobile and exclusive owners keep their layout. */
body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(
.ui-clean-view
):not(.recording-mode):where(
:has(#gev-omnibar):has(#command-dock > #gev-voice-control)
) {
--omnibar-dock-width: clamp(400px, 32vw, 460px);
--omnibar-dock-bottom: 74px;
--omnibar-coordinates-bottom: 4.25rem;
--world-timeline-lift: 0px;
#intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
:is(.hud-top-left, .hud-top-right) {
top: clamp(92px, 10vh, 112px);
}
#intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
.hud-top-left
.hud-readout:has(> #hud-mode) {
display: none;
}
#top-center-actions {
top: clamp(86px, 9.55vh, 108px);
}
#left-panel-stack.layout-focus {
bottom: var(--left-stack-safe-bottom, 4vh);
}
#world-timeline {
bottom: calc(var(--omnibar-dock-bottom) + 66px);
width: var(--omnibar-dock-width);
}
&:has(#gev-chat-panel:not([hidden]), #gev-voice-panel:not([hidden]))
#world-timeline,
&:has(#gev-omnibar.has-results):not(
:has(#gev-voice-control[data-assistant-mode='voice'])
)
#world-timeline {
visibility: hidden;
}
#command-dock {
--dock-voice-width: var(--omnibar-dock-width);
top: auto;
bottom: var(--omnibar-dock-bottom);
z-index: 149;
width: var(--omnibar-dock-width);
max-width: none;
height: 56px;
min-height: 0;
overflow: visible;
align-items: center;
padding: 0;
}
#command-dock > #gev-voice-control {
box-sizing: border-box;
flex: none;
width: 100%;
min-width: 0;
max-width: none;
height: 56px;
margin: 0;
padding: 0 8px;
gap: 0;
align-items: center;
justify-content: space-between;
border: 1px solid rgba(120, 220, 255, 0.16);
border-radius: 18px;
background: linear-gradient(
180deg,
rgba(16, 28, 36, 0.9),
rgba(6, 14, 20, 0.94)
);
box-shadow:
inset 0 1px 0 rgba(200, 245, 255, 0.07),
0 12px 32px rgba(0, 0, 0, 0.45);
backdrop-filter: none;
}
&:has(#gev-omnibar:focus-within) #command-dock > #gev-voice-control {
border-color: rgba(54, 220, 255, 0.5);
box-shadow:
0 12px 32px rgba(0, 0, 0, 0.45),
0 0 0 3px rgba(54, 220, 255, 0.1);
}
#command-dock > #gev-voice-control::before,
#command-dock > #gev-voice-control::after {
content: '';
position: absolute;
top: 16px;
bottom: 16px;
width: 1px;
height: auto;
transform: none;
background: rgba(120, 220, 255, 0.12);
pointer-events: none;
}
#command-dock > #gev-voice-control::before {
inset-inline-start: 54px;
inset-inline-end: auto;
}
#command-dock > #gev-voice-control::after {
inset-inline-start: auto;
inset-inline-end: 54px;
}
#gev-voice-control > :is(#gev-voice-button, #gev-chat-button):focus-visible {
outline: 2px solid #7bd3ef;
outline-offset: 2px;
}
#gev-voice-control > :is(#gev-voice-button, #gev-chat-button) {
display: grid;
place-items: center;
flex: none;
width: 40px;
height: 40px;
min-width: 0;
margin: 0;
padding: 0;
border: 1px solid rgba(120, 220, 255, 0.18);
border-radius: 50%;
background: rgba(5, 17, 24, 0.48);
box-shadow:
inset 0 2px 4px rgba(0, 0, 0, 0.58),
inset 0 -1px 0 rgba(169, 226, 245, 0.12),
0 1px 0 rgba(169, 226, 245, 0.1);
transform: none;
}
#gev-voice-control
> :is(#gev-voice-button, #gev-chat-button):is(
:hover,
[aria-pressed='true'],
[aria-expanded='true']
) {
background: rgba(54, 220, 255, 0.14);
border-color: rgba(54, 220, 255, 0.6);
}
#command-dock #gev-voice-control .gev-mic-orbit,
#command-dock #gev-chat-button > svg {
box-sizing: border-box;
width: 19px;
height: 19px;
padding: 0;
background: none;
border: 0;
box-shadow: none;
}
#gev-voice-button .gev-mic-orbit img {
width: 19px;
height: 19px;
filter: saturate(0.35) brightness(1.25);
}
#gev-voice-button .gev-mic-orbit::before,
#gev-voice-button .gev-mic-orbit::after {
display: none;
}
#gev-voice-control :is(.gev-mic-label, .gev-chat-label) {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
/* Status remains readable while live; idle meter is decorative. */
#command-dock
#gev-voice-control:not([data-assistant-mode='voice'])
> .gev-voice-visualizer,
#command-dock
#gev-voice-control:not([data-chat-busy='true'])
> .gev-chat-thinking {
display: none;
}
#command-dock #gev-voice-control[data-chat-busy='true'] > .gev-chat-thinking {
position: absolute;
top: 10px;
left: 50%;
height: 0;
transform: translateX(-50%);
pointer-events: none;
z-index: 151;
}
#gev-voice-control > .gev-voice-readout {
position: absolute;
inset-inline: 0;
top: auto;
bottom: calc(100% + 8px);
pointer-events: none;
}
#gev-voice-control[data-assistant-mode='idle'] > .gev-voice-readout {
visibility: hidden;
}
#gev-omnibar {
top: auto;
bottom: calc(var(--omnibar-dock-bottom) + 11px);
left: 50%;
width: calc(var(--omnibar-dock-width) - 120px);
transform: translateX(-50%);
}
#gev-omnibar .omnibar-field {
height: 34px;
padding-inline: 9px 6px;
border: 1px solid rgba(151, 213, 231, 0.27);
border-radius: 9px;
background: rgba(172, 219, 239, 0.07);
box-shadow: none;
backdrop-filter: none;
}
#gev-omnibar-input {
font-size: 0.86rem;
text-overflow: ellipsis;
}
#gev-omnibar-input::placeholder {
color: #b6cbd4;
}
#gev-omnibar .omnibar-field:focus-within {
border-color: rgba(95, 230, 255, 0.66);
background: rgba(109, 206, 232, 0.1);
}
#gev-omnibar .omnibar-search-icon {
color: #a9cfda;
}
#gev-omnibar :is(.omnibar-mic, .omnibar-edge) {
display: none;
}
#gev-omnibar .omnibar-results {
position: absolute;
inset-inline: -60px;
top: auto;
bottom: calc(100% + 11px);
max-height: min(
360px,
max(0px, calc(100dvh - var(--omnibar-dock-bottom) - 144px))
);
overflow: auto;
border-radius: 18px 18px 0 0;
border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(50, 54, 62, 0.86);
backdrop-filter: blur(26px) saturate(1.2);
-webkit-backdrop-filter: blur(26px) saturate(1.2);
box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}
&:has(#gev-omnibar.has-results):not(
:has(#gev-voice-control[data-assistant-mode='voice'])
)
#command-dock
> #gev-voice-control {
border-start-start-radius: 0;
border-start-end-radius: 0;
}
#command-dock
#gev-voice-control[data-assistant-mode='voice']
> .gev-voice-visualizer {
position: absolute;
display: block;
inset: auto 64px 10px;
width: auto;
height: 28px;
opacity: 1;
transform: none;
pointer-events: none;
}
#gev-voice-control > .gev-voice-visualizer > span {
display: none;
}
#gev-voice-control > .gev-voice-visualizer > .gev-voice-wave {
display: block;
width: 100%;
height: 100%;
overflow: visible;
mask-image: linear-gradient(
90deg,
transparent,
#000 16%,
#000 84%,
transparent
);
}
.gev-voice-wave path {
fill: none;
stroke-linecap: round;
stroke-linejoin: round;
}
.gev-voice-wave__main {
stroke: #5fe6ff;
stroke-width: 2;
filter: drop-shadow(0 0 4px rgba(54, 220, 255, 0.55));
}
.gev-voice-wave__echo {
stroke: #36dcff;
stroke-width: 1.2;
opacity: 0.35;
}
.gev-voice-wave__soft {
stroke: #9ff1ff;
stroke-width: 1;
opacity: 0.6;
}
&:has(#gev-voice-control[data-assistant-mode='voice']) #gev-omnibar {
.omnibar-field {
background: transparent;
}
:is(input, .omnibar-kbd, .omnibar-search-icon) {
visibility: hidden;
}
/* Suggestions give way to the waveform; an error stays in view. */
.omnibar-results:not(.has-feedback),
.omnibar-results .omnibar-list {
display: none;
}
}
@media (prefers-reduced-motion: no-preference) {
#command-dock #gev-voice-control[data-assistant-mode='voice'] {
animation: omnibar-listening 2.4s ease-in-out infinite;
}
}
/* Desktop uses Omnibar for search and the Visual rail for presets. */
#command-dock > :is(#location-bar, #control-panel) {
display: none;
}
/* Align the plain credits with Power Up. */
:is(#cesium-credits, #gev-credits),
&:has(#intel-hud[data-variant='minimal'].active)
:is(#cesium-credits, #gev-credits) {
bottom: 1rem;
}
#intel-hud[data-variant='tactical'] .hud-bottom-right {
bottom: calc(4.2rem - 26px);
}
#intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
.hud-bottom-left {
bottom: var(--omnibar-coordinates-bottom);
}
&:not(.context-docked):has(#intel-hud[data-variant='minimal'].active)
#right-context-rail {
--omnibar-minimal-rail-height: min(
var(--right-stack-max-height, 70vh),
calc(
100dvh - var(--right-stack-safe-top, 26vh) -
var(--omnibar-coordinates-bottom) - 3.1rem - 1.2vh
)
);
max-height: var(--omnibar-minimal-rail-height);
> [data-panel-id]:not(.collapsed) {
max-height: var(--omnibar-minimal-rail-height);
}
}
}
@keyframes omnibar-listening {
0%,
100% {
border-color: rgba(54, 220, 255, 0.35);
}
50% {
border-color: rgba(54, 220, 255, 0.75);
}
}
+2 -2
View File
@@ -153,10 +153,10 @@ function selectMapSource(chip) {
<button id="search-toggle" class="search-toggle-btn" :title="t('Search any location')" @click="locationControls?.toggleSearch()">
<span>&#x1F50E;</span>
</button>
<input type="text" id="location-search" v-class-toggle="{ expanded: !!loc?.searchExpanded, searching: !!loc?.searching }" :placeholder="t('Search any location...')" autocomplete="off" spellcheck="false" :aria-label="t('Search location by name or coordinates')" :aria-invalid="loc?.searchError ? 'true' : null" :aria-describedby="loc?.searchError ? 'location-search-error' : null" />
<input type="text" id="location-search" v-class-toggle="{ expanded: !!loc?.searchExpanded, searching: !!loc?.searching }" :placeholder="t('Search any location...')" autocomplete="off" spellcheck="false" :aria-label="t('Search location by name or coordinates')" :aria-invalid="loc?.searchOrigin !== 'omnibar' && loc?.searchError ? 'true' : null" :aria-describedby="loc?.searchOrigin !== 'omnibar' && loc?.searchError ? 'location-search-error' : null" />
</div>
</div>
<p id="location-search-error" class="location-search-error" role="alert">{{ loc?.searchError }}</p>
<p id="location-search-error" class="location-search-error" role="alert">{{ loc?.searchOrigin === 'omnibar' ? '' : loc?.searchError }}</p>
</div>
</div>
</div>
+2
View File
@@ -19,6 +19,7 @@ import AwarenessDirection from './panels/AwarenessDirection.vue';
import UiButton from '../kit/UiButton.vue';
import GlobeActions from './panels/GlobeActions.vue';
import { useGlobeActionsStore } from '../stores/globeActions.js';
import Omnibar from './panels/Omnibar.vue';
import RenderFailure from './panels/RenderFailure.vue';
import WorldTimeline from './panels/WorldTimeline.vue';
@@ -90,6 +91,7 @@ const vToastText = {
<!-- Top-center camera and share actions -->
<GlobeActions />
<Omnibar />
<div id="global-loading-status" role="status" aria-live="polite" aria-atomic="true" :hidden="loading ? loading.hidden : true" :data-state="loading?.state ?? undefined">
<SplitFlapText id="global-loading-label" :text="loading ? loading.label : t('LOADING LIVE DATA')" :stopped="!!loading?.stopped" />
<span id="global-loading-detail">{{ loading ? loading.detail : '' }}</span>
File diff suppressed because it is too large. Load diff
+65 -1
View File
@@ -1,11 +1,12 @@
<script setup>
import { computed, onBeforeUnmount, ref, watch } from 'vue';
import { storeToRefs } from 'pinia';
import { VOICE_VISUALIZER_BARS } from '../../../voice/control.js';
import { useVoiceStore } from '../../stores/voice.js';
// The dock waveform. Its bars change every animation frame while voice is
// live, so they render here alone, not with the rest of the control.
const { bars } = storeToRefs(useVoiceStore());
const { bars, view } = storeToRefs(useVoiceStore());
const barStyle = (index) => ({
'--bar': index,
...(bars.value?.[index] && {
@@ -13,10 +14,73 @@ const barStyle = (index) => ({
'--audio-opacity': bars.value[index].opacity,
}),
});
// The same levels drawn as a wave: a smooth line through the bars, swinging
// above and below the middle by each bar's height, with two fainter traces
// at different amplitudes. Layouts that want bars hide it; the command bar
// shows the wave instead. While it is hidden (it then has no size) no path
// is computed, though the bars still change every frame.
const voiceMode = computed(() => view.value?.root?.assistantMode === 'voice');
const waveEl = ref(null);
const waveShown = ref(false);
let sizeObserver = null;
watch(waveEl, (element) => {
sizeObserver?.disconnect();
sizeObserver = null;
waveShown.value = false;
if (!element || typeof ResizeObserver !== 'function') return;
sizeObserver = new ResizeObserver(([entry]) => {
waveShown.value = entry.contentRect.width > 0 && entry.contentRect.height > 0;
});
sizeObserver.observe(element);
});
onBeforeUnmount(() => sizeObserver?.disconnect());
const W = 300;
const H = 40;
const MID = H / 2;
const levelPx = (index) => {
const raw = Number.parseFloat(bars.value?.[index]?.level);
return Number.isFinite(raw) ? raw : 5;
};
function wavePath(phase, amplitude = 1) {
const n = VOICE_VISUALIZER_BARS;
const step = W / (n + 1);
const points = [{ x: 0, y: MID }];
for (let i = 0; i < n; i++) {
// A 5px standby bar is a flat line; louder bars swing further.
const swing = Math.min(MID - 2, Math.max(0, levelPx(i) - 5) * 0.6 + 1.2);
const sign = (i + phase) % 2 === 0 ? -1 : 1;
points.push({ x: step * (i + 1), y: MID + sign * swing * amplitude });
}
points.push({ x: W, y: MID });
// Smooth through the points with quadratic curves via their midpoints.
let d = `M ${points[0].x} ${points[0].y}`;
for (let i = 1; i < points.length - 1; i++) {
const mx = (points[i].x + points[i + 1].x) / 2;
const my = (points[i].y + points[i + 1].y) / 2;
d += ` Q ${points[i].x.toFixed(1)} ${points[i].y.toFixed(1)} ${mx.toFixed(1)} ${my.toFixed(1)}`;
}
return `${d} L ${W} ${MID}`;
}
const FLAT = `M 0 ${MID} L ${W} ${MID}`;
const wave = computed(() =>
waveShown.value
? { main: wavePath(0), echo: wavePath(1), soft: wavePath(0, 0.45) }
: { main: FLAT, echo: FLAT, soft: FLAT },
);
</script>
<template>
<div class="gev-voice-visualizer" aria-hidden="true">
<span v-for="index in VOICE_VISUALIZER_BARS" :key="index" :style="barStyle(index - 1)"></span>
<svg v-if="voiceMode" ref="waveEl" class="gev-voice-wave" :viewBox="`0 0 ${W} ${H}`" preserveAspectRatio="none">
<path class="gev-voice-wave__soft" :d="wave.soft" />
<path class="gev-voice-wave__echo" :d="wave.echo" />
<path class="gev-voice-wave__main" :d="wave.main" />
</svg>
</div>
</template>
<style scoped>
.gev-voice-wave { display: none; }
</style>
+2
View File
@@ -61,4 +61,6 @@
@import './src/ui/styles/ai-chat.css';
@import './src/ui/styles/scope-off-shadows.css';
@import './src/ui/styles/stories-entry.css';
@import './src/ui/styles/omnibar-dock.css';
@import './src/ui/styles/guide.css';
@import './src/ui/styles/cyber.css';