Compare commits

..
Author SHA1 Message Date
Sameh Khamis 0a9235cc69 Merge pull request #1827 from bilawalsidhu/manjunath/welcome-steps
Turn the first-run launcher into a three-step welcome
2026-11-18 17:15:24 -08:00
Sameh KhamisandManjunath Paparaju 3c0aec90ef Test which changes lay the right panels out for the Stories card
Co-authored-by: Manjunath Paparaju <[email protected]>
2026-11-18 17:00:10 -08:00
Sameh KhamisandManjunath Paparaju 866eadbe5e Let a quick second click on Next move on, and Tab leave the welcome for the page
The second click of a double click on NEXT was dropped, so the button
looked dead; it now moves to the next step, and only the launch itself
still takes a single click. Tab from the search bar or another control
jumped back into the card; the card no longer claims focus from the page,
and still takes it when focus has nowhere else to be.

Co-authored-by: Manjunath Paparaju <[email protected]>
2026-11-18 17:00:10 -08:00
Sameh KhamisandManjunath Paparaju 4d42c56bdf Lay the right panels out again when the welcome stops hiding the Stories card
The welcome hides the card while it is up and while BROWSE STORIES loads,
so the right column started level with the left one; when the welcome
closed, the card showed over the column until something else moved the
panels. The column is laid out again when the welcome is removed or its
loading class comes off.

Co-authored-by: Manjunath Paparaju <[email protected]>
2026-11-18 17:00:10 -08:00
Sameh KhamisandManjunath Paparaju 44bc79ea25 Name the changelog entry for its pull request
Co-authored-by: Manjunath Paparaju <[email protected]>
2026-11-18 17:00:10 -08:00
Sameh KhamisandManjunath Paparaju 0936da98a9 Launch from the welcome only on a press made on its step, and keep it up if Stories refuses
From review:
- A press begun while the steps were changing and released after (a click
  aimed at NEXT) ran ENTER GOD MODE; a press now belongs to the step it
  began on. Keyboard activation is unchanged.
- BROWSE STORIES closed the card before asking Stories to open, so a
  refusal (another mode holding the globe) left nothing on screen; the card
  closes only once Stories opens.
- On phones a mission's error line was squeezed beside the checkbox and
  BACK; it takes its own row above the buttons.
- CURRENT-STATE calls the YouTube, X, Instagram, LinkedIn and bilawal.ai
  links the author's channels, as the card does.

Co-authored-by: Manjunath Paparaju <[email protected]>
2026-11-18 17:00:10 -08:00
Manjunath PaparajuandSameh Khamis e342149a09 Turn the first-run launcher into a three-step welcome
Replace the single dense welcome card with three short steps: an
introduction to the modes, where to start (Space Missions, Environmental
or Explore manually, Explore selected by default), then quick tips (the
place tip points at the search bar) and links. Next and Back keep the
selection, and only Enter God mode runs a mission; double clicks, Enter
repeats and clicks during a step change cannot launch one. Skip and ESC
close the card for the session, as before.

Drop the Live Contacts tile and the old voice tip. Space Missions
switches on its layer, which opens its own panel, so no first-run choice
enters a Context mode or opens the Context panel any more, and that path
is gone. The last step links to the repository and
Halfpixel's channels, each opening in a new tab without opener or
referrer. Its GEV Stories card closes the welcome and opens the in-app
Stories Explore view; the Stories announcement stays hidden, and unseen,
until the card has closed and Stories has loaded. The dim layer behind
the card is a click-through tint with no blur.

Update the 13 catalogs, CURRENT-STATE, the first-run QA harness and its
mutations, and the scripts that dismissed the old card. Add a changelog
fragment.

Co-authored-by: Sameh Khamis <[email protected]>
2026-11-18 17:00:10 -08:00
Sameh Khamis 0421813e26 feat(firms): let an application stand in for the fire markers (#1828)
The fire layer takes a stand-in for its markers (setMarkerStandIn({ hitTest })): its glows, heatmap and ambient cards are hidden, and a click the stand-in answers selects and focuses the fire exactly as a marker click does.
2026-11-18 16:47:24 -08:00
41 changed files with 3265 additions and 1055 deletions

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
- Replace the first-run launcher with a three-step welcome: an introduction to
the modes, where to start (Space Missions, Environmental or Explore
manually), then quick tips and links. The Live Contacts starting choice is
gone. GEV Stories opens in the app from the last step, and a light tint (no
blur) sits over the globe while the card is up (manjunath22466, samehkhamis, #1827).
@@ -0,0 +1,5 @@
- The fire layer takes a stand-in for its markers (`setMarkerStandIn`), for an
application that draws the same detections another way: the markers,
heatmap and ambient cards hide, and a click on a fire the application draws
selects it and moves the camera to it, with its card, as a click on its
marker does (samehkhamis, #1828).
-7
View File
@@ -1,7 +0,0 @@
- More private text typed into the Omnibar or Location search stays off the
place service: emails spelled out or spaced, IP addresses, wallet recovery
phrases, door, alarm and lockbox numbers, codes after their labels,
document and ID numbers, SSNs, more API token shapes and codes in links.
More real places get through: "Boise ID 83702", house numbers in the
order their country writes them, addresses of up to ten words, and long
questions for Ask GEV (manjunath22466, samehkhamis, #1830).
+58 -72
View File
@@ -3392,6 +3392,9 @@ state or inert ancestry; ordinary visible enabled controls retain their order.
focus shared by the first-run launcher and Provider Settings. Each caller
activates it while open and deactivates it on dismissal; destruction releases
keyboard ownership without moving focus. Reopening captures the current opener.
Tab from a control outside the surface moves into it unless the caller passes
`claimOutsideFocus: false`, as the first-run launcher does; focus on the page
body still moves in.
The launcher retains its hit-test/exclusive-surface arbitration and dismissal
preferences. Provider Settings retains its existing visibility and save policy.
Initial focus, transitions and DOM content remain with each screen. This
@@ -4106,10 +4109,34 @@ which embeds the MAP_KEY.
points to restrictions, quota, or connectivity. These hints do not expose keys.
> **2026-08-23 — first-run mission launcher** (`src/firstRunExperience.js`,
> `#first-run-launcher`, styles at the tail of `style.css`). After startup
> settles, a fresh session gets one card offering **Live Contacts · Space
> Missions · Environmental · Explore manually**. No layer and no optional API
> call happens until a tile is clicked. The right-hand DISPLAY rail
> `#first-run-launcher`, styles in `src/ui/styles/first-run.css`). After startup
> settles, a fresh session gets three steps: mode introduction, a starting
> mission, then quick tips and links. God mode is available; Analyst is
> marked coming soon. **Space Missions · Environmental · Explore
> manually** are the starting choices, with Explore selected by default; Live
> Contacts is no longer offered as a starting mission (its Context tab is
> unchanged). The footer status line stays empty until a mission reports
> progress or an error; the old voice tip is gone. While the card is up, a
> click-through backdrop tints the globe behind it (`.first-run-backdrop`, a
> 28% dark tint with no blur); it never takes input, so the card stays
> non-modal. The last step links out to the GitHub repository and
> its author's channels (YouTube, X, Instagram, LinkedIn, bilawal.ai) and
> halfpixel.ai; each opens in a new tab with `rel="noopener noreferrer"`, and
> the addresses live in `FIRST_RUN_LINKS` (`src/firstRunCopy.js`). The GEV
> Stories card's BROWSE STORIES button closes the card (a session dismissal,
> like Skip) and opens the in-app Stories Explore view, keeping the Stories
> announcement hidden while Stories loads. Next and Back preserve that selection without starting
> a mission. Only **Enter God mode** runs it; Back is inert while it is loading.
> Step changes focus the main action, announce the new heading separately from
> mission progress, and refresh the scrolling affordance after the transition. Repeated Enter keys,
> double-clicks and activation during a step transition cannot launch a mission; a quick second
> click on Next still moves to the next step. Tab cycles inside the card, and moves into it from
> the page only when focus has nowhere else to be: Tab from the search bar or another control
> follows the page's order.
> No layer and no optional API call happens until the final action is clicked.
> The Stories announcement waits, from startup until onboarding closes, without
> marking it seen.
> The right-hand DISPLAY rail
> (`pp-toggles`) now starts **collapsed** on a first run rather than expanded —
> a stored collapse state still wins, as before.
>
@@ -4157,26 +4184,28 @@ which embeds the MAP_KEY.
> `localStorage['gev:first-run-mission:v1'] === 'suppressed'`, written **only**
> by the "Don't show this again" checkbox → the per-session
> `sessionStorage['gev:first-run-mission-session:v1'] === 'dismissed'`, written
> by **every** close path (mission, Explore, ESC, the footer dismiss button). So
> by **every** close path (a mission or Explore from ENTER GOD MODE, ESC, the
> header Skip button, BROWSE STORIES). So
> it returns each fresh browser session until the visitor ticks the box; clearing
> storage un-ticks it, which is accepted. Both stores fail open — an unreadable
> store still shows the launcher rather than silently swallowing first launch.
>
> **The footer dismiss button is the keyboardless ESC.** Phones and tablets have
> no ESC key, so the footer hint is a `data-first-run-dismiss` button that calls
> **The header Skip button is the keyboardless ESC.** Phones and tablets have
> no ESC key, so the header action is a `data-first-run-dismiss` button that calls
> the same `dismiss()` as ESC. It stays visible at every width (phones used to
> hide it, leaving a mission as the only way out) and reads DISMISS on a
> `(hover: none) and (pointer: coarse)` screen, "ESC to dismiss" otherwise. Its
> 44px touch target is a `::before` outside the layout, so the footer row keeps
> hide it, leaving a mission as the only way out) and reads SKIP on a
> `(hover: none) and (pointer: coarse)` screen, "SKIP · ESC" otherwise. Its
> 44px touch target is a `::before` outside the layout, so the header row keeps
> its one-line height.
>
> **What a mission may persist (do not "simplify" this).** Layer enablement is
> durable in this app (`gev:layer-state:v2`, written by
> `LayerStateCoordinator._commitExplicit` only for origin `user`/`voice`/`tool`).
> A mission enables **its own** layers at `origin: 'user'` — durable, exactly as
> clicking those rows is, because picking the mission _is_ that choice. The two
> Context missions also expand the Context panel, as the visible tabs do; the
> globe missions open no panel. Everything else is off limits: detection
> clicking those rows is, because picking the mission _is_ that choice. Space
> Missions switches on its layer, which opens its own Space Missions panel; no
> mission enters a Context mode or opens the Context panel, and the globe
> missions open no panel. Everything else is off limits: detection
> mode/density, `gev:detection-allocation:v1`, 3D models, feather, and above all
> `_detectionUserOverridden` — setting that flag means "the operator hand-edited
> detection" and would silently disable the CRT/NVG/FLIR auto-preset contract for
@@ -8026,13 +8055,10 @@ 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, ten with a number in it
as an address has, no `?`, not a command,
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 (the suggester itself never sends a line of
more than eight words, or ten with a number): at most one request every
500 ms per tab,
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
@@ -8046,89 +8072,49 @@ 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); an email spelled around a filter
("john(at)gmail.com", "john[at]gmail[dot]com", "john at gmail dot de",
"john at gmail.com", "john at gmail (dot) com"); an IP address
("10.0.0.1", "::1", "fe80::1", "https://[::1]/"); a wallet's recovery
phrase (see below); seven digits or more with nothing but spaces,
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 (a house number never starts with 0, and
a polite word such as "thanks" after the digits is not a city): five digits, or between the street and
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 state's
code or name ("Alice 12345-6789" and "Jo 12345-6789" stay private),
a Brazilian CEP, a Japanese postcode after "〒" or next to the address in
Japanese script ("東京都千代田区100-0001"; after a Latin name, as in
"Shibuya 150-0002", it reads as a phone number), and
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", "pw" or "pwd" followed by anything, "bearer"
followed by anything but a short capitalised name or a place word such as
island or lake ("Bearer Island", "bearer island" are places),
"ssn" followed by a digit ("SSN Station" is a place), "token", "secret",
"api key", "key" or "pass" followed by ":" or "=", a licence, plate,
passport, membership, account, policy, ticket, booking, confirmation or
reference number with a digit after its label ("license ABC1234",
"passport no. 123456"), "ID" in capitals followed by a number ("ID
AB123"), "otp", "2fa", "mfa", "cvv", "cvc" or a verification, one-time,
security, auth or login code followed by a code (any value after a label
in lower case, "verification code Abc", also before "thanks"; after a label
written as a name, any value that is not one: "OTP Bank" and "Security
Code Plaza" are places), a "pin" or door, access, gate, alarm or entry
code followed by a value in mixed case ("PIN aBcD"), a
"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_`, `github_pat_`, `glpat-`, `hf_`, a SendGrid
`SG.` key or a Slack token's `xoxb-` and the like (any case) or
`AIza` or `eyJ`, or an AWS key id (`AKIA` and twelve capitals or digits
more; "Akiak" is a place); or a word that may be a password or key, with letters and digits mixed
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), six
read as private: two with stray digits ("Maliga0N", "Jerónim67"), two
joined by "@" to a lower-case handle ("Pulipadu @Govardhanagiri") and two
with number lists or dates. When the text may be private the field says
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, no three digits
followed by four as a phone number writes them, and no word such as
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 suggested house is named by its number and its street (or, without a
street, its locality, district or city) in the order its country writes them: "10 Downing
Street", "Hauptstraße 12".
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 (twelve to twenty-four short words with none of
the common words a phrase list lacks, such as "the", "and" or "are", so a
long question still goes to Ask GEV), "my secret is …", an email spelled
out ("john at example dot com", "punto com", or letter by letter), a door,
alarm or lockbox number ("code 4821"; "zip code 90210" and "area code 415"
are places), "Authorization: Bearer …", a code in a link (`?code=…`), a
spaced UK National Insurance number and "my id is …" are private too.
"Boise ID 83702" names Idaho. Some private text is not caught: a
passphrase run together as one word (a long place name is one word too),
a lower-case word after "otp", "2fa" or "mfa" ("mfa boston" is a name;
"otp ABCDEF" is caught) and a code of lower-case letters after "pin" or
"gate code" ("PIN ABCD" is caught).
A Japanese postcode after a Latin name is refused ("Shibuya 150-0002"), and
so is a name in capitals after a code's label ("MFA BOSTON", which cannot
be told from "OTP ABCDEF"). Text that parses as coordinates or a
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
+20 -21
View File
@@ -276,21 +276,21 @@ const MUTATIONS = [
},
{
defect: 'the tile stops promising the fires it actually turns on',
file: 'html',
file: 'module',
from: " 'Live earthquakes and active fires, from USGS and NASA',",
to: " 'Live earthquakes worldwide, straight from USGS',",
},
{
defect: 'the owner-authored first-run line is quietly rewritten',
defect: 'the maintainer-authored first-run line is quietly rewritten',
file: 'html',
from: 'It feels like a forbidden cockpit—then you realize the sources are public and the data is real.',
to: "It feels like a forbidden cockpit. It isn't — every feed is public, and every contact is live.",
to: 'A live 3D globe of public data. Pick a view to begin.',
},
{
defect: 'the ledgered global-chip defect loses its pointer to the real fix',
file: 'module',
from: ' // means a KEY REQUIRED terminal state in src/loadingFeedback.js, a state',
to: ' // (note removed)',
from: ' // ends KEY REQUIRED (src/loadingFeedback.js), and the quakes half of the',
to: ' // ends KEY REQUIRED, and the quakes half of the',
},
{
defect: 'the globe missions never pull the camera out',
@@ -314,7 +314,7 @@ const MUTATIONS = [
defect: 'Explore manually quietly runs a mission instead of nothing',
file: 'module',
from: "if (mission.kind === 'none') return { ok: true, choice };",
to: "if (mission.kind === 'none') return { ok: true, choice, ran: await setContextMode('contacts') };",
to: "if (mission.kind === 'none') return { ok: true, choice, ran: await setLayerEnabled('rocket-launches') };",
},
{
defect: 'an unknown choice is treated as a success',
@@ -348,15 +348,14 @@ const MUTATIONS = [
{
defect: 'a mission persists a 3D-models choice nobody made',
file: 'module',
from: ' const result = await styleManager.setContextMode(mode);',
to: ' styleManager._setModels3dEnabled?.(true);\n const result = await styleManager.setContextMode(mode);',
from: " setLayerEnabled: (layerId) =>\n dataManager.setEnabled(layerId, true, { origin: 'user' }),",
to: " setLayerEnabled: (layerId) => {\n styleManager._setModels3dEnabled?.(true);\n return dataManager.setEnabled(layerId, true, { origin: 'user' });\n },",
},
{
defect:
'the Context panel is left collapsed, hiding the mode that just started',
defect: 'a mission writes panel chrome nobody chose',
file: 'module',
from: " styleManager.setPanelCollapsed?.('global-context-panel', false, {\n explicit: true,\n });",
to: ' // panel reveal removed',
from: ' flyToGlobe: () => styleManager.resetToGlobeView(),',
to: " flyToGlobe: () => {\n styleManager.setPanelCollapsed?.('global-context-panel', false, { explicit: true });\n return styleManager.resetToGlobeView();\n },",
},
{
defect:
@@ -371,8 +370,8 @@ const MUTATIONS = [
defect:
'disabling the focused tile drops the keyboard to <body> mid-flight',
file: 'html',
from: ':aria-disabled="launcher?.busy ?? undefined" @click="controls?.choose(\'contacts\')"',
to: ':disabled="launcher?.busy === \'true\'" @click="controls?.choose(\'contacts\')"',
from: ':aria-disabled="String(settling || launcher?.busy === \'true\')" @click="onPrimary"',
to: ':disabled="launcher?.busy === \'true\'" @click="onPrimary"',
},
{
defect: 'Tab escapes into an app the visitor has not seen yet',
@@ -421,8 +420,8 @@ const MUTATIONS = [
defect:
'the card loses its viewport cap and clips on a short landscape phone',
file: 'css',
from: ' max-height: calc(100dvh - 1.5rem);',
to: ' /* cap removed */',
from: ' body.mobile-shell #first-run-launcher {\n bottom: 5.8rem;\n max-height: calc(100vh - 6.55rem);\n max-height: calc(100dvh - 6.55rem);\n }',
to: ' body.mobile-shell #first-run-launcher {\n bottom: 5.8rem;\n /* cap removed */\n }',
},
{
defect:
@@ -437,7 +436,7 @@ const MUTATIONS = [
// those instead and prove nothing about this feature.
defect: "the launcher's reduced-motion opt-out is dropped",
file: 'css',
from: ' #first-run-launcher,\n .first-run-choices button,\n .first-run-arrow {\n transition: none;\n }\n /* Scrolling a tile into view must not animate either. */\n .first-run-choices {\n scroll-behavior: auto;\n }',
from: ' #first-run-launcher,\n .first-run-backdrop,\n .first-run-back,\n .first-run-missions button,\n .first-run-link-card,\n .first-run-link-button,\n .first-run-enter {\n transition: none;\n }\n /* Scrolling a tile into view must not animate either. */\n .first-run-choices {\n scroll-behavior: auto;\n }',
to: ' .first-run-nothing {\n transition: none;\n }',
},
@@ -445,14 +444,14 @@ const MUTATIONS = [
{
defect: 'a mission tile is dropped from the menu',
file: 'html',
from: ' <button type="button" data-first-run-choice="space-missions"',
to: ' <button type="button" data-first-run-choice-disabled="space-missions"',
from: ' <button type="button" data-first-run-start="space-missions"',
to: ' <button type="button" data-first-run-start-disabled="space-missions"',
},
{
defect: "the menu order stops matching the owner's",
file: 'html',
from: '<button type="button" data-first-run-choice="environmental"',
to: '<button type="button" data-first-run-choice="zzz-environmental"',
from: '<button type="button" data-first-run-start="environmental"',
to: '<button type="button" data-first-run-start="zzz-environmental"',
},
{
defect: 'the "don\'t show again" checkbox is removed',
+96 -40
View File
@@ -33,7 +33,7 @@ const TEETH = args.includes('--teeth');
const HEADFUL = args.includes('--headful');
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
const SHOT_DIR = path.join(ROOT, 'qa-shots', 'firstrun');
const SHOT_DIR = process.env.QA_OUTPUT_DIR || path.join(ROOT, 'qa-shots', 'firstrun');
const CHROME_CANDIDATES = [
process.env.PUPPETEER_EXECUTABLE_PATH,
@@ -109,7 +109,7 @@ const appState = (page) => page.evaluate(() => {
const gev = window.__godsEyeView || {};
const sm = gev.styleManager;
const dm = gev.dataManager;
const carto = sm?.viewer?.camera?.positionCartographic;
const carto = gev.viewer?.camera?.positionCartographic;
const layers = {};
const counts = {};
const all = dm?.getAll?.() || [];
@@ -170,8 +170,22 @@ async function watchLoadingChip(page) {
const readLoadingChip = (page) => page.evaluate(() => window.__chipSeen || []);
async function nextStep(page, readySelector) {
await page.click('[data-first-run-next]');
await page.waitForSelector(readySelector, { visible: true });
await page.waitForFunction(() => {
const steps = [...document.querySelectorAll('#first-run-launcher .first-run-step')];
return steps.length === 1
&& !/first-run-step-(forward|back)-(enter|leave)-/.test(steps[0].className)
&& document.querySelector('[data-first-run-primary]')?.getAttribute('aria-disabled') !== 'true';
});
}
async function pick(page, choice, { timeout = 40000, settle = [] } = {}) {
await page.click(`[data-first-run-choice="${choice}"]`);
await nextStep(page, '[data-first-run-start]');
await page.click(`[data-first-run-start="${choice}"]`);
await nextStep(page, '[data-first-run-choice]');
await page.click('[data-first-run-choice]');
await page.waitForFunction(
(sel) => !document.querySelector(sel) || !document.querySelector(sel).classList.contains('visible'),
{ timeout },
@@ -190,8 +204,8 @@ async function pick(page, choice, { timeout = 40000, settle = [] } = {}) {
/** Every section the run is expected to reach; the teeth verdict requires all. */
const EXPECTED_SECTIONS = [
'show-policy', 'esc-arbitration',
'mission-environmental', 'mission-contacts', 'mission-space', 'mission-explore',
'viewports', 'console',
'mission-environmental', 'mission-space', 'mission-explore',
'stories-card', 'viewports', 'console',
];
/*
@@ -482,8 +496,8 @@ async function main() {
record('a fresh session gets the launcher', freshVisible);
if (freshVisible) shots.push(await shoot(page, 'launcher-desktop'));
const focused = await page.evaluate(() => document.activeElement?.dataset?.firstRunChoice ?? null);
record('focus lands on the first mission tile', focused === 'contacts', `activeElement=${focused}`);
const focused = await page.evaluate(() => document.activeElement?.hasAttribute('data-first-run-next') ?? false);
record('focus lands on Next', focused === true, `activeElement=${focused}`);
// The card is a flex column (so its list can scroll on short viewports),
// and an author `display` on this id outranks the UA's `[hidden]` rule.
@@ -500,10 +514,11 @@ async function main() {
record('the hidden attribute still hides the flex card', hiddenHonored === 'none',
`computed display while hidden = ${hiddenHonored}`);
const tiles = await page.$$eval('[data-first-run-choice]', (nodes) => nodes.map((n) => n.dataset.firstRunChoice));
await nextStep(page, '[data-first-run-start]');
const tiles = await page.$$eval('[data-first-run-start]', (nodes) => nodes.map((n) => n.dataset.firstRunStart));
record(
'four tiles in the owner\'s order',
JSON.stringify(tiles) === JSON.stringify(['contacts', 'space-missions', 'environmental', 'explore']),
'three tiles in the owner\'s order',
JSON.stringify(tiles) === JSON.stringify(['space-missions', 'environmental', 'explore']),
tiles.join(' · '),
);
@@ -558,7 +573,7 @@ async function main() {
// ── Mission outcomes ────────────────────────────────────────────────────
// One section PER MISSION: a throw in one (a tile that never rendered under
// --teeth, say) must not take the other four down with it, or the teeth
// --teeth, say) must not take the other two down with it, or the teeth
// tally reports "reached" for assertions that never ran.
let state;
let before;
@@ -642,22 +657,6 @@ async function main() {
shots.push(await shoot(page, 'mission-environmental'));
});
await section('mission-contacts', async () => {
await open(page, { query: "?welcome=1", errorSink: consoleErrors });
await pick(page, 'contacts');
state = await appState(page);
record('LIVE CONTACTS activates the Contacts context mode', state.contextMode === 'flights',
`contextMode=${state.contextMode}`);
const panelOpen = await page.evaluate(() => {
const panel = document.getElementById('global-context-panel');
return !!panel && !panel.classList.contains('collapsed');
});
record('LIVE CONTACTS reveals the Context panel', panelOpen);
record('LIVE CONTACTS still leaves the detection override untouched',
state.detectionOverridden === false, `_detectionUserOverridden=${state.detectionOverridden}`);
shots.push(await shoot(page, 'mission-contacts'));
});
await section('mission-space', async () => {
await open(page, { query: "?welcome=1", errorSink: consoleErrors });
await pick(page, 'space-missions');
@@ -674,25 +673,77 @@ async function main() {
`layerOn=${missions.layerOn} contextMode=${state.contextMode}`);
record('SPACE MISSIONS opens its own panel', missions.panelOpen,
`panelOpen=${missions.panelOpen}`);
record('SPACE MISSIONS still leaves the detection override untouched',
state.detectionOverridden === false, `_detectionUserOverridden=${state.detectionOverridden}`);
shots.push(await shoot(page, 'mission-space-missions'));
});
await section('mission-explore', async () => {
await open(page, { query: "?welcome=1", errorSink: consoleErrors });
// Start below the mission overview so an accidental overview flight is observable.
await page.evaluate(() => {
const camera = window.__godsEyeView.viewer.camera;
camera.cancelFlight();
camera.setView({ destination: camera.position.constructor.fromDegrees(-97.7431, 30.2672, 100000) });
});
const beforeExplore = await appState(page);
await pick(page, 'explore');
state = await appState(page);
record('EXPLORE MANUALLY enables no layer and no context mode',
Object.values(state.layers).every((on) => !on) && state.contextMode === null,
Object.entries(state.layers).filter(([, on]) => on).map(([id]) => id).join(', ') || 'nothing enabled');
// The real claim is that Explore issues no camera command of its own: the
// arrival fly-in owns the camera and must still be heading down, not out.
record('EXPLORE MANUALLY never commandeers the camera',
(state.heightKm ?? 0) < 12000 && (state.heightKm ?? 1e9) <= (beforeExplore.heightKm ?? 1e9),
`${beforeExplore.heightKm} → ${state.heightKm} km (globe would be 18000)`);
beforeExplore.heightKm === 100 && state.heightKm === beforeExplore.heightKm,
`${beforeExplore.heightKm} → ${state.heightKm} km (expected 100 → 100 km)`);
shots.push(await shoot(page, 'mission-explore'));
});
await section('stories-card', async () => {
await open(page, { query: "?welcome=1", errorSink: consoleErrors });
const backdrop = await page.evaluate(() => {
const el = document.querySelector('.first-run-backdrop');
if (!el) return null;
const style = getComputedStyle(el);
return {
filter: style.backdropFilter || style.webkitBackdropFilter || 'none',
background: style.backgroundColor,
pointerEvents: style.pointerEvents,
};
});
record('the welcome backdrop tints the globe without blurring it',
!!backdrop && backdrop.filter === 'none' && backdrop.background !== 'rgba(0, 0, 0, 0)'
&& backdrop.pointerEvents === 'none',
JSON.stringify(backdrop));
await nextStep(page, '[data-first-run-start]');
await nextStep(page, '[data-first-run-choice]');
const button = await page.evaluate(() => {
const el = document.querySelector('#first-run-launcher [data-first-run-stories]');
return el ? { tag: el.tagName, href: el.getAttribute('href'), target: el.getAttribute('target') } : null;
});
record('the GEV Stories card offers an in-app BROWSE STORIES button',
button?.tag === 'BUTTON' && button.href === null && button.target === null,
JSON.stringify(button));
const pagesBefore = (await browser.pages()).length;
await page.click('#first-run-launcher [data-first-run-stories]');
const opened = await page.waitForFunction(
() => document.body.classList.contains('stories-mode')
&& !!document.querySelector('#gev-stories .app'),
{ timeout: 30000 },
).then(() => true, () => false);
const after = await page.evaluate((sel) => ({
launcherVisible: !!document.querySelector(sel)?.classList.contains('visible'),
session: sessionStorage.getItem('gev:first-run-mission-session:v1'),
query: location.search,
}), LAUNCHER);
record('BROWSE STORIES opens Stories Explore in this tab',
opened && (await browser.pages()).length === pagesBefore,
`stories-mode=${opened}, query=${after.query}`);
record('BROWSE STORIES closes the welcome card for the session',
!after.launcherVisible && after.session !== null,
`visible=${after.launcherVisible}, session=${after.session}`);
shots.push(await shoot(page, 'stories-card-explore'));
});
// ── Viewports ───────────────────────────────────────────────────────────
await section('viewports', async () => {
// Portrait phone, LANDSCAPE phone (the short viewport that clipped the card
@@ -705,6 +756,8 @@ async function main() {
for (const vp of VIEWPORTS) {
await page.setViewport({ width: vp.width, height: vp.height, deviceScaleFactor: vp.dpr });
await open(page, { query: "?welcome=1", errorSink: consoleErrors });
for (let step = 1; step <= 3; step++) {
if (step > 1) await nextStep(page, step === 2 ? '[data-first-run-start]' : '[data-first-run-choice]');
const box = await page.evaluate((sel) => {
const node = document.querySelector(sel);
if (!node) return null;
@@ -725,22 +778,23 @@ async function main() {
const fits = !!box && box.top >= 0 && box.bottom <= box.vh
&& box.left >= 0 && box.right <= box.vw;
record(
`the launcher fits a ${vp.label} with no clipping`,
`step ${step} fits a ${vp.label} with no clipping`,
fits,
box ? `${box.left},${box.top} → ${box.right},${box.bottom} in ${box.vw}x${box.vh}${box.listScrolls ? ' (list scrolls)' : ''}` : 'absent',
);
record(`"Don't show this again" stays on screen at ${vp.width}x${vp.height}`,
record(`step ${step} checkbox stays on screen at ${vp.width}x${vp.height}`,
!!box?.checkboxOnScreen);
// Discoverability: if the list scrolls, the LAST tile must still peek
// above the fold. A fold that lands exactly between tiles looks like a
// complete list of four, and the fifth mission is simply never found.
// complete list, and the last mission is simply never found.
if (step === 2) {
const peek = await page.evaluate((sel) => {
const node = document.querySelector(sel);
const list = node?.querySelector('.first-run-choices');
if (!list) return null;
list.scrollTop = 0;
const tiles = [...list.querySelectorAll('[data-first-run-choice]')];
const tiles = [...list.querySelectorAll('[data-first-run-start]')];
const last = tiles[tiles.length - 1];
if (!last) return null;
const listBox = list.getBoundingClientRect();
@@ -749,7 +803,7 @@ async function main() {
return {
scrolls: list.scrollHeight > list.clientHeight + 1,
fraction: lastBox.height ? visible / lastBox.height : 0,
label: last.dataset.firstRunChoice,
label: last.dataset.firstRunStart,
};
}, LAUNCHER);
record(
@@ -765,7 +819,7 @@ async function main() {
const reach = await page.evaluate(async (sel) => {
const node = document.querySelector(sel);
if (!node) return null;
const targets = [...node.querySelectorAll('[data-first-run-choice], [data-first-run-suppress]')];
const targets = [...node.querySelectorAll('[data-first-run-start], [data-first-run-suppress]')];
const offscreen = [];
for (const target of targets) {
target.focus();
@@ -774,7 +828,7 @@ async function main() {
const host = node.getBoundingClientRect();
if (document.activeElement !== target
|| rect.bottom <= host.top || rect.top >= host.bottom) {
offscreen.push(target.dataset.firstRunChoice || 'suppress-checkbox');
offscreen.push(target.dataset.firstRunStart || 'suppress-checkbox');
}
}
return { count: targets.length, offscreen };
@@ -783,7 +837,7 @@ async function main() {
// A hardcoded count silently turns into a failure the day the menu
// changes, which is exactly what it did when a tile was removed.
const expectedFocusable = await page.$$eval(
'[data-first-run-choice]', (nodes) => nodes.length,
'[data-first-run-start]', (nodes) => nodes.length,
) + 1;
record(
`every tile and the checkbox are keyboard-reachable at ${vp.width}x${vp.height}`,
@@ -792,6 +846,7 @@ async function main() {
? `${reach.count}/${expectedFocusable} focusable${reach.offscreen.length ? `, unreachable: ${reach.offscreen.join(', ')}` : ''}`
: 'absent',
);
}
// The reachability probe above tabs to the last tile and scrolls the list
// with it. Put it back to the top so the taste-pass shot shows what a
// visitor actually opens on.
@@ -801,7 +856,8 @@ async function main() {
document.activeElement?.blur?.();
}, LAUNCHER);
await sleep(250);
shots.push(await shoot(page, `launcher-${vp.name}`));
shots.push(await shoot(page, `launcher-${vp.name}-step-${step}`));
}
}
await page.setViewport({ width: 1440, height: 900, deviceScaleFactor: 1 });
});
+1 -1
View File
@@ -111,7 +111,7 @@ await page.waitForFunction(() => window.__godsEyeView?.viewer && window.__godsEy
{ timeout: 150000 });
await sleep(12000); // let the boot fly-to settle before pinning
await page.evaluate(() => {
document.querySelector('#first-run-launcher:not([hidden]) [data-first-run-choice="explore"]')?.click();
document.querySelector('#first-run-launcher:not([hidden]) [data-first-run-dismiss]')?.click();
});
await sleep(600); // let the launcher dismissal finish before taking evidence
-3
View File
@@ -231,9 +231,6 @@ async function boot(page, url) {
await page.waitForFunction(() => Boolean(window.__godsEyeView?.dataManager), {
timeout: 150_000,
});
await page.evaluate(() =>
document.querySelector('.first-run-explore')?.click(),
);
await page.keyboard.press('Escape');
await page.evaluate(() => {
for (const el of document.querySelectorAll(
+143
View File
@@ -25,6 +25,8 @@ import { fakeDrawPort } from '../testSupport/fakeDrawPort.mjs';
import { fakeGlobePort } from '../testSupport/fakeGlobePort.mjs';
import { bindRenderer } from '../render/rendererOf.js';
import { HEAT_REBUILD_MS } from '../layers/firms/policy.js';
import { registerStyleStages } from '../styles/styleStages.js';
import { sensorPickPosition } from '../input/sensorPick.js';
const LAYER_SOURCE = readLayerSource(
path.join(path.dirname(fileURLToPath(import.meta.url)), 'firmsHeatmap.js'),
@@ -649,6 +651,16 @@ test('far zoom drapes one heatmap and the hand-off cross-fades it with the marke
assert.equal(added[0].alpha, 0.5);
assert.equal(glow(1).alpha, 0.5, 'rebuilt markers get the fade');
// An application drawing the detections in their place hides both.
h.layer.setMarkerStandIn({ hitTest: () => null });
assert.equal(added[0].show, false, 'a stand-in hides the heatmap');
assert.equal(markers().show, false, 'and the markers');
h.layer._renderLodForTest('global');
assert.equal(added[0].show, false, 'through a rebuild too');
h.layer.setMarkerStandIn(null);
assert.equal(added[0].show, true);
assert.equal(markers().show, true);
h.layer.disable();
assert.equal(added[0].show, false, 'disable hides the heatmap');
@@ -660,3 +672,134 @@ test('far zoom drapes one heatmap and the hand-off cross-fades it with the marke
restoreDocument();
}
});
test('a click on a fire an application draws in place of the markers selects it as a marker click does', () => {
const fire = makeFire();
const other = makeFire({ index: 8, lat: 31.2, lon: -97.9, frp: 40 });
// The application's records come from the same source, adapted on their own.
let answer = { ...fire };
const asked = [];
const h = harness({ fires: [fire, other], picked: glowPick('firms-8') });
try {
h.layer.setMarkerStandIn({
hitTest: (screen) => {
asked.push(screen);
return answer;
},
});
assert.equal(h.icons().show, false, 'the glows are hidden');
h.published.length = 0;
h.click();
assert.deepEqual(asked, [{ x: 400, y: 300 }]);
assert.equal(h.requests.length, 1, 'the camera moves as for a marker');
assert.equal(h.requests[0].kind, 'fire');
assert.equal(
h.requests[0].id,
fireDetectionKey(fire),
'the stand-in decides, not the hidden glow under the click',
);
assert.equal(h.layer.getSelectedInfo().id, fireDetectionKey(fire));
assert.equal(getSelectedEntityContext().label, 'Fire · FRP 1520 MW');
assert.deepEqual(
h.published.map((entry) => entry.id),
[`selected-fire:${fireDetectionKey(fire)}`],
"only the selected fire's card shows",
);
// Nothing of the application's under the click: empty space.
answer = null;
h.click();
assert.equal(h.requests.length, 1, 'no camera move');
assert.equal(h.layer.getSelectedInfo(), null, 'the selection is cleared');
} finally {
h.cleanup();
}
});
test('a stand-in hit on a fire the layer does not show selects nothing', () => {
const fire = makeFire();
const h = harness({ fires: [fire] });
try {
h.layer.setMarkerStandIn({
hitTest: () => makeFire({ lat: 12.5, lon: 40.1 }),
});
h.click();
assert.equal(h.requests.length, 0);
assert.equal(h.layer.getSelectedInfo(), null);
} finally {
h.cleanup();
}
});
test('taking the stand-in away brings the markers and their cards back and keeps the selection', () => {
const fire = makeFire();
const h = harness({
fires: [fire],
// Near enough for the markers rather than the heatmap.
cameraPosition: Cesium.Cartesian3.fromDegrees(fire.lon, fire.lat, 500_000),
});
try {
h.layer.setMarkerStandIn({ hitTest: () => fire });
assert.equal(h.icons().show, false);
h.click();
h.layer.setMarkerStandIn(null);
assert.equal(h.icons().show, true);
assert.equal(h.layer.getSelectedInfo().id, fireDetectionKey(fire));
const ids = h.published.map((entry) => entry.id);
assert.ok(ids.includes(`selected-fire:${fireDetectionKey(fire)}`));
} finally {
h.cleanup();
}
});
test('the stand-in is asked where a marker is picked: the click as the sensor style draws it', () => {
const fire = makeFire();
const asked = [];
const h = harness({ fires: [fire] });
try {
registerStyleStages(h.viewer.scene, {
surveillance: {
enabled: true,
uniforms: { intensity: 1, pixelation: 4 },
},
});
h.layer.setMarkerStandIn({
hitTest: (screen) => {
asked.push(screen);
return fire;
},
});
h.click();
const expected = sensorPickPosition(
h.viewer.scene,
{ x: 400, y: 300 },
h.viewer.scene.canvas,
);
assert.notDeepEqual([expected.x, expected.y], [400, 300]);
assert.deepEqual([asked[0].x, asked[0].y], [expected.x, expected.y]);
} finally {
h.cleanup();
}
});
test("a sibling layer's item over a stand-in fire wins the click", () => {
const fire = makeFire();
let asked = 0;
registerPickOwner('flights', (pickedId) => pickedId === 'a1b2c3');
const h = harness({ fires: [fire], picked: { id: 'a1b2c3' } });
try {
h.layer.setMarkerStandIn({
hitTest: () => {
asked++;
return fire;
},
});
h.click();
assert.equal(asked, 0, 'the stand-in is not asked');
assert.equal(h.requests.length, 0, 'no camera move');
assert.equal(h.layer.getSelectedInfo(), null);
} finally {
h.cleanup();
unregisterPickOwner('flights');
}
});
+14 -4
View File
@@ -26,7 +26,17 @@ export function environmentalLabel(choice = ENVIRONMENTAL_LABEL_CHOICE) {
return { title: t(key) };
}
/** The status line between missions. */
export const FIRST_RUN_TIP = msg(
'Tip: the GEV MIC button in the dock lets you talk to the map.',
);
/**
* The outbound links the first-run card offers.
* @type {Readonly<Record<string, string>>}
*/
export const FIRST_RUN_LINKS = Object.freeze({
/** The open-source repository. */
source: 'https://github.com/bilawalsidhu/gods-eye-view',
youtube: 'https://www.youtube.com/@bilawalsidhu',
x: 'https://x.com/bilawalsidhu',
instagram: 'https://www.instagram.com/bilawal.ai',
linkedin: 'https://www.linkedin.com/in/bilawalsidhu',
website: 'https://bilawal.ai',
halfpixel: 'https://halfpixel.ai',
});
+27 -50
View File
@@ -23,13 +23,12 @@ import { createSurfaceKeyboard } from './ui/surfaceKeyboard.js';
import { t, msg } from './i18n/index.js';
import { EXCLUSIVE_SURFACE_CLASSES } from './exclusiveSurfaces.js';
import { FIRST_RUN_TIP, environmentalLabel } from './firstRunCopy.js';
import { environmentalLabel } from './firstRunCopy.js';
import { useFirstRunStore } from './ui/stores/firstRun.js';
import { applicationPinia } from './ui/vueRuntime.js';
export {
ENVIRONMENTAL_LABEL_CHOICE,
FIRST_RUN_TIP,
environmentalLabel,
} from './firstRunCopy.js';
@@ -53,12 +52,12 @@ export const FIRST_RUN_SESSION_KEY = 'gev:first-run-mission-session:v1';
* TOUCHED, DURABLE layer enables for the mission's OWN layers, at
* `origin: 'user'` — identical to clicking those rows.
* Choosing ENVIRONMENTAL *is* choosing those layers.
* TOUCHED, DURABLE the Context panel reveal, but only for the Contacts
* mission, exactly as the visible Contacts tab does
* it. Space Missions opens its own panel the way
* switching its layer on does. The globe missions open
* no panel at all — nothing there needs explaining,
* and a panel-collapse write is a pref nobody chose.
* TOUCHED, DURABLE the Space Missions panel, which opens as it does when
* its layer is switched on from its Data Layers row.
* No mission reveals the Context panel, and the globe
* missions open no panel at all — nothing there needs
* explaining, and a panel-collapse write is a pref
* nobody chose.
* TOUCHED, SESSION the camera. Never persisted by anything.
* NOT TOUCHED detection mode + density. The reasonable-defaults
* landing owns the DENSE/75 start, and Contacts owns
@@ -67,8 +66,8 @@ export const FIRST_RUN_SESSION_KEY = 'gev:first-run-mission-session:v1';
* NOT TOUCHED `_detectionUserOverridden`. Setting it would mean "the
* operator hand-edited detection" and would silently
* kill the CRT/NVG/FLIR auto-preset contract for the
* whole session. Missions run through setContextMode and
* DataManager.setEnabled, neither of which writes it.
* whole session. Missions run through
* DataManager.setEnabled, which does not write it.
* NOT TOUCHED detection allocation (`gev:detection-allocation:v1`),
* 3D aircraft models, scope feather. All are defaults or
* separate durable prefs the visitor did not choose here.
@@ -76,19 +75,12 @@ export const FIRST_RUN_SESSION_KEY = 'gev:first-run-mission-session:v1';
* `_setModels3dMode`, which default to origin 'user' and
* would persist a 3D choice nobody made.
*
* The Contacts mission deliberately reuses `styleManager.setContextMode`, the
* same facade the visible tab and voice use, so Contacts detection ownership,
* layer isolation and rollback stay in exactly one place. Space Missions is an
* ordinary layer, switched on like clicking its row.
* Every mission is an ordinary layer choice, switched on like clicking its row,
* so no mission enters a Context mode.
*/
/** @type {Readonly<Record<string, object>>} */
export const FIRST_RUN_MISSIONS = Object.freeze({
contacts: Object.freeze({
kind: 'context',
contextMode: 'contacts',
busyKey: msg('Starting live contacts…'),
}),
'space-missions': Object.freeze({
// An ordinary layer with its own panel: no camera flight, and its panel
// opens as it does for a click on its Data Layers row.
@@ -250,22 +242,17 @@ export function rememberFirstRunSessionDismissed(sessionStorageRef) {
*
* @param {string} choice Key of FIRST_RUN_MISSIONS.
* @param {object} deps
* @param {(mode: string) => Promise<object>} deps.setContextMode
* @param {(layerId: string) => Promise<boolean>} deps.setLayerEnabled
* @param {() => Promise<any>} deps.flyToGlobe
* @returns {Promise<{ok: boolean, choice: string, result?: object, failedLayerIds?: string[]}>}
* @returns {Promise<{ok: boolean, choice: string, failedLayerIds?: string[]}>}
*/
export async function runFirstRunChoice(
choice,
{ setContextMode, setLayerEnabled, flyToGlobe },
{ setLayerEnabled, flyToGlobe },
) {
const mission = FIRST_RUN_MISSIONS[choice];
if (!mission) return { ok: false, choice };
if (mission.kind === 'none') return { ok: true, choice };
if (mission.kind === 'context') {
const result = await setContextMode(mission.contextMode);
return { ok: Boolean(result?.ok), choice, result };
}
// Globe missions: start the pull-out and the layer work together so the
// camera is already moving while the feeds spin up. The flight is framing,
// not the mission — a stalled or superseded flight never fails the tile.
@@ -344,16 +331,14 @@ export function initFirstRunExperience({
closing: false,
state: null,
busy: null,
status: t(FIRST_RUN_TIP),
// Empty until a mission reports progress or an error.
status: '',
// The tile name is owner-switchable from one constant, so paint it from
// the module rather than trusting the markup to match.
environmentalTitle: environmentalLabel().title,
environmentalSub: t(
'Live earthquakes and active fires, from USGS and NASA',
),
description: t(
'It feels like a forbidden cockpit—then you realize the sources are public and the data is real.',
),
scrollable: null,
};
let signature = '';
@@ -379,7 +364,6 @@ export function initFirstRunExperience({
}
present({});
const defaultStatus = view.status;
// An error or refused save stays on the status line until the next choice.
let stickyStatus = false;
let busy = false;
@@ -439,10 +423,14 @@ export function initFirstRunExperience({
globalThis.removeEventListener?.('resize', onViewportResize);
surfaceObserver?.disconnect();
const remove = () => {
root.removeEventListener('transitionend', onTransitionEnd);
store.connect(null);
present({ removed: true });
};
root.addEventListener('transitionend', remove, { once: true });
const onTransitionEnd = (event) => {
if (event.target === root) remove();
};
root.addEventListener('transitionend', onTransitionEnd);
// `transitionend` never fires under prefers-reduced-motion (no transition),
// so a bounded fallback is what actually removes the node there.
globalThis.setTimeout?.(remove, 400);
@@ -459,7 +447,7 @@ export function initFirstRunExperience({
const patch = { state: next ? 'loading' : 'ready', busy: String(next) };
if (next)
patch.status = t(FIRST_RUN_MISSIONS[choice]?.busyKey || msg('Working…'));
else if (!stickyStatus) patch.status = defaultStatus;
else if (!stickyStatus) patch.status = '';
present(patch);
};
@@ -471,19 +459,6 @@ export function initFirstRunExperience({
let outcome = null;
try {
outcome = await runFirstRunChoice(choice, {
setContextMode: async (mode) => {
const result = await styleManager.setContextMode(mode);
if (result?.ok) {
// setContextMode is also a voice/internal facade and deliberately
// does not decide panel chrome. This first-run click is an explicit
// visual choice, so reveal the result exactly as the visible
// Contacts tab does.
styleManager.setPanelCollapsed?.('global-context-panel', false, {
explicit: true,
});
}
return result;
},
// `origin: 'user'` on purpose: a mission tile is a real person choosing
// these layers, so it persists exactly as clicking those rows would.
setLayerEnabled: (layerId) =>
@@ -500,9 +475,7 @@ export function initFirstRunExperience({
dismiss();
return;
}
const failed = outcome?.failedLayerIds?.length
? outcome.failedLayerIds
: outcome?.result?.failedLayerIds;
const failed = outcome?.failedLayerIds;
const detail =
Array.isArray(failed) && failed.length ? ` (${failed.join(', ')})` : '';
stickyStatus = true;
@@ -540,6 +513,9 @@ export function initFirstRunExperience({
isActive: () => !closing && isTopmost(),
onEscape: () => dismiss(),
fallbackFocus: () => documentRef.body,
// The card sits beside a usable map: Tab from the search bar or any
// other control follows the page's order instead of jumping back in.
claimOutsideFocus: false,
});
store.connect({
@@ -547,6 +523,7 @@ export function initFirstRunExperience({
// The same dismissal as ESC, for screens without a keyboard.
dismiss: () => dismiss(),
suppress: onSuppressChange,
refreshLayout: () => syncScrollAffordance(),
});
// Capture phase: the app binds its own global hotkeys (including bare letters
// that cycle detection and styles), and the launcher owns the keyboard first.
@@ -572,7 +549,7 @@ export function initFirstRunExperience({
present({ visible: true });
syncScrollAffordance();
root
.querySelector('[data-first-run-choice]')
.querySelector('[data-first-run-primary]')
?.focus?.({ preventScroll: true });
});
};
+150 -115
View File
@@ -537,20 +537,13 @@ test('the launcher yields on engage and waits when a surface is already up', ()
// ── Per-mission behavior ─────────────────────────────────────────────────────
function missionSpy({
contextOk = true,
layerResult = () => true,
globe = async () => ({ ok: true }),
} = {}) {
const calls = { contextModes: [], layerIds: [], globeFlights: 0 };
const calls = { layerIds: [], globeFlights: 0 };
return {
calls,
deps: {
setContextMode: async (mode) => {
calls.contextModes.push(mode);
return contextOk
? { ok: true, mode }
: { ok: false, failedLayerIds: ['military-awareness'] };
},
setLayerEnabled: async (layerId) => {
calls.layerIds.push(layerId);
return layerResult(layerId);
@@ -563,14 +556,14 @@ function missionSpy({
};
}
test('the menu is the four owner-ordered missions', () => {
test('the menu is the three owner-ordered missions', () => {
// INFRASTRUCTURE was removed after the owner playtested it: enabling all
// three bundled layers at once put ~5,700 entities on a full-earth view and
// tanked the frame rate. The layers stay reachable by hand and by voice; what
// went is the one-click globe-scale dump. Restoring the tile needs the
// globe-LOD declutter first.
// globe-LOD declutter first. Live Contacts was dropped from the product, so
// it is not offered as a starting mission either.
assert.deepEqual(Object.keys(FIRST_RUN_MISSIONS), [
'contacts',
'space-missions',
'environmental',
'explore',
@@ -580,27 +573,17 @@ test('the menu is the four owner-ordered missions', () => {
undefined,
'the infrastructure mission must be gone, not dormant',
);
});
test('Live Contacts goes through the one setContextMode facade', async () => {
const spy = missionSpy();
const outcome = await runFirstRunChoice('contacts', spy.deps);
assert.equal(outcome.ok, true);
assert.deepEqual(spy.calls.contextModes, ['contacts']);
// A Context mission owns no layers and no camera of its own — the facade does.
assert.deepEqual(spy.calls.layerIds, []);
assert.equal(spy.calls.globeFlights, 0);
assert.equal(
FIRST_RUN_MISSIONS.contacts,
undefined,
'the contacts mission must be gone, not dormant',
);
});
test('Space Missions switches on its layer like a row click, without a flight', async () => {
const spy = missionSpy();
const outcome = await runFirstRunChoice('space-missions', spy.deps);
assert.equal(outcome.ok, true);
assert.deepEqual(
spy.calls.contextModes,
[],
'Space Missions is not a Context mode',
);
assert.deepEqual(spy.calls.layerIds, ['rocket-launches']);
assert.equal(spy.calls.globeFlights, 0, 'the layer frames the globe itself');
@@ -680,24 +663,9 @@ test('a refused layer fails the mission by name, and a stalled flight never does
test('Explore manually touches nothing at all, and an unknown choice is inert', async () => {
const spy = missionSpy();
assert.equal((await runFirstRunChoice('explore', spy.deps)).ok, true);
assert.deepEqual(spy.calls, {
contextModes: [],
layerIds: [],
globeFlights: 0,
});
assert.deepEqual(spy.calls, { layerIds: [], globeFlights: 0 });
assert.equal((await runFirstRunChoice('nope', spy.deps)).ok, false);
assert.deepEqual(spy.calls, {
contextModes: [],
layerIds: [],
globeFlights: 0,
});
});
test('a failed Context mission reports the layers the facade named', async () => {
const spy = missionSpy({ contextOk: false });
const outcome = await runFirstRunChoice('contacts', spy.deps);
assert.equal(outcome.ok, false);
assert.deepEqual(outcome.result.failedLayerIds, ['military-awareness']);
assert.deepEqual(spy.calls, { layerIds: [], globeFlights: 0 });
});
test('the fires/quakes tile name is switchable from one constant', () => {
@@ -748,23 +716,10 @@ test('no mission writes a preference the visitor did not choose by picking it',
);
}
// The only durable panel write is the Context reveal, and only on the Context
// mission — the globe missions open no panel at all, and Space Missions'
// panel opens the way its layer row's switch opens it.
const panelWrites = code.match(/setPanelCollapsed/g) || [];
assert.equal(
panelWrites.length,
1,
'exactly one panel reveal, on the Context path',
);
const contextPath = code.slice(
code.indexOf('setContextMode: async (mode)'),
code.indexOf('setLayerEnabled:'),
);
assert.match(
contextPath,
/result\?\.ok[\s\S]*?setPanelCollapsed\?\.\('global-context-panel', false, \{\s*explicit: true,?\s*\}\)/,
);
// No mission writes panel chrome: the globe missions open no panel at all,
// and Space Missions' panel opens the way its layer row's switch opens it.
assert.doesNotMatch(code, /setPanelCollapsed/);
assert.doesNotMatch(code, /setContextMode/);
});
test('the decision table is written down where the next editor will read it', () => {
@@ -801,56 +756,19 @@ test('markup, startup ordering and accessibility remain pinned', async () => {
html,
/id="first-run-launcher" role="dialog"[^>]*aria-labelledby="first-run-title"[^>]*hidden/,
);
assert.equal((html.match(/data-first-run-choice=/g) || []).length, 4);
assert.equal((html.match(/data-first-run-choice=/g) || []).length, 0);
assert.match(html, /data-first-run-next/);
assert.ok(
html.includes(
'<p id="first-run-description">It feels like a forbidden cockpit—then you realize the sources are public and the data is real.</p>',
),
'the maintainer-authored first-run line stays verbatim',
);
assert.match(
html,
/data-first-run-status[^>]*role="status"[^>]*aria-live="polite"/,
);
assert.match(html, /<input type="checkbox" data-first-run-suppress\s*\/?>/);
assert.match(html, /<strong data-first-run-environmental-title>/);
// Subcopy must name BOTH feeds the tile turns on — a tile that promised only
// half of what it does is the defect this replaced. Only the VISIBLE <small>
// text counts; the comment beside it naturally says the words too.
const envTile = html.slice(
html.indexOf('data-first-run-choice="environmental"'),
);
const visible = envTile.slice(
envTile.indexOf('<small>'),
envTile.indexOf('</small>'),
);
assert.match(visible, /earthquakes/i);
assert.match(
visible,
/fires?/i,
'the tile must promise the fires it enables',
);
// The card's one persuasive line is OWNER-AUTHORED and pinned verbatim,
// unspaced em dash included. This is copy, not prose to be improved in a
// passing edit — changing it needs the owner, not a nicer-sounding rewrite.
assert.ok(
html.includes(
'<p id="first-run-description">It feels like a forbidden cockpit' +
'—then you realize the sources are public and the data is real.</p>',
),
'the owner-authored first-run line must ship exactly as written',
);
// Menu order is the owner's, read straight off the markup.
const order = [...html.matchAll(/data-first-run-choice="([a-z-]+)"/g)].map(
(match) => match[1],
);
assert.deepEqual(order, [
'contacts',
'space-missions',
'environmental',
'explore',
]);
assert.doesNotMatch(
html,
/data-first-run-choice="infrastructure"/,
'the removed tile must leave no markup behind',
);
assert.match(startup, /styleManager\.initialRestorePromise/);
assert.ok(
@@ -905,40 +823,156 @@ test('markup, startup ordering and accessibility remain pinned', async () => {
assert.match(choicesBlock, /overflow-y: auto;/);
});
test('the header text keeps clear of the centred step dots', () => {
const css = fs.readFileSync(
new URL('./ui/styles/first-run.css', import.meta.url),
'utf8',
);
// Above 620px the dots are absolutely centred over the header row, so the
// kicker and Skip must stop short of them; long locales then wrap.
assert.match(css, /\.first-run-dots \{\s*position: absolute;\s*left: 50%;/);
assert.match(
css,
/@media \(min-width: 621px\) \{\s*\.first-run-kicker,\s*\.first-run-dismiss \{\s*max-width: calc\(50% - 2\.4rem\);\s*\}\s*\}/,
);
assert.match(
css,
/@media \(max-width: 620px\) \{\s*\.first-run-dots \{\s*position: static;/,
);
});
test('reduced motion stops every first-run animation, however specific', () => {
const css = fs.readFileSync(
new URL('./ui/styles/first-run.css', import.meta.url),
'utf8',
);
// Every rule that starts an infinite animation must be matched by a
// reduced-motion rule at least as specific, or the animation keeps running.
const reduced = [
...css.matchAll(
/@media \(prefers-reduced-motion: reduce\) \{([\s\S]*?)\n\}/g,
),
]
.map((m) => m[1])
.join('\n');
const squash = (selector) => selector.replace(/\s+/g, ' ').trim();
const reducedSelectors = new Set(
[...reduced.matchAll(/([^{}]+)\{[^}]*animation: none/g)].flatMap((m) =>
m[1].split(/,(?![^(]*\))/).map(squash),
),
);
const animated = [
...css.matchAll(/([^{}@]+)\{[^}]*animation: [^;]*infinite/g),
]
.flatMap((m) => m[1].split(/,(?![^(]*\))/).map(squash))
.filter((selector) => !selector.startsWith('/*'));
assert.ok(animated.length > 5, 'found the animated rules');
const covered = (selector) => {
if (reducedSelectors.has(selector)) return true;
// An :is() group in the reduced block covers each of its members.
return [...reducedSelectors].some((reducedSelector) => {
const group = reducedSelector.match(/^(.*) :is\(([^)]*)\)$/);
return (
group &&
group[2]
.split(',')
.map((part) => `${group[1]} ${part.trim()}`)
.includes(selector)
);
});
};
const missing = animated.filter((selector) => !covered(selector));
assert.deepEqual(missing, [], 'animations reduced motion leaves running');
});
test('the welcome backdrop tints the globe without blurring it', () => {
const css = fs.readFileSync(
new URL('./ui/styles/first-run.css', import.meta.url),
'utf8',
);
const backdrop = css.match(/\.first-run-backdrop \{([^}]*)\}/)?.[1] || '';
assert.match(backdrop, /background: rgba\(3, 8, 14, 0\.28\);/);
assert.match(backdrop, /pointer-events: none;/, 'click-through');
assert.doesNotMatch(backdrop, /backdrop-filter/);
});
test('every outbound first-run link opens without opener or referrer', () => {
const view = fs.readFileSync(
new URL('./ui/views/WelcomeView.vue', import.meta.url),
'utf8',
);
const links = view.match(/<a [^>]*target="_blank"[^>]*>/g) || [];
assert.ok(links.length >= 7, 'the source and Halfpixel chips are outbound');
for (const link of links) {
assert.match(link, /rel="noopener noreferrer"/, link);
}
});
test('the Stories announcement waits behind the welcome card', () => {
const css = fs.readFileSync(
new URL('./ui/styles/first-run.css', import.meta.url),
'utf8',
);
// Hidden, not consumed: the popup keeps its unseen state and appears once
// the card is dismissed.
assert.match(
css,
/body:has\(#first-run-launcher\) #gev-stories #hPop,\s*body\.first-run-opening-stories #gev-stories #hPop \{\s*visibility: hidden;\s*pointer-events: none;\s*\}/,
);
// The selector only works while Stories still renders the popup as #hPop
// inside #gev-stories.
const stories = fs.readFileSync(
new URL('./ui/views/StoriesView.vue', import.meta.url),
'utf8',
);
const root = stories.indexOf('<div id="gev-stories"');
const popup = stories.indexOf('id="hPop"');
assert.ok(root >= 0, 'StoriesView renders #gev-stories');
assert.ok(popup > root, 'StoriesView renders #hPop inside #gev-stories');
});
test('the card closes without a keyboard: the ESC hint is a button, kept on phones', async () => {
const html = await renderApplicationHtml(
fs.readFileSync(new URL('../index.html', import.meta.url), 'utf8'),
);
// The whole stylesheet, so a hide rule added in any other file is caught too.
const css = readStylesheet(new URL('../style.css', import.meta.url));
const footer = html.slice(
html.indexOf('class="first-run-footer"'),
html.indexOf('data-first-run-status'),
const header = html.slice(
html.indexOf('class="first-run-header"'),
html.indexOf('id="first-run-title"'),
);
assert.match(
footer,
header,
/<button type="button" class="first-run-dismiss" data-first-run-dismiss>/,
);
assert.match(footer, />ESC to dismiss</);
assert.match(footer, />DISMISS</);
assert.match(header, />SKIP · ESC</);
assert.match(header, />SKIP</);
// It closes the way ESC does, through the one dismiss path, so the session
// flag and focus handling are the same: firstRunLauncherView.test.mjs.
// Phones used to hide the hint, leaving no way out but picking a mission.
assert.doesNotMatch(css, /first-run-footer > span:last-child/);
assert.doesNotMatch(css, /\.first-run-dismiss\s*\{[^}]*display:\s*none/);
// A 44px touch target that does not add to the footer row's height.
// A 44px touch target that does not add to the header row's height.
assert.match(
css,
/\.first-run-dismiss::before \{[^}]*position: absolute;[^}]*height: 44px;/,
);
assert.doesNotMatch(css, /\.first-run-dismiss \{[^}]*min-height/);
// Touch screens read DISMISS rather than a key they do not have.
// Touch screens read SKIP rather than a key they do not have.
assert.match(
css,
/@media \(hover: none\) and \(pointer: coarse\) \{\s*\.first-run-dismiss-key \{\s*display: none;/,
);
});
test('a short landscape phone keeps the card inside the viewport', () => {
const css = readStylesheet(new URL('../style.css', import.meta.url));
// Above the tab bar, never taller than the space left between it and the top.
assert.match(
css,
/body\.mobile-shell #first-run-launcher \{[^}]*bottom: 5\.8rem;[^}]*max-height: calc\(100dvh - 6\.55rem\);/,
);
});
test('the launcher keeps focus, restores it, and never disables the focused button', () => {
const module = fs.readFileSync(
new URL('./firstRunExperience.js', import.meta.url),
@@ -948,7 +982,8 @@ test('the launcher keeps focus, restores it, and never disables the focused butt
// drops the keyboard to <body> and strands the visitor outside the launcher
// (firstRunLauncherView.test.mjs renders it).
assert.doesNotMatch(module, /\.disabled = /);
// Tab is confined to the launcher, and ESC always releases it.
// Tab cycles inside the launcher once focus is in it, and ESC always
// releases it.
const keyboard = fs.readFileSync(
new URL('./ui/surfaceKeyboard.js', import.meta.url),
'utf8',
+268 -27
View File
@@ -12,6 +12,7 @@ import {
initFirstRunExperience,
} from './firstRunExperience.js';
import { useFirstRunStore } from './ui/stores/firstRun.js';
import { useStoriesStore } from './ui/stores/stories.js';
import WelcomeView from './ui/views/WelcomeView.vue';
function memoryStorage(key, { refuse = false } = {}) {
@@ -31,7 +32,14 @@ function memoryStorage(key, { refuse = false } = {}) {
}
/** The welcome view and an initialized launcher, revealed and painted. */
async function launch(t, { styleManager = {}, refuse = false } = {}) {
async function launch(
t,
{
styleManager = {},
dataManager = { setEnabled: async () => true },
refuse = false,
} = {},
) {
document.body.replaceChildren();
// Where focus was before the launcher opened.
const opener = document.body.appendChild(document.createElement('button'));
@@ -47,7 +55,7 @@ async function launch(t, { styleManager = {}, refuse = false } = {}) {
const sessionStorageRef = memoryStorage(FIRST_RUN_SESSION_KEY);
const launcher = initFirstRunExperience({
styleManager,
dataManager: { setEnabled: async () => true },
dataManager,
documentRef: document,
storage,
sessionStorageRef,
@@ -68,7 +76,31 @@ async function launch(t, { styleManager = {}, refuse = false } = {}) {
Object.defineProperty(list, 'clientHeight', { get: () => box.clientHeight });
for (const frame of frames.splice(0)) frame();
await nextTick();
return { launcher, root, list, box, opener, storage, sessionStorageRef };
return {
launcher,
pinia,
root,
list,
box,
opener,
storage,
sessionStorageRef,
frames,
};
}
async function move(root, frames, selector = '[data-first-run-next]') {
root.querySelector(selector).click();
await settle(frames);
}
async function settle(frames) {
for (let i = 0; i < 4; i++) {
await nextTick();
for (const frame of frames.splice(0)) frame();
await new Promise((resolve) => setTimeout(resolve));
}
await nextTick();
}
test('the card is hidden until initialized, then revealed with its copy', async (t) => {
@@ -81,57 +113,185 @@ test('the card is hidden until initialized, then revealed with its copy', async
assert.equal(hidden.className, '');
app.unmount();
const { root, list } = await launch(t);
const { root, list, frames } = await launch(t);
assert.equal(root.hidden, false);
assert.equal(root.classList.contains('visible'), true);
assert.equal(root.hasAttribute('aria-hidden'), false);
assert.equal(list.dataset.scrollable, 'true');
assert.equal(
root.querySelector('[data-first-run-status]').textContent,
'Tip: the GEV MIC button in the dock lets you talk to the map.',
assert.equal(root.querySelector('[data-first-run-status]').textContent, '');
assert.equal(root.querySelector('[data-first-run-choice]'), null);
assert.ok(
document.activeElement === root.querySelector('[data-first-run-primary]'),
);
await move(root, frames);
assert.deepEqual(
[...root.querySelectorAll('[data-first-run-start]')].map(
(node) => node.dataset.firstRunStart,
),
['space-missions', 'environmental', 'explore'],
);
const environmental = root.querySelector(
'[data-first-run-start="environmental"]',
);
assert.equal(
root.querySelector('[data-first-run-environmental-title]').textContent,
environmental.querySelector('strong').textContent,
'ENVIRONMENTAL',
);
assert.ok(
document.activeElement === root.querySelector('[data-first-run-choice]'),
'the first mission has focus',
assert.match(
environmental.querySelector('small').textContent,
/earthquakes.*fires/i,
);
assert.equal(
root
.querySelector('[data-first-run-start="explore"]')
.getAttribute('aria-pressed'),
'true',
);
assert.ok(
document.activeElement === root.querySelector('[data-first-run-primary]'),
);
});
test('a quick second click on NEXT moves on, and never launches', async (t) => {
let calls = 0;
const { root, frames } = await launch(t, {
dataManager: {
setEnabled: async () => {
calls++;
return true;
},
},
});
const primary = root.querySelector('[data-first-run-primary]');
const press = (detail) => {
primary.dispatchEvent(new PointerEvent('pointerdown', { bubbles: true }));
primary.dispatchEvent(new MouseEvent('click', { bubbles: true, detail }));
};
press(1);
await settle(frames);
assert.ok(root.querySelector('[data-first-run-start]'), 'on the second step');
// The second click of a double click, after the step settled, moves on.
press(2);
await settle(frames);
assert.equal(primary.dataset.firstRunChoice, 'explore', 'on the last step');
press(2);
await settle(frames);
assert.equal(calls, 0);
assert.equal(root.dataset.state ?? null, null, 'a double click never starts');
press(1);
await settle(frames);
assert.ok(root.dataset.state, 'a single click starts');
});
test('a busy mission marks the choices aria-disabled, never disabled', async (t) => {
let finish;
const { root } = await launch(t, {
styleManager: {
setContextMode: () => new Promise((resolve) => (finish = resolve)),
let calls = 0;
const { root, frames } = await launch(t, {
dataManager: {
setEnabled: () => {
calls++;
return new Promise((resolve) => (finish = resolve));
},
},
});
const contacts = root.querySelector('[data-first-run-choice="contacts"]');
contacts.focus();
contacts.click();
await move(root, frames);
root.querySelector('[data-first-run-start="space-missions"]').click();
await nextTick();
const primary = root.querySelector('[data-first-run-next]');
primary.click();
await nextTick();
const enter = root.querySelector('[data-first-run-primary]');
assert.equal(
enter,
primary,
'one persistent button keeps native click counting and focus',
);
assert.equal(enter.dataset.firstRunChoice, 'space-missions');
enter.click();
assert.equal(
calls,
0,
'the new action cannot launch during the step transition',
);
// A press begun during the transition and released after it runs nothing.
enter.dispatchEvent(new PointerEvent('pointerdown', { bubbles: true }));
await settle(frames);
enter.dispatchEvent(new MouseEvent('click', { bubbles: true, detail: 1 }));
assert.equal(calls, 0, 'a press held through the step change never launches');
assert.ok(
document.activeElement === enter,
'the primary action retains focus',
);
assert.deepEqual(enter.getAttribute('aria-describedby').split(' '), [
'first-run-title',
'first-run-description',
]);
const announcement = root.querySelector('.first-run-step-announcement');
assert.equal(announcement.getAttribute('aria-live'), 'polite');
assert.equal(announcement.getAttribute('aria-atomic'), 'true');
assert.equal(
announcement.textContent,
root.querySelector('#first-run-title').textContent,
);
for (const id of enter.getAttribute('aria-describedby').split(' ')) {
assert.ok(root.querySelector(`#${id}`).textContent.trim());
}
enter.dispatchEvent(new MouseEvent('click', { bubbles: true, detail: 2 }));
assert.equal(calls, 0, 'a second click from Next never confirms a mission');
const repeated = new KeyboardEvent('keydown', {
key: 'Enter',
repeat: true,
bubbles: true,
cancelable: true,
});
enter.dispatchEvent(repeated);
assert.equal(repeated.defaultPrevented, true);
// A fresh keyboard/assistive click has detail 0 and remains supported.
enter.click();
assert.equal(calls, 1);
await nextTick();
assert.equal(root.dataset.state, 'loading');
assert.equal(root.getAttribute('aria-busy'), 'true');
for (const button of root.querySelectorAll('[data-first-run-choice]')) {
assert.equal(button.getAttribute('aria-disabled'), 'true');
assert.equal(button.disabled, false);
}
assert.ok(document.activeElement === contacts, 'focus stays on the choice');
assert.equal(enter.getAttribute('aria-disabled'), 'true');
assert.equal(enter.disabled, false);
assert.ok(document.activeElement === enter, 'focus stays on the action');
assert.equal(
root.querySelector('[data-first-run-status]').textContent,
'Starting live contacts…',
'Opening space missions…',
);
root.querySelector('.first-run-back').click();
await nextTick();
assert.equal(
root.querySelector('[data-first-run-next]'),
null,
'Back is inert while busy',
);
enter.click();
assert.equal(calls, 1, 'a busy action cannot start a second request');
// A failed mission says so and stays on the card.
finish({ ok: false });
finish(false);
await new Promise((resolve) => setTimeout(resolve));
await nextTick();
assert.equal(root.dataset.state, 'ready');
assert.equal(contacts.getAttribute('aria-disabled'), 'false');
assert.equal(enter.getAttribute('aria-disabled'), 'false');
assert.match(
root.querySelector('[data-first-run-status]').textContent,
/^Could not open that mission/,
);
await move(root, frames, '.first-run-back');
assert.equal(
root
.querySelector('[data-first-run-start="space-missions"]')
.getAttribute('aria-pressed'),
'true',
);
root.querySelector('.first-run-back').focus();
await move(root, frames, '.first-run-back');
assert.equal(root.querySelector('.first-run-back'), null);
assert.ok(
document.activeElement === root.querySelector('[data-first-run-primary]'),
'focus moves when Back is removed',
);
});
test('a refused write takes the tick back and says why', async (t) => {
@@ -156,25 +316,106 @@ test('a saved tick stays ticked', async (t) => {
assert.equal(storage.read(), 'suppressed');
});
test('the DISMISS button closes the card the way ESC does', async (t) => {
test('the SKIP button closes the card the way ESC does', async (t) => {
const { root, sessionStorageRef } = await launch(t);
root.querySelector('[data-first-run-dismiss]').click();
await nextTick();
assert.equal(root.classList.contains('visible'), false);
assert.equal(root.getAttribute('aria-hidden'), 'true');
assert.notEqual(sessionStorageRef.read(), null, 'dismissed for the session');
root
.querySelector('.first-run-step')
.dispatchEvent(new Event('transitionend', { bubbles: true }));
await nextTick();
assert.equal(
document.getElementById('first-run-launcher'),
root,
'child transitions do not finish dismissal',
);
root.dispatchEvent(new Event('transitionend'));
await nextTick();
assert.equal(document.getElementById('first-run-launcher') === null, true);
});
test('BROWSE STORIES closes the card and opens Stories in place', async (t) => {
const { root, pinia, frames, sessionStorageRef } = await launch(t);
const stories = useStoriesStore(pinia);
let opened = 0;
let finishLoading;
stories.connect({
open: () => {
opened++;
return new Promise((resolve) => (finishLoading = resolve));
},
});
await move(root, frames);
await move(root, frames);
const button = root.querySelector('[data-first-run-stories]');
assert.ok(button, 'the Stories card offers its button on the last step');
assert.equal(button.tagName, 'BUTTON', 'opens in the app, not a new tab');
assert.equal(button.hasAttribute('href'), false);
button.click();
await nextTick();
assert.equal(opened, 1, 'Stories opened once');
assert.equal(root.classList.contains('visible'), false, 'the card closed');
assert.notEqual(sessionStorageRef.read(), null, 'dismissed for the session');
assert.equal(
document.body.classList.contains('first-run-opening-stories'),
true,
'the Stories announcement stays hidden while Stories loads',
);
finishLoading();
await new Promise((resolve) => setTimeout(resolve));
assert.equal(
document.body.classList.contains('first-run-opening-stories'),
false,
'and may show again once Stories has opened (or failed to)',
);
button.dispatchEvent(new MouseEvent('click', { detail: 1 }));
await nextTick();
assert.equal(opened, 1, 'a closing card cannot open Stories again');
});
test('BROWSE STORIES keeps the welcome up when Stories refuses to open', async (t) => {
const { root, pinia, frames, sessionStorageRef } = await launch(t);
const stories = useStoriesStore(pinia);
stories.connect({ open: () => false });
await move(root, frames);
await move(root, frames);
root.querySelector('[data-first-run-stories]').click();
await nextTick();
assert.equal(root.classList.contains('visible'), true, 'the card stays');
assert.equal(sessionStorageRef.read(), null, 'not dismissed');
assert.equal(
document.body.classList.contains('first-run-opening-stories'),
false,
);
});
test('the Stories card is left out where Stories is not offered', async (t) => {
const { root, pinia, frames } = await launch(t);
const stories = useStoriesStore(pinia);
stories.available = false;
await move(root, frames);
await move(root, frames);
assert.equal(root.querySelector('.first-run-stories'), null);
assert.equal(root.querySelector('[data-first-run-stories]'), null);
});
test('the scroll fade clears when the tiles fit after a resize', async (t) => {
const { list, box } = await launch(t);
const { root, list, box, frames } = await launch(t);
assert.equal(list.dataset.scrollable, 'true');
box.scrollHeight = 200;
window.dispatchEvent(new Event('resize'));
await nextTick();
assert.equal(list.dataset.scrollable, 'false');
box.scrollHeight = 400;
await move(root, frames);
assert.equal(
list.dataset.scrollable,
'true',
'new step refreshes overflow without a resize',
);
});
test('ESC closes the card, returns focus, and removes it without a transition', async (t) => {
+34 -7
View File
@@ -159,8 +159,6 @@
"REFRESHING LIVE DATA": "جارٍ تحديث البيانات المباشرة",
"Close data attribution": "إغلاق إسناد البيانات",
"MISSION CONTROL · FIRST LAUNCH": "مركز التحكم · أول تشغيل",
"Choose your first view": "اختر عرضك الأول",
"LIVE CONTACTS": "تتبّع الأهداف المباشر",
"Don't show this again": "لا تعرض هذا مرة أخرى",
"POWER UP": "تشغيل",
"GROUND STATION · PROVIDER SETTINGS": "المحطة الأرضية · إعدادات المزوّدين",
@@ -168,13 +166,10 @@
"SAVE KEYS": "حفظ المفاتيح",
"Saving…": "جارٍ الحفظ…",
"It feels like a forbidden cockpit—then you realize the sources are public and the data is real.": "يبدو الأمر كقمرة قيادة محظورة — ثم تدرك أن المصادر عامة والبيانات حقيقية.",
"Aircraft, vessels and nearby intelligence": "طائرات وسفن ومعلومات استخباراتية قريبة",
"SPACE MISSIONS": "المهام الفضائية",
"Launches, spacecraft and orbital context": "عمليات إطلاق ومركبات فضائية وسياق مداري",
"EXPLORE MANUALLY": "استكشاف يدوي",
"Begin with a clean globe": "ابدأ بكرة أرضية نظيفة",
"ESC to dismiss": "اضغط ESC للإغلاق",
"Tip: the GEV MIC button in the dock lets you talk to the map.": "نصيحة: يتيح لك زر GEV MIC في الشريط السفلي التحدث إلى الخريطة.",
"Close key setup": "إغلاق إعداد المفاتيح",
"The globe already flies keyless. Every key below switches on another real feed — paste one and it's saved into this app's local configuration, then the server restarts itself. Server-side keys stay on this machine; Google Maps and Cesium ion run in the browser and must be provider-restricted. Keys you configured elsewhere are shown but never touched.": "تعمل الكرة الأرضية بلا مفاتيح أصلًا. كل مفتاح أدناه يفعّل مصدرًا حقيقيًا إضافيًا: الصق مفتاحًا فيُحفظ في إعدادات هذا التطبيق المحلية، ثم يعيد الخادم تشغيل نفسه. تبقى مفاتيح الخادم على هذا الجهاز، أما Google Maps وCesium ion فتعملان في المتصفح ويجب تقييدهما بحسب المزوّد. المفاتيح التي أعددتها في مكان آخر تظهر دون أن تُمَسّ.",
"ESC to close": "اضغط ESC للإغلاق",
@@ -186,7 +181,6 @@
"IMPORT": "استيراد",
"RUN LOG": "سجل التشغيل",
"Ready": "جاهز",
"Starting live contacts…": "جارٍ بدء تتبّع الأهداف المباشر…",
"Opening space missions…": "جارٍ فتح المهام الفضائية…",
"Scanning active events…": "جارٍ مسح الأحداث النشطة…",
"Working…": "جارٍ العمل…",
@@ -4698,5 +4692,38 @@
"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": "يبدو خاصًا، لذا لا يُبحث عنه ولا يُرسل"
"Looks private, so nothing is searched or sent": "يبدو خاصًا، لذا لا يُبحث عنه ولا يُرسل",
"Bilawal on YouTube": "بلاول على YouTube",
"BROWSE STORIES": "تصفح القصص",
"ENTER GOD MODE": "ادخل وضع الإله",
"Go deeper": "تعمّق أكثر",
"The studio behind GEV": "الاستوديو الذي يقف خلف GEV",
"Visual presets": "الأنماط البصرية",
"Open source. Self-host, fork, add a layer.": "مفتوح المصدر. استضفه بنفسك، أنشئ نسخة، أضف طبقة.",
"Choose your mode": "اختر الوضع",
"The spy-satellite keyhole: circular viewport, tactical HUD, cinematic camera. For exploring.": "منظار القمر الصناعي التجسسي: عرض دائري، واجهة تكتيكية، كاميرا سينمائية. للاستكشاف.",
"Welcome to God's Eye View": "مرحبًا بك في God's Eye View",
"A cleaner, readable view where every value shows its source. For research and reporting.": "عرض أنظف وأسهل قراءة يُظهر فيه كل رقم مصدره. للبحث وإعداد التقارير.",
"Keyhole HUD": "واجهة المنظار",
"Analyst": "المحلل",
"God": "الإله",
"COMING SOON": "قريبًا",
"More from Halfpixel": "المزيد من Halfpixel",
"Start with": "ابدأ بـ",
"FUN": "ممتع",
"Where do you want to start?": "من أين تريد أن تبدأ؟",
"Three things to know": "ثلاثة أمور يجب معرفتها",
"Pick one to begin with. You can change everything later.": "اختر واحدة لتبدأ بها. يمكنك تغيير كل شيء لاحقًا.",
"That is all you need to get going.": "هذا كل ما تحتاج إليه للبدء.",
"SKIP · ESC": "تخطّي · ESC",
"SKIP": "تخطّي",
"Search places": "البحث عن أماكن",
"Type a place into the search bar.": "اكتب اسم مكان في شريط البحث.",
"Turn on layers": "تشغيل الطبقات",
"Turn layers on to see flights, ships, cameras, weather and more.": "شغّل الطبقات لرؤية الرحلات الجوية والسفن والكاميرات والطقس والمزيد.",
"Click anything": "انقر على أي عنصر",
"Select a map item to see its details.": "اختر عنصرًا على الخريطة لرؤية تفاصيله.",
"Bilawal on {site}": "بلال على {site}",
"Bilawal's website": "موقع بلال الإلكتروني",
"BACK": "رجوع"
}
+34 -7
View File
@@ -155,7 +155,6 @@
"ENVIRONMENTAL": "UMWELT",
"EARTH WATCH": "ERDBEOBACHTUNG",
"ACTIVE EVENTS": "AKTIVE EREIGNISSE",
"Starting live contacts…": "Live-Kontakte werden gestartet…",
"Opening space missions…": "Raummissionen werden geöffnet…",
"Scanning active events…": "Aktive Ereignisse werden gescannt…",
"Live earthquakes and active fires, from USGS and NASA": "Live-Erdbeben und aktive Brände, von USGS und NASA",
@@ -1037,15 +1036,10 @@
"Copy share link": "Link zum Teilen kopieren",
"Reset camera and return to full globe view": "Kamera zurücksetzen und zur Vollglobus-Ansicht zurückkehren",
"MISSION CONTROL · FIRST LAUNCH": "MISSION CONTROL · ERSTER START",
"Choose your first view": "Erste Ansicht wählen",
"LIVE CONTACTS": "LIVE-KONTAKTE",
"Aircraft, vessels and nearby intelligence": "Flugzeuge, Schiffe und Lagebild der Umgebung",
"Launches, spacecraft and orbital context": "Starts, Raumfahrzeuge und Orbit-Kontext",
"EXPLORE MANUALLY": "MANUELL ERKUNDEN",
"Begin with a clean globe": "Mit einem leeren Globus beginnen",
"Don't show this again": "Nicht mehr anzeigen",
"ESC to dismiss": "ESC zum Schließen",
"Tip: the GEV MIC button in the dock lets you talk to the map.": "Tipp: Mit der Mikrofontaste im Dock lässt sich die Karte per Sprache steuern.",
"Pick a shape, then click the map.": "Form wählen, dann auf die Karte klicken.",
"Enter to place the pin, Esc to cancel.": "Enter setzt den Pin, Esc bricht ab.",
"Click where the pin goes.": "Auf die Stelle für den Pin klicken.",
@@ -4274,5 +4268,38 @@
"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"
"Looks private, so nothing is searched or sent": "Sieht privat aus, daher wird nichts gesucht oder gesendet",
"Bilawal on YouTube": "Bilawal auf YouTube",
"BROWSE STORIES": "STORIES ANSEHEN",
"ENTER GOD MODE": "GOTT-MODUS STARTEN",
"Go deeper": "Mehr entdecken",
"The studio behind GEV": "Das Studio hinter GEV",
"Visual presets": "Visuelle Presets",
"Open source. Self-host, fork, add a layer.": "Open Source. Selbst hosten, forken, eine Ebene hinzufügen.",
"Choose your mode": "Modus wählen",
"The spy-satellite keyhole: circular viewport, tactical HUD, cinematic camera. For exploring.": "Das Spionagesatelliten-Schlüsselloch: runder Bildausschnitt, taktisches HUD, filmische Kamera. Zum Erkunden.",
"Welcome to God's Eye View": "Willkommen bei God's Eye View",
"A cleaner, readable view where every value shows its source. For research and reporting.": "Eine klarere, gut lesbare Ansicht, in der jeder Wert seine Quelle zeigt. Für Recherche und Berichte.",
"Keyhole HUD": "Schlüsselloch-HUD",
"Analyst": "Analyse",
"God": "Gott",
"COMING SOON": "DEMNÄCHST",
"More from Halfpixel": "Mehr von Halfpixel",
"Start with": "Starten mit",
"FUN": "SPASS",
"Where do you want to start?": "Wo möchtest du anfangen?",
"Three things to know": "Drei Dinge, die du wissen solltest",
"Pick one to begin with. You can change everything later.": "Wähle zum Einstieg eine Option. Du kannst später alles ändern.",
"That is all you need to get going.": "Das ist alles, was du für den Einstieg brauchst.",
"SKIP · ESC": "ÜBERSPRINGEN · ESC",
"SKIP": "ÜBERSPRINGEN",
"Search places": "Orte suchen",
"Type a place into the search bar.": "Gib einen Ort in die Suchleiste ein.",
"Turn on layers": "Ebenen einschalten",
"Turn layers on to see flights, ships, cameras, weather and more.": "Schalte Ebenen ein, um Flüge, Schiffe, Kameras, Wetter und mehr zu sehen.",
"Click anything": "Klicke auf ein Element",
"Select a map item to see its details.": "Wähle ein Kartenelement aus, um seine Details zu sehen.",
"Bilawal on {site}": "Bilawal auf {site}",
"Bilawal's website": "Bilawals Website",
"BACK": "ZURÜCK"
}
+34 -7
View File
@@ -926,8 +926,6 @@
"sightings filter|CONFIRMED": "CONFIRMADOS",
"PAD / RTLS": "PLATAFORMA / RTLS",
"MISSION CONTROL · FIRST LAUNCH": "CENTRO DE MANDO · PRIMER INICIO",
"Choose your first view": "Elige tu primera vista",
"LIVE CONTACTS": "CONTACTOS EN VIVO",
"Don't show this again": "No volver a mostrar",
"POWER UP": "ENCENDER",
"GROUND STATION · PROVIDER SETTINGS": "ESTACIÓN TERRENA · AJUSTES DE PROVEEDORES",
@@ -935,12 +933,9 @@
"SAVE KEYS": "GUARDAR CLAVES",
"Saving…": "Guardando…",
"It feels like a forbidden cockpit—then you realize the sources are public and the data is real.": "Parece una cabina prohibida—hasta que descubres que las fuentes son públicas y los datos son reales.",
"Aircraft, vessels and nearby intelligence": "Aeronaves, buques e inteligencia cercana",
"Launches, spacecraft and orbital context": "Lanzamientos, naves y contexto orbital",
"EXPLORE MANUALLY": "EXPLORAR MANUALMENTE",
"Begin with a clean globe": "Empieza con un globo limpio",
"ESC to dismiss": "ESC para cerrar",
"Tip: the GEV MIC button in the dock lets you talk to the map.": "Consejo: el botón GEV MIC del dock te permite hablar con el mapa.",
"Close key setup": "Cerrar la configuración de claves",
"The globe already flies keyless. Every key below switches on another real feed — paste one and it's saved into this app's local configuration, then the server restarts itself. Server-side keys stay on this machine; Google Maps and Cesium ion run in the browser and must be provider-restricted. Keys you configured elsewhere are shown but never touched.": "El globo ya funciona sin claves. Cada clave de abajo activa otra fuente real — pega una y queda guardada en la configuración local de esta app, y luego el servidor se reinicia solo. Las claves del servidor se quedan en esta máquina; Google Maps y Cesium ion funcionan en el navegador y sus claves deben restringirse en la consola del proveedor. Las claves que configuraste en otro lugar se muestran, pero nunca se modifican.",
"ESC to close": "ESC para cerrar",
@@ -949,7 +944,6 @@
"UPDATE SHOT": "ACTUALIZAR PLANO",
"IMPORT": "IMPORTAR",
"RUN LOG": "REGISTRO DE EJECUCIÓN",
"Starting live contacts…": "Iniciando contactos en vivo…",
"Opening space missions…": "Abriendo misiones espaciales…",
"Scanning active events…": "Escaneando eventos activos…",
"Working…": "Trabajando…",
@@ -4380,5 +4374,38 @@
"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"
"Looks private, so nothing is searched or sent": "Parece privado, así que no se busca ni se envía nada",
"Bilawal on YouTube": "Bilawal en YouTube",
"BROWSE STORIES": "VER STORIES",
"ENTER GOD MODE": "ENTRAR EN MODO DIOS",
"Go deeper": "Ir más allá",
"The studio behind GEV": "El estudio detrás de GEV",
"Visual presets": "Preajustes visuales",
"Open source. Self-host, fork, add a layer.": "Código abierto. Alójalo tú mismo, haz un fork, añade una capa.",
"Choose your mode": "Elige tu modo",
"The spy-satellite keyhole: circular viewport, tactical HUD, cinematic camera. For exploring.": "La mirilla del satélite espía: visor circular, HUD táctico, cámara cinematográfica. Para explorar.",
"Welcome to God's Eye View": "Bienvenido a God's Eye View",
"A cleaner, readable view where every value shows its source. For research and reporting.": "Una vista más limpia y legible en la que cada valor muestra su fuente. Para investigar e informar.",
"Keyhole HUD": "HUD de mirilla",
"Analyst": "Analista",
"God": "Dios",
"COMING SOON": "PRÓXIMAMENTE",
"More from Halfpixel": "Más de Halfpixel",
"Start with": "Empezar con",
"FUN": "DIVERSIÓN",
"Where do you want to start?": "¿Por dónde quieres empezar?",
"Three things to know": "Tres cosas que debes saber",
"Pick one to begin with. You can change everything later.": "Elige una opción para empezar. Puedes cambiarlo todo después.",
"That is all you need to get going.": "Eso es todo lo que necesitas para empezar.",
"SKIP · ESC": "OMITIR · ESC",
"SKIP": "OMITIR",
"Search places": "Buscar lugares",
"Type a place into the search bar.": "Escribe un lugar en la barra de búsqueda.",
"Turn on layers": "Activar capas",
"Turn layers on to see flights, ships, cameras, weather and more.": "Activa capas para ver vuelos, barcos, cámaras, tiempo y más.",
"Click anything": "Haz clic en cualquier elemento",
"Select a map item to see its details.": "Selecciona un elemento del mapa para ver sus detalles.",
"Bilawal on {site}": "Bilawal en {site}",
"Bilawal's website": "Sitio web de Bilawal",
"BACK": "ATRÁS"
}
+34 -7
View File
@@ -406,7 +406,6 @@
"ENVIRONMENTAL": "ENVIRONNEMENT",
"EARTH WATCH": "VEILLE TERRE",
"ACTIVE EVENTS": "ÉVÉNEMENTS ACTIFS",
"Starting live contacts…": "Démarrage des contacts en direct…",
"Opening space missions…": "Ouverture des missions spatiales…",
"Scanning active events…": "Analyse des événements actifs…",
"Live earthquakes and active fires, from USGS and NASA": "Séismes et feux actifs en direct, via USGS et NASA",
@@ -3170,15 +3169,10 @@
"Reset map bearing to north": "Réinitialiser l'orientation de la carte vers le nord",
"Reset camera and return to full globe view": "Réinitialiser la caméra et revenir à la vue du globe entier",
"MISSION CONTROL · FIRST LAUNCH": "CENTRE DE CONTRÔLE · PREMIER LANCEMENT",
"Choose your first view": "Choisissez votre première vue",
"LIVE CONTACTS": "CONTACTS EN DIRECT",
"Aircraft, vessels and nearby intelligence": "Avions, navires et renseignements à proximité",
"Launches, spacecraft and orbital context": "Lancements, vaisseaux et contexte orbital",
"EXPLORE MANUALLY": "EXPLORER MANUELLEMENT",
"Begin with a clean globe": "Commencer avec un globe vierge",
"Don't show this again": "Ne plus afficher",
"ESC to dismiss": "ESC pour fermer",
"Tip: the GEV MIC button in the dock lets you talk to the map.": "Astuce : le bouton GEV MIC du dock permet de parler à la carte.",
"Malformed cyclone snapshot": "Instantané cyclonique mal formé",
"Cyclone request timed out": "Délai dépassé pour la requête cyclonique",
"{lower} to {upper}": "De {lower} à {upper}",
@@ -4380,5 +4374,38 @@
"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é"
"Looks private, so nothing is searched or sent": "Semble privé, donc rien n’est recherché ni envoyé",
"Bilawal on YouTube": "Bilawal sur YouTube",
"BROWSE STORIES": "PARCOURIR LES STORIES",
"ENTER GOD MODE": "ENTRER EN MODE DIEU",
"Go deeper": "Aller plus loin",
"The studio behind GEV": "Le studio derrière GEV",
"Visual presets": "Préréglages visuels",
"Open source. Self-host, fork, add a layer.": "Open source. Hébergez-le, forkez-le, ajoutez une couche.",
"Choose your mode": "Choisissez votre mode",
"The spy-satellite keyhole: circular viewport, tactical HUD, cinematic camera. For exploring.": "Le viseur du satellite espion : vue circulaire, HUD tactique, caméra cinématographique. Pour explorer.",
"Welcome to God's Eye View": "Bienvenue dans God's Eye View",
"A cleaner, readable view where every value shows its source. For research and reporting.": "Une vue plus épurée et lisible où chaque valeur indique sa source. Pour la recherche et le reportage.",
"Keyhole HUD": "HUD viseur",
"Analyst": "Analyste",
"God": "Dieu",
"COMING SOON": "BIENTÔT",
"More from Halfpixel": "Plus de Halfpixel",
"Start with": "Commencer par",
"FUN": "LOISIR",
"Where do you want to start?": "Par où voulez-vous commencer ?",
"Three things to know": "Trois choses à savoir",
"Pick one to begin with. You can change everything later.": "Choisissez une option pour commencer. Vous pourrez tout modifier ensuite.",
"That is all you need to get going.": "C’est tout ce qu’il vous faut pour commencer.",
"SKIP · ESC": "PASSER · ESC",
"SKIP": "PASSER",
"Search places": "Rechercher des lieux",
"Type a place into the search bar.": "Saisissez un lieu dans la barre de recherche.",
"Turn on layers": "Activer des couches",
"Turn layers on to see flights, ships, cameras, weather and more.": "Activez des couches pour voir les vols, les navires, les caméras, la météo et plus encore.",
"Click anything": "Cliquez sur un élément",
"Select a map item to see its details.": "Sélectionnez un élément de la carte pour voir ses détails.",
"Bilawal on {site}": "Bilawal sur {site}",
"Bilawal's website": "Site web de Bilawal",
"BACK": "RETOUR"
}
+34 -7
View File
@@ -299,8 +299,6 @@
"ENVIRONMENTAL": "סביבתי",
"EARTH WATCH": "EARTH WATCH",
"ACTIVE EVENTS": "אירועים פעילים",
"Tip: the GEV MIC button in the dock lets you talk to the map.": "טיפ: לחצן ה-MIC של GEV בעגינה מאפשר לדבר עם המפה.",
"Starting live contacts…": "מתחיל מגעים חיים…",
"Opening space missions…": "פותח משימות חלל…",
"Scanning active events…": "סורק אירועים פעילים…",
"Live earthquakes and active fires, from USGS and NASA": "רעידות אדמה חיות ושריפות פעילות, מ-USGS ו-NASA",
@@ -2397,14 +2395,10 @@
"Shot name": "שם השוט",
"DEL": "מחיקה",
"MISSION CONTROL · FIRST LAUNCH": "חדר בקרה · שיגור ראשון",
"Choose your first view": "בחירת התצוגה הראשונה",
"LIVE CONTACTS": "מגעים חיים",
"Aircraft, vessels and nearby intelligence": "מטוסים, אוניות ומודיעין סמוך",
"Launches, spacecraft and orbital context": "שיגורים, חלליות והקשר המסלולי",
"EXPLORE MANUALLY": "חקירה ידנית",
"Begin with a clean globe": "התחלה מגלובוס נקי",
"Don't show this again": "אל תציג זאת שוב",
"ESC to dismiss": "Esc להסתרה",
"DISMISS": "הסתרה",
"CONTACTS CONTEXT OFF": "הקשר המגעים כבוי",
"SELECT CONTACTS TO LOAD OBSERVED / MAPPED PROXIMITY": "בחר מגעים לטעינת קרבה נצפית / ממופה",
@@ -4380,5 +4374,38 @@
"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": "נראה פרטי, ולכן שום דבר לא מחופש או נשלח"
"Looks private, so nothing is searched or sent": "נראה פרטי, ולכן שום דבר לא מחופש או נשלח",
"Where do you want to start?": "מאיפה תרצו להתחיל?",
"Three things to know": "שלושה דברים שכדאי לדעת",
"Pick one to begin with. You can change everything later.": "בחרו אפשרות אחת להתחלה. אפשר לשנות הכול בהמשך.",
"That is all you need to get going.": "זה כל מה שצריך כדי להתחיל.",
"SKIP · ESC": "דילוג · ESC",
"SKIP": "דילוג",
"Search places": "חיפוש מקומות",
"Type a place into the search bar.": "הקלידו מקום בשורת החיפוש.",
"Turn on layers": "הפעלת שכבות",
"Turn layers on to see flights, ships, cameras, weather and more.": "הפעילו שכבות כדי לראות טיסות, ספינות, מצלמות, מזג אוויר ועוד.",
"Click anything": "לחצו על פריט כלשהו",
"Select a map item to see its details.": "בחרו פריט במפה כדי לראות את פרטיו.",
"Bilawal on {site}": "בילוואל ב־{site}",
"Bilawal's website": "האתר של בילוואל",
"BACK": "חזרה",
"Welcome to God's Eye View": "ברוכים הבאים ל־God's Eye View",
"Choose your mode": "בחרו מצב",
"God": "אלוהים",
"FUN": "בשביל הכיף",
"The spy-satellite keyhole: circular viewport, tactical HUD, cinematic camera. For exploring.": "מבט דרך לוויין ריגול: תצוגה עגולה, תצוגה עילית טקטית ומצלמה קולנועית. לחקירה וגילוי.",
"Keyhole HUD": "תצוגה עילית עגולה",
"Visual presets": "הגדרות תצוגה מוכנות",
"Analyst": "אנליסט",
"COMING SOON": "בקרוב",
"A cleaner, readable view where every value shows its source. For research and reporting.": "תצוגה נקייה וקריאה יותר, שבה כל ערך מציג את מקורו. למחקר ולדיווח.",
"Start with": "התחילו עם",
"Go deeper": "להעמיק",
"BROWSE STORIES": "עיון בסיפורים",
"More from Halfpixel": "עוד מ־Halfpixel",
"Bilawal on YouTube": "בילוואל ב־YouTube",
"The studio behind GEV": "הסטודיו שמאחורי GEV",
"Open source. Self-host, fork, add a layer.": "קוד פתוח. אירוח עצמאי, יצירת עותק והוספת שכבה.",
"ENTER GOD MODE": "כניסה למצב אלוהים"
}
+34 -7
View File
@@ -406,7 +406,6 @@
"ENVIRONMENTAL": "AMBIENTE",
"EARTH WATCH": "OSSERVATORIO TERRA",
"ACTIVE EVENTS": "EVENTI ATTIVI",
"Starting live contacts…": "Avvio dei contatti live…",
"Opening space missions…": "Apertura delle missioni spaziali…",
"Scanning active events…": "Scansione degli eventi attivi…",
"Live earthquakes and active fires, from USGS and NASA": "Terremoti e incendi attivi in tempo reale, da USGS e NASA",
@@ -3170,15 +3169,10 @@
"Reset map bearing to north": "Riporta l'orientamento della mappa a nord",
"Reset camera and return to full globe view": "Ripristina la camera e torna alla vista del globo intero",
"MISSION CONTROL · FIRST LAUNCH": "CONTROLLO MISSIONE · PRIMO AVVIO",
"Choose your first view": "Scegli la tua prima vista",
"LIVE CONTACTS": "CONTATTI LIVE",
"Aircraft, vessels and nearby intelligence": "Aerei, navi e intelligence nelle vicinanze",
"Launches, spacecraft and orbital context": "Lanci, veicoli spaziali e contesto orbitale",
"EXPLORE MANUALLY": "ESPLORA MANUALMENTE",
"Begin with a clean globe": "Inizia con un globo pulito",
"Don't show this again": "Non mostrare più",
"ESC to dismiss": "ESC per chiudere",
"Tip: the GEV MIC button in the dock lets you talk to the map.": "Suggerimento: il pulsante GEV MIC nel dock ti permette di parlare con la mappa.",
"Malformed cyclone snapshot": "Snapshot dei cicloni non valido",
"Cyclone request timed out": "La richiesta dei cicloni è andata in timeout",
"{lower} to {upper}": "Da {lower} a {upper}",
@@ -4380,5 +4374,38 @@
"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"
"Looks private, so nothing is searched or sent": "Sembra privato, quindi non viene cercato né inviato nulla",
"Bilawal on YouTube": "Bilawal su YouTube",
"BROWSE STORIES": "SFOGLIA LE STORIES",
"ENTER GOD MODE": "ENTRA IN MODALITÀ DIO",
"Go deeper": "Approfondisci",
"The studio behind GEV": "Lo studio dietro GEV",
"Visual presets": "Preset visivi",
"Open source. Self-host, fork, add a layer.": "Open source. Ospitalo tu, fai un fork, aggiungi un livello.",
"Choose your mode": "Scegli la modalità",
"The spy-satellite keyhole: circular viewport, tactical HUD, cinematic camera. For exploring.": "Il mirino del satellite spia: vista circolare, HUD tattico, camera cinematografica. Per esplorare.",
"Welcome to God's Eye View": "Benvenuto in God's Eye View",
"A cleaner, readable view where every value shows its source. For research and reporting.": "Una vista più pulita e leggibile in cui ogni valore mostra la sua fonte. Per ricerca e reportage.",
"Keyhole HUD": "HUD a mirino",
"Analyst": "Analista",
"God": "Dio",
"COMING SOON": "IN ARRIVO",
"More from Halfpixel": "Altro da Halfpixel",
"Start with": "Inizia con",
"FUN": "SVAGO",
"Where do you want to start?": "Da dove vuoi iniziare?",
"Three things to know": "Tre cose da sapere",
"Pick one to begin with. You can change everything later.": "Scegli un’opzione per iniziare. Potrai cambiare tutto in seguito.",
"That is all you need to get going.": "È tutto ciò che serve per iniziare.",
"SKIP · ESC": "SALTA · ESC",
"SKIP": "SALTA",
"Search places": "Cerca luoghi",
"Type a place into the search bar.": "Digita un luogo nella barra di ricerca.",
"Turn on layers": "Attiva i livelli",
"Turn layers on to see flights, ships, cameras, weather and more.": "Attiva i livelli per vedere voli, navi, telecamere, meteo e altro.",
"Click anything": "Fai clic su un elemento",
"Select a map item to see its details.": "Seleziona un elemento della mappa per vederne i dettagli.",
"Bilawal on {site}": "Bilawal su {site}",
"Bilawal's website": "Sito web di Bilawal",
"BACK": "INDIETRO"
}
+34 -7
View File
@@ -386,7 +386,6 @@
"ENVIRONMENTAL": "環境",
"EARTH WATCH": "地球監視",
"ACTIVE EVENTS": "発生中のイベント",
"Starting live contacts…": "ライブコンタクトを開始中…",
"Opening space missions…": "宇宙ミッションを開いています…",
"Scanning active events…": "発生中のイベントをスキャン中…",
"Live earthquakes and active fires, from USGS and NASA": "USGSとNASAによる地震と火災のライブ情報",
@@ -3006,15 +3005,10 @@
"Reset map bearing to north": "地図の方位を北にリセット",
"Reset camera and return to full globe view": "カメラをリセットして地球全体ビューに戻す",
"MISSION CONTROL · FIRST LAUNCH": "ミッションコントロール · 初回起動",
"Choose your first view": "最初のビューを選択",
"LIVE CONTACTS": "ライブコンタクト",
"Aircraft, vessels and nearby intelligence": "航空機、船舶、周辺のインテリジェンス",
"Launches, spacecraft and orbital context": "打ち上げ、宇宙機、軌道の状況",
"EXPLORE MANUALLY": "手動で探索",
"Begin with a clean globe": "まっさらな地球儀から始める",
"Don't show this again": "今後表示しない",
"ESC to dismiss": "Escで閉じる",
"Tip: the GEV MIC button in the dock lets you talk to the map.": "ヒント:ドックの[マイク]ボタンで地図に話しかけられます。",
"routing busy — too many routes at once": "ルート検索サービスが混雑しています。同時に要求されたルートが多すぎます",
"route proxy error": "ルート検索プロキシでエラーが発生しました",
"Malformed cyclone snapshot": "サイクロンのスナップショットの形式が不正です",
@@ -4168,5 +4162,38 @@
"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": "個人情報の可能性があるため、検索も送信もしません"
"Looks private, so nothing is searched or sent": "個人情報の可能性があるため、検索も送信もしません",
"Bilawal on YouTube": "YouTube の Bilawal",
"BROWSE STORIES": "STORIES を見る",
"ENTER GOD MODE": "ゴッドモードで開始",
"Go deeper": "さらに詳しく",
"The studio behind GEV": "GEV を手がけるスタジオ",
"Visual presets": "ビジュアルプリセット",
"Open source. Self-host, fork, add a layer.": "オープンソース。セルフホスト、フォーク、レイヤーの追加が可能。",
"Choose your mode": "モードを選択",
"The spy-satellite keyhole: circular viewport, tactical HUD, cinematic camera. For exploring.": "偵察衛星の鍵穴ビュー:円形の視野、タクティカル HUD、映画のようなカメラ。探索向け。",
"Welcome to God's Eye View": "God's Eye View へようこそ",
"A cleaner, readable view where every value shows its source. For research and reporting.": "すべての値に出典が表示される、すっきり読みやすいビュー。調査やレポート向け。",
"Keyhole HUD": "鍵穴 HUD",
"Analyst": "アナリスト",
"God": "ゴッド",
"COMING SOON": "近日公開",
"More from Halfpixel": "Halfpixel のその他のコンテンツ",
"Start with": "ここから始める",
"FUN": "エンタメ",
"Where do you want to start?": "どこから始めますか?",
"Three things to know": "知っておきたい3つのこと",
"Pick one to begin with. You can change everything later.": "まずは1つ選んでください。後からすべて変更できます。",
"That is all you need to get going.": "これで始める準備は完了です。",
"SKIP · ESC": "スキップ · ESC",
"SKIP": "スキップ",
"Search places": "場所を検索",
"Type a place into the search bar.": "検索バーに場所を入力して探せます。",
"Turn on layers": "レイヤーを有効にする",
"Turn layers on to see flights, ships, cameras, weather and more.": "レイヤーを有効にすると、航空機、船舶、カメラ、天気などを表示できます。",
"Click anything": "項目をクリック",
"Select a map item to see its details.": "地図上の項目を選択すると詳細が表示されます。",
"Bilawal on {site}": "{site}のBilawal",
"Bilawal's website": "Bilawalのウェブサイト",
"BACK": "戻る"
}
+34 -7
View File
@@ -406,7 +406,6 @@
"ENVIRONMENTAL": "AMBIENTAL",
"EARTH WATCH": "VIGILÂNCIA DA TERRA",
"ACTIVE EVENTS": "EVENTOS ATIVOS",
"Starting live contacts…": "Iniciando contatos ao vivo…",
"Opening space missions…": "Abrindo missões espaciais…",
"Scanning active events…": "Varrendo eventos ativos…",
"Live earthquakes and active fires, from USGS and NASA": "Terremotos e incêndios ativos ao vivo, do USGS e da NASA",
@@ -3172,15 +3171,10 @@
"Reset map bearing to north": "Redefinir a orientação do mapa para o norte",
"Reset camera and return to full globe view": "Redefinir a câmera e voltar à vista do globo completo",
"MISSION CONTROL · FIRST LAUNCH": "CENTRO DE CONTROLE · PRIMEIRO ACESSO",
"Choose your first view": "Escolha sua primeira vista",
"LIVE CONTACTS": "CONTATOS AO VIVO",
"Aircraft, vessels and nearby intelligence": "Aeronaves, embarcações e informações da região",
"Launches, spacecraft and orbital context": "Lançamentos, espaçonaves e contexto orbital",
"EXPLORE MANUALLY": "EXPLORAR MANUALMENTE",
"Begin with a clean globe": "Comece com um globo limpo",
"Don't show this again": "Não mostrar novamente",
"ESC to dismiss": "ESC para fechar",
"Tip: the GEV MIC button in the dock lets you talk to the map.": "Dica: o botão GEV MIC no dock permite falar com o mapa.",
"{lower} to {upper}": "{lower} a {upper}",
"Up to {upper}": "Até {upper}",
"From {lower}": "A partir de {lower}",
@@ -4380,5 +4374,38 @@
"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"
"Looks private, so nothing is searched or sent": "Parece privado, por isso nada é pesquisado nem enviado",
"Bilawal on YouTube": "Bilawal no YouTube",
"BROWSE STORIES": "VER STORIES",
"ENTER GOD MODE": "ENTRAR NO MODO DEUS",
"Go deeper": "Ir além",
"The studio behind GEV": "O estúdio por trás do GEV",
"Visual presets": "Predefinições visuais",
"Open source. Self-host, fork, add a layer.": "Código aberto. Hospede você mesmo, faça um fork, adicione uma camada.",
"Choose your mode": "Escolha seu modo",
"The spy-satellite keyhole: circular viewport, tactical HUD, cinematic camera. For exploring.": "A mira do satélite espião: visão circular, HUD tático, câmera cinematográfica. Para explorar.",
"Welcome to God's Eye View": "Bem-vindo ao God's Eye View",
"A cleaner, readable view where every value shows its source. For research and reporting.": "Uma visão mais limpa e legível em que cada valor mostra sua fonte. Para pesquisa e reportagem.",
"Keyhole HUD": "HUD de mira",
"Analyst": "Analista",
"God": "Deus",
"COMING SOON": "EM BREVE",
"More from Halfpixel": "Mais da Halfpixel",
"Start with": "Começar com",
"FUN": "DIVERSÃO",
"Where do you want to start?": "Por onde você quer começar?",
"Three things to know": "Três coisas a saber",
"Pick one to begin with. You can change everything later.": "Escolha uma opção para começar. Você pode mudar tudo depois.",
"That is all you need to get going.": "Isso é tudo que você precisa para começar.",
"SKIP · ESC": "PULAR · ESC",
"SKIP": "PULAR",
"Search places": "Pesquisar lugares",
"Type a place into the search bar.": "Digite um lugar na barra de busca.",
"Turn on layers": "Ativar camadas",
"Turn layers on to see flights, ships, cameras, weather and more.": "Ative camadas para ver voos, navios, câmeras, clima e muito mais.",
"Click anything": "Clique em qualquer elemento",
"Select a map item to see its details.": "Selecione um item do mapa para ver seus detalhes.",
"Bilawal on {site}": "Bilawal no {site}",
"Bilawal's website": "Site de Bilawal",
"BACK": "VOLTAR"
}
+34 -7
View File
@@ -152,7 +152,6 @@
"CARGO": "ГРУЗОВОЕ",
"TANKER": "ТАНКЕР",
"OTHER": "ДРУГОЕ",
"Starting live contacts…": "Запуск контактов в реальном времени…",
"Opening space missions…": "Открытие космических миссий…",
"Scanning active events…": "Сканирование активных событий…",
"Live earthquakes and active fires, from USGS and NASA": "Землетрясения и активные пожары в реальном времени от USGS и NASA",
@@ -1021,15 +1020,10 @@
"Globe actions": "Действия с глобусом",
"NO PLACE LEFT BEHIND": "НИ ОДНА ТОЧКА НЕ ОСТАНЕТСЯ ПОЗАДИ",
"ACTIVE STYLE": "АКТИВНЫЙ СТИЛЬ",
"Choose your first view": "Выберите первый вид",
"Tip: the GEV MIC button in the dock lets you talk to the map.": "Совет: кнопка «МИК» в доке позволяет говорить с картой.",
"Aircraft, vessels and nearby intelligence": "Самолёты, суда и разведданные поблизости",
"Launches, spacecraft and orbital context": "Пуски, космические аппараты и орбитальный контекст",
"Begin with a clean globe": "Начните с чистого глобуса",
"MISSION CONTROL · FIRST LAUNCH": "ЦЕНТР УПРАВЛЕНИЯ · ПЕРВЫЙ ЗАПУСК",
"Don't show this again": "Больше не показывать",
"ESC to dismiss": "ESC — скрыть",
"LIVE CONTACTS": "КОНТАКТЫ ОНЛАЙН",
"EXPLORE MANUALLY": "ИЗУЧИТЬ ВРУЧНУЮ",
"Celestial ring — reveal the full globe": "Небесное кольцо — показать весь глобус",
"Celestial ring — available in Normal style": "Небесное кольцо — доступно в стиле «Обычный»",
@@ -4486,5 +4480,38 @@
"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": "Похоже на личные данные, поэтому ничего не ищется и не отправляется"
"Looks private, so nothing is searched or sent": "Похоже на личные данные, поэтому ничего не ищется и не отправляется",
"Bilawal on YouTube": "Билавал на YouTube",
"BROWSE STORIES": "СМОТРЕТЬ STORIES",
"ENTER GOD MODE": "ВОЙТИ В РЕЖИМ БОГА",
"Go deeper": "Глубже",
"The studio behind GEV": "Студия, создавшая GEV",
"Visual presets": "Визуальные пресеты",
"Open source. Self-host, fork, add a layer.": "Открытый код. Разверните у себя, сделайте форк, добавьте слой.",
"Choose your mode": "Выберите режим",
"The spy-satellite keyhole: circular viewport, tactical HUD, cinematic camera. For exploring.": "Замочная скважина спутника-шпиона: круглый обзор, тактический HUD, кинематографичная камера. Для исследования.",
"Welcome to God's Eye View": "Добро пожаловать в God's Eye View",
"A cleaner, readable view where every value shows its source. For research and reporting.": "Более чистый и читаемый вид, где у каждого значения указан источник. Для исследований и отчётов.",
"Keyhole HUD": "HUD-скважина",
"Analyst": "Аналитик",
"God": "Бог",
"COMING SOON": "СКОРО",
"More from Halfpixel": "Ещё от Halfpixel",
"Start with": "Начать с",
"FUN": "ИГРА",
"Where do you want to start?": "С чего хотите начать?",
"Three things to know": "Три вещи, которые стоит знать",
"Pick one to begin with. You can change everything later.": "Выберите один вариант для начала. Позже всё можно изменить.",
"That is all you need to get going.": "Это всё, что нужно для начала.",
"SKIP · ESC": "ПРОПУСТИТЬ · ESC",
"SKIP": "ПРОПУСТИТЬ",
"Search places": "Поиск мест",
"Type a place into the search bar.": "Введите место в строке поиска.",
"Turn on layers": "Включайте слои",
"Turn layers on to see flights, ships, cameras, weather and more.": "Включайте слои, чтобы видеть самолёты, суда, камеры, погоду и многое другое.",
"Click anything": "Нажмите на объект",
"Select a map item to see its details.": "Выберите объект на карте, чтобы увидеть подробности.",
"Bilawal on {site}": "Билал на {site}",
"Bilawal's website": "Сайт Билала",
"BACK": "НАЗАД"
}
+34 -7
View File
@@ -155,7 +155,6 @@
"ENVIRONMENTAL": "MILJÖ",
"EARTH WATCH": "JORDBEVAKNING",
"ACTIVE EVENTS": "AKTIVA HÄNDELSER",
"Starting live contacts…": "Startar livekontakter …",
"Opening space missions…": "Öppnar rymduppdrag …",
"Scanning active events…": "Söker efter aktiva händelser …",
"Live earthquakes and active fires, from USGS and NASA": "Jordbävningar och aktiva bränder i realtid, från USGS och NASA",
@@ -953,15 +952,10 @@
"Copy share link": "Kopiera delningslänk",
"Reset camera and return to full globe view": "Återställ kameran och återgå till vy över hela globen",
"MISSION CONTROL · FIRST LAUNCH": "UPPDRAGSLEDNING · FÖRSTA START",
"Choose your first view": "Välj första vy",
"LIVE CONTACTS": "LIVEKONTAKTER",
"Aircraft, vessels and nearby intelligence": "Flygplan, fartyg och lägesbild i närheten",
"Launches, spacecraft and orbital context": "Uppskjutningar, rymdfarkoster och omloppsbanor",
"EXPLORE MANUALLY": "UTFORSKA MANUELLT",
"Begin with a clean globe": "Börja med en tom glob",
"Don't show this again": "Visa inte igen",
"ESC to dismiss": "ESC för att stänga",
"Tip: the GEV MIC button in the dock lets you talk to the map.": "Tips: med knappen MIK i dockan går det att prata med kartan.",
"Pick a shape, then click the map.": "Välj en form och klicka sedan på kartan.",
"Enter to place the pin, Esc to cancel.": "Enter placerar nålen, Esc avbryter.",
"Click where the pin goes.": "Klicka där nålen ska sitta.",
@@ -4274,5 +4268,38 @@
"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"
"Looks private, so nothing is searched or sent": "Ser privat ut, så inget söks eller skickas",
"Where do you want to start?": "Var vill du börja?",
"Three things to know": "Tre saker att känna till",
"Pick one to begin with. You can change everything later.": "Välj ett alternativ att börja med. Du kan ändra allt senare.",
"That is all you need to get going.": "Det är allt du behöver för att komma igång.",
"SKIP · ESC": "HOPPA ÖVER · ESC",
"SKIP": "HOPPA ÖVER",
"Search places": "Sök platser",
"Type a place into the search bar.": "Skriv en plats i sökfältet.",
"Turn on layers": "Aktivera lager",
"Turn layers on to see flights, ships, cameras, weather and more.": "Aktivera lager för att se flyg, fartyg, kameror, väder och mer.",
"Click anything": "Klicka på ett objekt",
"Select a map item to see its details.": "Välj ett kartobjekt för att se detaljerna.",
"Bilawal on {site}": "Bilawal på {site}",
"Bilawal's website": "Bilawals webbplats",
"BACK": "TILLBAKA",
"Welcome to God's Eye View": "Välkommen till God's Eye View",
"Choose your mode": "Välj läge",
"God": "Gud",
"FUN": "NÖJE",
"The spy-satellite keyhole: circular viewport, tactical HUD, cinematic camera. For exploring.": "Spionsatellitens nyckelhål: rund vy, taktisk HUD och filmisk kamera. För utforskning.",
"Keyhole HUD": "Nyckelhåls-HUD",
"Visual presets": "Visuella förval",
"Analyst": "Analytiker",
"COMING SOON": "KOMMER SNART",
"A cleaner, readable view where every value shows its source. For research and reporting.": "En renare, lättläst vy där varje värde visar sin källa. För research och rapportering.",
"Start with": "Börja med",
"Go deeper": "Gå djupare",
"BROWSE STORIES": "BLÄDDRA BLAND BERÄTTELSER",
"More from Halfpixel": "Mer från Halfpixel",
"Bilawal on YouTube": "Bilawal på YouTube",
"The studio behind GEV": "Studion bakom GEV",
"Open source. Self-host, fork, add a layer.": "Öppen källkod. Kör själv, skapa en egen variant, lägg till ett lager.",
"ENTER GOD MODE": "STARTA GUDLÄGE"
}
+34 -7
View File
@@ -416,7 +416,6 @@
"ENVIRONMENTAL": "ДОВКІЛЛЯ",
"EARTH WATCH": "СПОСТЕРЕЖЕННЯ ЗА ЗЕМЛЕЮ",
"ACTIVE EVENTS": "АКТИВНІ ПОДІЇ",
"Starting live contacts…": "Запуск контактів у реальному часі…",
"Opening space missions…": "Відкриття космічних місій…",
"Scanning active events…": "Сканування активних подій…",
"Live earthquakes and active fires, from USGS and NASA": "Землетруси в реальному часі й активні пожежі від USGS та NASA",
@@ -3251,15 +3250,10 @@
"Reset map bearing to north": "Скинути азимут карти на північ",
"Reset camera and return to full globe view": "Скинути камеру та повернутися до вигляду всього глобуса",
"MISSION CONTROL · FIRST LAUNCH": "ЦЕНТР КЕРУВАННЯ · ПЕРШИЙ ЗАПУСК",
"Choose your first view": "Виберіть, із чого почати",
"LIVE CONTACTS": "КОНТАКТИ ОНЛАЙН",
"Aircraft, vessels and nearby intelligence": "Літаки, судна й розвіддані поблизу",
"Launches, spacecraft and orbital context": "Запуски, космічні апарати та орбітальний контекст",
"EXPLORE MANUALLY": "ДОСЛІДИТИ ВРУЧНУ",
"Begin with a clean globe": "Почніть із чистого глобуса",
"Don't show this again": "Більше не показувати",
"ESC to dismiss": "ESC — приховати",
"Tip: the GEV MIC button in the dock lets you talk to the map.": "Порада: кнопка МІК у доку дає змогу говорити з картою.",
"fire confidence filter|All": "Усі",
"fire confidence filter|Nominal+": "Середня+",
"fire confidence filter|High": "Висока",
@@ -4486,5 +4480,38 @@
"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": "Схоже на особисті дані, тому нічого не шукається й не надсилається"
"Looks private, so nothing is searched or sent": "Схоже на особисті дані, тому нічого не шукається й не надсилається",
"Bilawal on YouTube": "Білавал на YouTube",
"BROWSE STORIES": "ПЕРЕГЛЯНУТИ STORIES",
"ENTER GOD MODE": "УВІЙТИ В РЕЖИМ БОГА",
"Go deeper": "Глибше",
"The studio behind GEV": "Студія, що створила GEV",
"Visual presets": "Візуальні пресети",
"Open source. Self-host, fork, add a layer.": "Відкритий код. Розгорніть у себе, зробіть форк, додайте шар.",
"Choose your mode": "Оберіть режим",
"The spy-satellite keyhole: circular viewport, tactical HUD, cinematic camera. For exploring.": "Замкова шпарина супутника-шпигуна: круглий огляд, тактичний HUD, кінематографічна камера. Для дослідження.",
"Welcome to God's Eye View": "Ласкаво просимо до God's Eye View",
"A cleaner, readable view where every value shows its source. For research and reporting.": "Чистіший і зручний для читання вигляд, де кожне значення показує своє джерело. Для досліджень і звітів.",
"Keyhole HUD": "HUD-шпарина",
"Analyst": "Аналітик",
"God": "Бог",
"COMING SOON": "НЕЗАБАРОМ",
"More from Halfpixel": "Більше від Halfpixel",
"Start with": "Почати з",
"FUN": "ГРА",
"Where do you want to start?": "З чого хочете почати?",
"Three things to know": "Три речі, які варто знати",
"Pick one to begin with. You can change everything later.": "Виберіть один варіант для початку. Згодом усе можна змінити.",
"That is all you need to get going.": "Це все, що потрібно для початку.",
"SKIP · ESC": "ПРОПУСТИТИ · ESC",
"SKIP": "ПРОПУСТИТИ",
"Search places": "Пошук місць",
"Type a place into the search bar.": "Введіть місце в рядку пошуку.",
"Turn on layers": "Увімкніть шари",
"Turn layers on to see flights, ships, cameras, weather and more.": "Увімкніть шари, щоб бачити літаки, судна, камери, погоду та інше.",
"Click anything": "Натисніть на об’єкт",
"Select a map item to see its details.": "Виберіть об’єкт на карті, щоб побачити подробиці.",
"Bilawal on {site}": "Білал на {site}",
"Bilawal's website": "Сайт Білала",
"BACK": "НАЗАД"
}
+34 -7
View File
@@ -386,7 +386,6 @@
"ENVIRONMENTAL": "环境",
"EARTH WATCH": "地球监测",
"ACTIVE EVENTS": "活跃事件",
"Starting live contacts…": "正在接入实时目标…",
"Opening space missions…": "正在打开太空任务…",
"Scanning active events…": "正在扫描活跃事件…",
"Live earthquakes and active fires, from USGS and NASA": "来自 USGS 和 NASA 的实时地震与活跃火点",
@@ -2910,15 +2909,10 @@
"Reset map bearing to north": "重置地图方位为正北",
"Reset camera and return to full globe view": "重置相机并返回完整地球视图",
"MISSION CONTROL · FIRST LAUNCH": "任务控制 · 首次启动",
"Choose your first view": "选择初始视图",
"LIVE CONTACTS": "实时目标",
"Aircraft, vessels and nearby intelligence": "飞机、船舶及周边情报",
"Launches, spacecraft and orbital context": "发射、航天器与轨道态势",
"EXPLORE MANUALLY": "手动探索",
"Begin with a clean globe": "从空白地球开始",
"Don't show this again": "不再显示",
"ESC to dismiss": "按 ESC 关闭",
"Tip: the GEV MIC button in the dock lets you talk to the map.": "提示:可通过停靠栏中的 GEV 麦克风按钮用语音操控地图。",
"hemisphere|N": "N",
"hemisphere|S": "S",
"hemisphere|E": "E",
@@ -4168,5 +4162,38 @@
"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": "疑似隐私信息,因此不会搜索或发送"
"Looks private, so nothing is searched or sent": "疑似隐私信息,因此不会搜索或发送",
"Bilawal on YouTube": "Bilawal 的 YouTube",
"BROWSE STORIES": "浏览 STORIES",
"ENTER GOD MODE": "进入上帝模式",
"Go deeper": "深入了解",
"The studio behind GEV": "GEV 背后的工作室",
"Visual presets": "视觉预设",
"Open source. Self-host, fork, add a layer.": "开源。可自行托管、派生、添加图层。",
"Choose your mode": "选择模式",
"The spy-satellite keyhole: circular viewport, tactical HUD, cinematic camera. For exploring.": "间谍卫星锁孔视图:圆形视野、战术 HUD、电影级镜头。适合探索。",
"Welcome to God's Eye View": "欢迎使用 God's Eye View",
"A cleaner, readable view where every value shows its source. For research and reporting.": "更简洁易读的视图,每个数值都标明来源。适合研究和报道。",
"Keyhole HUD": "锁孔 HUD",
"Analyst": "分析师",
"God": "上帝",
"COMING SOON": "即将推出",
"More from Halfpixel": "更多来自 Halfpixel",
"Start with": "从这里开始",
"FUN": "娱乐",
"Where do you want to start?": "您想从哪里开始?",
"Three things to know": "需要了解的三件事",
"Pick one to begin with. You can change everything later.": "先选择一项,之后可以随时更改。",
"That is all you need to get going.": "了解这些就可以开始了。",
"SKIP · ESC": "跳过 · ESC",
"SKIP": "跳过",
"Search places": "搜索地点",
"Type a place into the search bar.": "在搜索栏中输入地点。",
"Turn on layers": "开启图层",
"Turn layers on to see flights, ships, cameras, weather and more.": "开启图层以查看航班、船舶、摄像头、天气等。",
"Click anything": "点击任意项目",
"Select a map item to see its details.": "选择地图上的项目以查看详情。",
"Bilawal on {site}": "Bilawal 的 {site} 主页",
"Bilawal's website": "Bilawal 的网站",
"BACK": "返回"
}
+34 -7
View File
@@ -386,7 +386,6 @@
"ENVIRONMENTAL": "環境",
"EARTH WATCH": "地球監測",
"ACTIVE EVENTS": "活躍事件",
"Starting live contacts…": "正在接入實時目標…",
"Opening space missions…": "正在打開太空任務…",
"Scanning active events…": "正在掃描活躍事件…",
"Live earthquakes and active fires, from USGS and NASA": "來自 USGS 和 NASA 的實時地震與活躍火點",
@@ -2910,15 +2909,10 @@
"Reset map bearing to north": "重置地圖方位為正北",
"Reset camera and return to full globe view": "重置相機並返回完整地球視圖",
"MISSION CONTROL · FIRST LAUNCH": "任務控制 · 首次啟動",
"Choose your first view": "選擇初始視圖",
"LIVE CONTACTS": "實時目標",
"Aircraft, vessels and nearby intelligence": "飛機、船舶及周邊情報",
"Launches, spacecraft and orbital context": "發射、航天器與軌道態勢",
"EXPLORE MANUALLY": "手動探索",
"Begin with a clean globe": "從空白地球開始",
"Don't show this again": "不再顯示",
"ESC to dismiss": "按 ESC 關閉",
"Tip: the GEV MIC button in the dock lets you talk to the map.": "提示:可通過停靠欄中的 GEV 麥克風按鈕用語音操控地圖。",
"hemisphere|N": "N",
"hemisphere|S": "S",
"hemisphere|E": "E",
@@ -4168,5 +4162,38 @@
"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": "疑似隱私信息,因此不會搜索或發送"
"Looks private, so nothing is searched or sent": "疑似隱私信息,因此不會搜索或發送",
"Bilawal on YouTube": "Bilawal 的 YouTube",
"BROWSE STORIES": "瀏覽 STORIES",
"ENTER GOD MODE": "進入上帝模式",
"Go deeper": "深入瞭解",
"The studio behind GEV": "GEV 背後的工作室",
"Visual presets": "視覺預設",
"Open source. Self-host, fork, add a layer.": "開源。可自行託管、派生、添加圖層。",
"Choose your mode": "選擇模式",
"The spy-satellite keyhole: circular viewport, tactical HUD, cinematic camera. For exploring.": "間諜衛星鎖孔視圖:圓形視野、戰術 HUD、電影級鏡頭。適合探索。",
"Welcome to God's Eye View": "歡迎使用 God's Eye View",
"A cleaner, readable view where every value shows its source. For research and reporting.": "更簡潔易讀的視圖,每個數值都標明來源。適合研究和報道。",
"Keyhole HUD": "鎖孔 HUD",
"Analyst": "分析師",
"God": "上帝",
"COMING SOON": "即將推出",
"More from Halfpixel": "更多來自 Halfpixel",
"Start with": "從這裡開始",
"FUN": "娛樂",
"Where do you want to start?": "您想從哪裡開始?",
"Three things to know": "需要了解的三件事",
"Pick one to begin with. You can change everything later.": "先選擇一項,之後可以隨時更改。",
"That is all you need to get going.": "瞭解這些就可以開始了。",
"SKIP · ESC": "跳過 · ESC",
"SKIP": "跳過",
"Search places": "搜索地點",
"Type a place into the search bar.": "在搜索欄中輸入地點。",
"Turn on layers": "開啟圖層",
"Turn layers on to see flights, ships, cameras, weather and more.": "開啟圖層以查看航班、船舶、攝像頭、天氣等。",
"Click anything": "點擊任意項目",
"Select a map item to see its details.": "選擇地圖上的項目以查看詳情。",
"Bilawal on {site}": "Bilawal 的 {site} 主頁",
"Bilawal's website": "Bilawal 的網站",
"BACK": "返回"
}
+4 -1
View File
@@ -76,7 +76,10 @@ export function createCards({
const height = canvas.clientHeight;
let ambientCount = 0;
for (const candidate of layerState._labelCandidates) {
// An application drawing the detections in place of the markers draws
// them unlabelled: only the selected fire's card shows then.
const candidates = layerState._standIn ? [] : layerState._labelCandidates;
for (const candidate of candidates) {
if (ambientCount >= MAX_AMBIENT_LABELS) break;
if (candidate.fire && candidate.fire === layerState._selectedFire)
continue;
+28 -2
View File
@@ -52,10 +52,12 @@ export function createLifecycle({
if (layerState._cells) layerState._cells.show = true;
// The GPU culls the far side each frame, so retained rows are right
// for wherever the camera went while the layer was off.
if (layerState._icons) layerState._icons.show = true;
if (layerState._icons) layerState._icons.show = !layerState._standIn;
overlayHost.setVisible(FIRMS_OVERLAY_SOURCE_ID, true);
// A filter can leave an old raster cached while the current set is empty.
layerState._heatImagery?.setShow(layerState._fires.length > 0);
layerState._heatImagery?.setShow(
layerState._fires.length > 0 && !layerState._standIn,
);
// The camera can have crossed the hand-off while the layer was off.
components.rendering.applyHandoffFade(true);
components.viewport.installLodWatcher();
@@ -68,6 +70,29 @@ export function createLifecycle({
await components.ingestion.loadHeatmap();
},
/**
* Let an application draw the detections in place of the layer's
* markers. While a stand-in is set, the glows, the heatmap and the
* ambient cards are hidden and everything else works as before: a click
* on a fire the stand-in draws (`standIn.hitTest(screenPosition)`, which
* answers a detection record from the same source, or null) selects it
* and moves the camera to it as a click on its marker does, the selected
* fire's card shows, and a click on empty space clears the selection.
* `null` brings the markers back. The selection is kept either way.
* @param {?{hitTest: (screenPosition: {x: number, y: number}) => ?Object}} standIn
*/
setMarkerStandIn(standIn) {
layerState._standIn =
typeof standIn?.hitTest === 'function' ? standIn : null;
layerState._heatImagery?.setShow(
layerState._enabled &&
layerState._fires.length > 0 &&
!layerState._standIn,
);
components.rendering.applyHandoffFade(true);
components.cards.rebuildAmbientLabels();
},
disable() {
layerState.request?.abort();
layerState.request = null;
@@ -129,6 +154,7 @@ export function createLifecycle({
layerState._currentLodIndex = -1;
layerState._lastViewRect = null;
layerState._selectedFire = null;
layerState._standIn = null;
layerState._labelCandidates = [];
layerState._labelLodDistance = 0;
layerState._pickIndexById.clear();
+6 -3
View File
@@ -122,7 +122,7 @@ export function createRendering({
glowAlpha = alpha;
const set = layerState._icons;
if (!set) return;
set.show = layerState._enabled && heat < 1;
set.show = layerState._enabled && !layerState._standIn && heat < 1;
if (!changed || !drawnGlows.size) return;
const faded = [];
for (const drawn of drawnGlows.values()) {
@@ -273,7 +273,7 @@ export function createRendering({
// The map stack may have changed since the last render.
imagery.rehome();
ensureHeatRaster(now);
imagery.setShow(layerState._enabled);
imagery.setShow(layerState._enabled && !layerState._standIn);
}
/**
@@ -469,7 +469,10 @@ export function createRendering({
// Blended as one translucent pass, as its billboards were.
blend: 'translucent',
horizonCull: true,
show: layerState._enabled && !(layerState._handoffHeat >= 1),
show:
layerState._enabled &&
!layerState._standIn &&
!(layerState._handoffHeat >= 1),
drawOrder: spriteDrawOrder?.('firms') ?? 0,
});
// Columns of no rows put the set's host in the scene now, rather than
+40 -7
View File
@@ -35,17 +35,23 @@ export function createSelection({
const input = inputFor(layerState._viewer);
layerState._clickSubscription = input.onClick((event) => {
const picked = event.topHit;
const fire = pickedFire(event.drawHit);
const pickedId = picked ? resolvePickId(picked) : null;
// A pick that belongs to a sibling layer (e.g. an aircraft) is not
// "empty space" — leave the selection alone and let that layer handle it.
const otherLayer = Boolean(pickedId && isOwnedByOtherLayer(id, pickedId));
// The stand-in is asked where markers are picked: the click corrected
// for the sensor style (`event.position`), and only when no sibling
// layer's item is on top, as a marker under that item would not be hit.
const fire = layerState._standIn
? otherLayer
? null
: standInFire(event.position ?? event.screenPosition)
: pickedFire(event.drawHit);
if (fire) {
selectAndFocusFire(fire);
return;
}
// A pick that belongs to a sibling layer (e.g. an aircraft) is not
// "empty space" — leave the selection alone and let that layer handle it.
if (picked) {
const pickedId = resolvePickId(picked);
if (pickedId && isOwnedByOtherLayer(id, pickedId)) return;
}
if (otherLayer) return;
const cardHit = overlayHost.hitTest?.(
event.screenPosition?.x,
event.screenPosition?.y,
@@ -93,6 +99,32 @@ export function createSelection({
return layerState._pickIndexById.get(hit.id) ?? null;
}
/** The shown detections by their key, for the shown set they were made from. */
let keyed = { fires: null, byKey: null };
/**
* Resolve a click to one of this layer's fire records through the
* application's stand-in for its markers (`setMarkerStandIn`), or null:
* the record its hit test answers, matched by its detection key to a fire
* the layer shows now (so one the filter hides is not selected).
* @param {?{x: number, y: number}} screenPosition - Where the user clicked.
* @returns {?Object} Fire record.
*/
function standInFire(screenPosition) {
if (!screenPosition) return null;
const record = layerState._standIn?.hitTest(screenPosition);
if (!record) return null;
if (keyed.fires !== layerState._fires)
keyed = {
fires: layerState._fires,
byKey: new Map(
layerState._fires.map((fire) => [fireDetectionKey(fire), fire]),
),
};
return keyed.byKey.get(fireDetectionKey(record)) ?? null;
}
/**
* Select a fire: show its detail label and mark it selected in the shared
* context store so voice "what's selected" resolves to it.
@@ -229,6 +261,7 @@ export function createSelection({
removeClickHandler,
selectAndFocusFire,
pickedFire,
standInFire,
selectFire,
clearFireSelection,
refreshContextRegistrations,
+8
View File
@@ -98,6 +98,14 @@ export function createFirmsState({ services, config }) {
layerState._selectedFire = null;
/**
* What an application draws in place of the markers (`setMarkerStandIn`):
* while set, the glows, heatmap and ambient cards are hidden and clicks
* resolve through its `hitTest`.
*/
layerState._standIn = null;
/** Priority-ordered label candidates from the last rebuild (detections or cells). */
layerState._labelCandidates = [];
+16 -262
View File
@@ -62,49 +62,10 @@ export function onlyNumbersLookPrivate(text) {
// is ("card 4111 …", "phone +1 415 …", "token 12345678").
groups.every((group) => group.length <= 6) &&
groups.join('').length <= 9 &&
!/(?<!\d)\d{3}[ .-]\d{4}(?!\d)/.test(line) &&
!NUMBER_CONTEXT.test(line)
);
}
/**
* The most words a line sent for place suggestions may have: as many as the
* Omnibar reads as a place's name (ten with a number, as an address has).
*/
const suggestMaxWords = (text) => (/\d/.test(text) ? 10 : 8);
/**
* Common words no wallet's recovery phrase holds (they are not on the BIP39
* list): a line with one is a sentence, however many short words it has.
*/
const NOT_SEED_WORDS = new Set([
'the',
'and',
'are',
'for',
'from',
'with',
'how',
'why',
'which',
'would',
'could',
'should',
'does',
'was',
'were',
'flights',
]);
/**
* "Boise ID 83702", "Coeur d'Alene ID 83814": Idaho's code before a ZIP
* code, after a town's name (not after "my" or "employee", whose "ID" is an
* identity number).
*/
const IDAHO_BEFORE_ZIP = /(\S+)(,?\s)ID(?=\.?,?\s+\d{5}(?:-\d{4})?(?!\S))/gu;
const ID_OWNERS =
/^(?:my|your|our|his|her|their|employee|student|staff|member|user|customer|patient|national|voter|photo|tax|card|the|an?)$/i;
/**
* Words that say a number is an account, a card, a phone or a secret, in the
* interface's languages where they differ ("Karte", "Telefon", "tarjeta").
@@ -123,16 +84,12 @@ function foldLine(text) {
.normalize('NFKC')
.replace(/\p{Cf}/gu, '')
.replace(/[\u2018\u2019]/g, "'")
.replace(/(?![0-9])\p{Nd}/gu, '0')
.replace(/\s+/g, ' ')
.replace(IDAHO_BEFORE_ZIP, (whole, word, gap) =>
ID_OWNERS.test(word) ? whole : `${word}${gap}Idaho`,
);
.replace(/(?![0-9])\p{Nd}/gu, '0');
}
/** A US ZIP+4 after a state's code or name, as an address writes it. */
const US_ZIP4 = new RegExp(
String.raw`(?<=(?:^|\s)(?:A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|PR|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY]|[a-z]\.[a-z]|Alabama|Alaska|Arizona|Arkansas|California|Colorado|Connecticut|Delaware|Florida|Georgia|Hawaii|Idaho|Illinois|Indiana|Iowa|Kansas|Kentucky|Louisiana|Maine|Maryland|Massachusetts|Mass|Michigan|Minnesota|Mississippi|Missouri|Montana|Nebraska|Nevada|New Hampshire|New Jersey|New Mexico|New York|North Carolina|North Dakota|Ohio|Oklahoma|Oregon|Pennsylvania|Rhode Island|South Carolina|South Dakota|Tennessee|Texas|Utah|Vermont|Virginia|Washington|West Virginia|Wisconsin|Wyoming|Puerto Rico)\.?,?\s)\d{5}-\d{4}\b`,
String.raw`(?<=(?:^|\s)(?:[a-z]{2}|[a-z]\.[a-z]|Alabama|Alaska|Arizona|Arkansas|California|Colorado|Connecticut|Delaware|Florida|Georgia|Hawaii|Idaho|Illinois|Indiana|Iowa|Kansas|Kentucky|Louisiana|Maine|Maryland|Massachusetts|Mass|Michigan|Minnesota|Mississippi|Missouri|Montana|Nebraska|Nevada|New Hampshire|New Jersey|New Mexico|New York|North Carolina|North Dakota|Ohio|Oklahoma|Oregon|Pennsylvania|Rhode Island|South Carolina|South Dakota|Tennessee|Texas|Utah|Vermont|Virginia|Washington|West Virginia|Wisconsin|Wyoming|Puerto Rico)\.?,?\s)\d{5}-\d{4}\b`,
'giu',
);
@@ -162,59 +119,6 @@ function privacyReason(text) {
)
)
return 'other';
// An email written around a filter: "john(at)gmail.com",
// "john[at]gmail[dot]com", "john at gmail dot com".
// Also "john at gmail.com" and a "(dot)" or "[dot]" in any of them.
// Spaced letter by letter ("j o h n @ g m a i l . c o m").
if (
/(?:^|\s)(?:\S\s){3,}@\s?(?:\S\s?){2,}/u.test(line) &&
/[^@]@[\p{L}\p{N}-]+\.\p{L}{2,}/u.test(line.replace(/\s+/g, ''))
)
return 'other';
if (
/[\p{L}\p{N}._%+-]\s*[([{<]\s*at\s*[)\]}>]\s*[\p{L}\p{N}-]/iu.test(line) ||
/\b\S+\s+at\s+\S+\s+(?:dot|punto|ponto|period|punkt|[([{<]\s*dot\s*[)\]}>])\s+\p{L}{2,24}\b/iu.test(
line,
) ||
/\b\S+\s+at\s+[\p{L}\p{N}-]+\s*[([{<]\s*dot\s*[)\]}>]\s*\p{L}{2,24}\b/iu.test(
line,
) ||
/\b[\p{L}\p{N}._%+-]+\s+at\s+[\p{L}\p{N}-]+(?:\.[\p{L}\p{N}-]+)*\s*\.\s*(?:com|net|org|edu|gov|mil|io|co|me|info|biz|app|dev|ai|[a-z]{2})\b/iu.test(
line,
)
)
return 'other';
// An IPv6 host in a link ("https://[::1]/").
if (/\[[0-9a-f:.]*:[0-9a-f:.]*:[0-9a-f:.]*\]/i.test(line)) return 'other';
// An IP address ("10.0.0.1").
if (/(?<![\d.])\d{1,3}(?:\.\d{1,3}){3}(?![\d.])/.test(line)) return 'other';
// An IPv6 address ("::1", "fe80::1%eth0", "2001:db8:0:0:0:0:2:1"): hex
// groups with "::", or five colons or more (a time has two).
if (
line.split(' ').some((token) => {
const bare = token.replace(/^[[(]+|[\]),.;]+$/g, '').replace(/%\w+$/, '');
const colons = (bare.match(/:/g) || []).length;
return (
/^[0-9a-f:.]+$/i.test(bare) &&
colons >= 2 &&
(bare.includes('::') || colons >= 5)
);
})
)
return 'other';
// A wallet's recovery phrase, whole or nearly ("abandon ability able
// …"): twelve to twenty-four words of three to eight letters, none a
// common word the phrase list lacks ("can you tell where the most …" is
// a question). Too long to be sent
// for suggestions anyway, it is kept from the assistant too.
const words = line.trim().toLowerCase().split(/\s+/);
if (
words.length >= 12 &&
words.length <= 24 &&
words.every((word) => /^[a-z]{3,8}$/.test(word)) &&
!words.some((word) => NOT_SEED_WORDS.has(word))
)
return 'other';
// Coordinates and grid references are a spot, not a number to keep: only
// text the place search itself reads as coordinates, as typed ("١٢٣٤,
// ٥٦٧٨" folded would read as a spot, but is not one).
@@ -242,7 +146,7 @@ function privacyReason(text) {
.replace(
// After a street word, or before the city ("12, 10115 Berlin");
// "030 12345" alone is a phone number.
/(?<=\p{L}\.?\s)[1-9]\d{0,3}[a-z]?,?\s+\d{5}(?:-\d{3})?(?=\s+(?!(?:thanks|thank|thx|please|pls|ok|okay|now|asap|call|text)\b)\p{L}|$)|(?<=^|\s)[1-9]\d{0,3}[a-z]?,?\s+\d{5}(?:-\d{3})?(?=\s+(?!(?:thanks|thank|thx|please|pls|ok|okay|now|asap|call|text)\b)\p{L})/giu,
/(?<=\p{L}\.?\s)\d{1,4}[a-z]?,?\s+\d{5}(?:-\d{3})?(?=\s+\p{L}|$)|(?<=^|\s)\d{1,4}[a-z]?,?\s+\d{5}(?:-\d{3})?(?=\s+\p{L})/giu,
' ',
)
// Other postcodes after a street's house number and before the city (a
@@ -260,7 +164,7 @@ function privacyReason(text) {
.replace(US_ZIP4, ' x ')
.replace(/\b\d{5}-\d{3}\b/g, ' x ')
.replace(
/〒\s?\d{3}-\d{4}|\b\d{3}-\d{4}(?=\s*[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}])|(?<=[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}]\s*)\d{3}-\d{4}\b/gu,
/〒\s?\d{3}-\d{4}|\b\d{3}-\d{4}(?=\s*[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}])/gu,
' x ',
)
.replace(/#/g, ' x ')
@@ -272,12 +176,9 @@ function privacyReason(text) {
// An IBAN.
if (/\b[a-z]{2}\d{2}(?:\s?[a-z0-9]){10,}/i.test(line)) return 'other';
if (
/\b(?:password|passcode|passwd|pw|pwd)\b\s*[:=#]?\s*\S/i.test(line) ||
// "Bearer Island" and "SSN Station" are places: after "bearer" any value
// but a capitalised name is a token, and a social security number has
// digits.
bearerToken(line) ||
/\bssn\b(?:\s+(?:is|no\.?|number|#))*\s*[:=#]?\s*[\dx*]{3}/i.test(line) ||
/\b(?:password|passcode|passwd|ssn|pw|pwd|bearer)\b\s*[:=#]?\s*\S/i.test(
line,
) ||
// The word for "password" in the interface's languages.
// A whole word only: "Sachsenhausen" holds "senha" but is a place.
/(?<!\p{L})(?:contraseña|passwort|kennwort|mot de passe|senha|parola d'ordine|lösenord|пароль|пароля|密码|密碼|パスワード|비밀번호|סיסמה|كلمة (?:السر|المرور))(?!\p{L})\s*[:=#]?\s*\S/iu.test(
@@ -289,16 +190,6 @@ function privacyReason(text) {
line,
) ||
/\b(?:token|secret|api[ _-]?key|key|pass)\s*[:=]\s*\S/i.test(line) ||
// A number on a document or account after its label: "license ABC1234",
// "passport X1234567", "plate 7ABC123", "member no. 12345".
/\b(?:licen[cs]e|plate|passport|member(?:ship)?|account|acct|policy|ticket|booking|confirmation|ref(?:erence)?)(?:\s+(?:no\.?|number|#|is))*(?:\s*[:=#]\s*|\s+)(?=[a-z0-9-]*\d)[a-z0-9-]{4,}/i.test(
line,
) ||
// An identity number after "ID" in capitals ("ID AB123"); "Id" and
// "id" are words.
/\bID(?:\s+(?:no\.?|number|#|is))*(?:\s*[:=#]\s*|\s+)(?=[A-Za-z0-9-]*\d)[A-Za-z0-9-]{4,}/.test(
line,
) ||
/\b(?:my secret is|passphrase|mnemonic|seed phrase|recovery phrase)\b\s*[:=]?\s*\S/i.test(
line,
) ||
@@ -313,27 +204,7 @@ function privacyReason(text) {
/\b(?:pin|otp|2fa|mfa|cvv|cvc|(?:door|access|gate|alarm|entry|security|verification|one-time|auth|login) code)\s*(?:[:=#]|\s[-–—]\s|-)\s*[a-z0-9]/i.test(
line,
) ||
codeAfterLabel(line) ||
// A door, alarm or lockbox number ("code 4821", "garage code 4821",
// "the code to my door is 4821").
// A postcode, dialling code or airport code is not one ("zip code
// 90210", "area code 415").
/\b(?<!\b(?:zip|postal|post|postcode|area|country|dialing|dialling|airport|iata|icao|country)\s)(?:code|alarm|lockbox|lock box|combination|combo|keypad)(?:\s+(?:number|no\.?|is|code|pin))*\s*[:=#]?\s*\d{3,8}\b/i.test(
line,
) ||
/\b(?<!\b(?:zip|postal|post|area|country|dialing|dialling|airport)\s)code\b.{0,30}?\bis\s*[:=]?\s*\d{3,8}\b/i.test(
line,
) ||
// A UK National Insurance number, spaced ("AB 12 34 56 C").
/\b[a-z]{2}\s?\d{2}\s?\d{2}\s?\d{2}\s?[a-d]\b/i.test(line) ||
// "my id is AB12345", "id no. 4471".
/\bid\s+(?:is|no\.?|number|#)\s*[:=#]?\s*(?=[a-z0-9-]*\d)[a-z0-9-]{4,}/i.test(
line,
) ||
// A one-time code in a link ("…/callback?code=abcdef").
/[?&](?:code|token|access_token|key|sig|signature|auth)=[^&\s]{4,}/i.test(
line,
)
codeAfterLabel(line)
)
return 'other';
if (
@@ -344,12 +215,8 @@ function privacyReason(text) {
.map((token) => token.replace(/^[^\p{L}\p{N}]+|[^\p{L}\p{N}]+$/gu, ''))
.some(
(token) =>
/^(?:sk[-_]|rk_|pk_live|ghp_|gho_|ghu_|ghs_|github_pat_|glpat-|hf_|xox[abposr]-)/i.test(
token,
) ||
/^SG\.[\w-]{8,}\.[\w-]{8,}$/.test(token) ||
/^(?:AIza|eyJ)/.test(token) ||
/^AKIA[0-9A-Z]{12,}$/.test(token) ||
/^(?:sk[-_]|rk_|pk_live|ghp_|xox[abposr]-)/i.test(token) ||
/^(?:AIza|eyJ|AKIA)/.test(token) ||
mayBeSecret(token),
)
)
@@ -357,25 +224,6 @@ function privacyReason(text) {
return longNumber ? 'number' : null;
}
/**
* A value after "bearer" that is not a word a place's name is made of
* ("Bearer Island"); after "Authorization:" any value is a token.
*/
function bearerToken(line) {
if (/\bauthori[sz]ation\s*:\s*bearer\b\s*\S/i.test(line)) return true;
for (const match of line.matchAll(/\bbearer\b(\s*[:=#]?\s*)(\S+)/gi)) {
const value = match[2].replace(/[,.;:!?)]+$/, '');
// Only a word after a space may be a name: "Bearer: island" is a token.
if (/^\s+$/.test(match[1]) && PLACE_WORDS.test(value)) continue;
return true;
}
return false;
}
/** Words a place's name is made of, after a label word ("bearer island"). */
const PLACE_WORDS =
/^(?:island|islands|isle|lake|creek|river|point|bay|mountain|mount|hill|hills|valley|station|road|street|lane|avenue|park|beach|falls|springs?|county|city|town|village|plaza|square|mall|center|centre|tower|building|court|bank)$/i;
/**
* A code after a label that can only be a code, without a colon ("PIN
* A7B2", "verification code ABCDEF", "otp 7GH2K"): holding a digit, or in
@@ -383,48 +231,6 @@ const PLACE_WORDS =
* "GATE CODE LANE", "OTP Bank" and "Auth Code ABCD Street" stay places.
*/
function codeAfterLabel(line) {
// Labels that only ever name a code take one in lower case too ("otp
// abcdef", "cvv abc", "verification code abcdef"); a capitalised word
// after them is a name ("OTP Bank", "MFA Boston").
// After a label in lower case, any value is a code ("verification code
// Abc"); after one written as a name, only a value that is not one.
const coded =
/\b((?:otp|2fa|mfa|cvv|cvc|(?:verification|one-time|security|auth|login) code)(?:\s+is)?)\s+([a-z0-9][a-z0-9-]{2,})(?:\s+(?:thanks|thank you|thx|please|pls|ok))?\s*[.!]?\s*$/i.exec(
line,
);
if (coded) {
const [, label, value] = coded;
const labelIsName = /\p{Lu}/u.test(label);
// A word a place's name is made of is no code ("security code plaza",
// "otp bank"); after the short labels a code in letters is written in
// capitals ("otp ABCDEF"), so a lower-case word is a name ("mfa
// boston").
const shortLabel = /^(?:otp|2fa|mfa)\b/i.test(label);
const named =
PLACE_WORDS.test(value) || (shortLabel && /^\p{Ll}+$/u.test(value));
if (!labelIsName && !named) return true;
// After a label written as a name, a value in capitals is a code ("OTP
// ABCDEF", "Verification code ABC"), one capitalised a name ("OTP
// Bank"); a CVV is never a name.
if (labelIsName) {
if (/^cv[vc]\b/i.test(label)) return true;
if (/^\p{Lu}[\p{Lu}\d-]+$/u.test(value) && !PLACE_WORDS.test(value))
return true;
if (!/^\p{Lu}(?:\p{Ll}+|\p{Lu}+)$/u.test(value)) return true;
}
}
// A value in mixed case that is no name ("PIN aBcD", "gate code aBcD").
const mixed =
/\b(?:pin|(?:door|access|gate|alarm|entry) code)(?:\s+is)?\s+([a-z0-9-]{4,})\s*[.!]?\s*$/i.exec(
line,
);
if (
mixed &&
/\p{Ll}/u.test(mixed[1]) &&
/\p{Lu}/u.test(mixed[1]) &&
!/^\p{Lu}\p{Ll}+$/u.test(mixed[1])
)
return true;
const match =
/\b((?:pin|cvv|cvc|otp|2fa|mfa|(?:door|access|gate|alarm|entry|security|verification|one-time|auth|login) code)(?:\s+is)?)\s+([a-z0-9][a-z0-9-]{3,})\s*[.!]?\s*$/i.exec(
line,
@@ -432,9 +238,7 @@ function codeAfterLabel(line) {
if (!match) return false;
const [, label, value] = match;
if (/\d/.test(value)) return true;
// A code in capitals ("PIN ABCD", "GATE CODE ABCD"), but not a word a
// place's name is made of ("GATE CODE LANE").
return value === value.toUpperCase() && !PLACE_WORDS.test(value);
return value === value.toUpperCase() && label !== label.toUpperCase();
}
/**
@@ -488,43 +292,6 @@ export function resetPlaceSuggestions() {
shared.pending.clear();
}
/**
* Countries that write a house's number before its street ("10 Downing
* Street", "12 rue de Rivoli"); elsewhere it follows ("Hauptstraße 12").
*/
const NUMBER_FIRST = new Set([
'US',
'CA',
'GB',
'IE',
'AU',
'NZ',
'FR',
'LU',
'MC',
'ZA',
'IN',
'PH',
'SG',
'MY',
'HK',
'TH',
'LK',
'NG',
'GH',
'KE',
'JM',
'TT',
]);
/** A house's number and street as its country writes them, or ''. */
export function houseAddress({ houseNumber, street, countryCode }) {
if (!houseNumber || !street) return '';
return NUMBER_FIRST.has(String(countryCode || 'US').toUpperCase())
? `${houseNumber} ${street}`
: `${street} ${houseNumber}`;
}
/** List Photon candidates while typing. The submitted search owns navigation. */
export function createPlaceSuggester({
endpoint,
@@ -541,14 +308,7 @@ export function createPlaceSuggester({
const text = String(query ?? '')
.trim()
.slice(0, MAX_QUERY_CHARS);
// A line longer than a place's name is never sent: a pasted sentence
// or phrase is no place, and may be private in ways not read here.
if (
!enabled ||
text.length < minPlaceChars(text) ||
text.split(/\s+/).length > suggestMaxWords(text) ||
mayBePrivate(text)
)
if (!enabled || text.length < minPlaceChars(text) || mayBePrivate(text))
return [];
const language = (globalThis.document?.documentElement?.lang || 'en')
.slice(0, 2)
@@ -624,17 +384,11 @@ export function createPlaceSuggester({
type,
street,
housenumber: houseNumber,
locality,
district,
} = feature.properties ?? {};
// A house has no name of its own: its street (or, without one, its
// locality) and number are its name, written in the country's own
// order, so two houses on one street stay two places.
const address = houseAddress({
houseNumber,
street: street || locality || district || city,
countryCode,
});
// A house has no name of its own: its street and number are its
// name, so two houses on one street stay two places.
const address =
street && houseNumber ? `${houseNumber} ${street}` : '';
const name = normalized.name || address || city || state || country;
if (!name) continue;
const detail = [...new Set([city, state, country])]
+1 -193
View File
@@ -3,10 +3,8 @@ import test from 'node:test';
import {
citiesInRegion,
createPlaceSuggester,
houseAddress,
inExtent,
mayBePrivate,
onlyNumbersLookPrivate,
resetPlaceSuggestions,
} from './placeSuggestions.js';
@@ -396,6 +394,7 @@ test('streets named for keys, tokens and codes, and ZIP+4 after a state, are pla
'GATE CODE LANE',
'SECURITY CODE PLAZA',
'OTP Bank',
'MFA BOSTON',
'Auth Code ABCD Street',
'California 90210-1234',
'Austin Texas 78701-1234',
@@ -403,10 +402,7 @@ test('streets named for keys, tokens and codes, and ZIP+4 after a state, are pla
'12, 10115 Berlin',
])
assert.equal(mayBePrivate(line), false, line);
// All in capitals, a name cannot be told from a code: "MFA BOSTON" is
// kept back with "OTP ABCDEF".
for (const line of [
'MFA BOSTON',
'gate code: abcd',
'PIN A7B2',
'PIN is A7B2',
@@ -431,191 +427,3 @@ test('the same text asked again while its request is out is sent once', async ()
await Promise.all([service.suggest('Paris'), service.suggest('Paris')]);
assert.equal(sent, 1);
});
test('spelled-out emails, addresses, phrases, codes and short phone numbers stay private', () => {
for (const line of [
'john(at)gmail.com',
'john[at]gmail[dot]com',
'john at gmail dot de',
'10.0.0.1',
'abandon ability able about above absent absorb abstract absurd abuse access accident',
'Abandon ability able about above absent absorb abstract absurd abuse access accident acid',
'license ABC1234',
'passport X1234567',
'plate 7ABC123',
'otp ABCDEF',
'verification code abcdef',
'cvv abc',
'Bearer abcdef',
'Bearer Abcdefgh',
'Authorization: Bearer Xyz',
'glpat-abcdef123456',
'hf_abcdefghijk',
'SG.abcdefghij.klmnopqrstuv',
'https://x.com/?code=abcdef',
'code 4821',
'garage code 4821',
'lockbox 4821',
'the code to my door is 4821',
'AB 12 34 56 C',
'my id is AB12345',
'My ID 12345',
'john at gmail .com',
'john at gmail punto com',
'john.doe at example period com',
'j o h n @ g m a i l . c o m',
'ssn is 123456',
'ssn: xxx-xx-1234',
'Bearer: island',
'Bearer=lake',
'OTP ABCDEF',
'CVV ABC',
'Verification code ABC',
'PIN ABCD',
'passport:123456',
'ID:12345',
'abandon please abandon abandon abandon abandon abandon abandon abandon abandon abandon abstract',
'find abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon',
'lockbox number 4821',
'lockbox is 4821',
'ab 12 34 56 c',
'https://[::1]/',
'ssn 123',
'Jo 12345-6789',
'Joe 1234 12345 thanks',
'Mo 0171 12345',
])
assert.equal(mayBePrivate(line), true, line);
// A phone's three and four digits are not offered as an address.
assert.equal(onlyNumbersLookPrivate('is 555 0100 thanks'), false);
});
test('places that only looked private are looked up', () => {
for (const line of [
'Akiak',
'Bearer Island',
'SSN Station',
'Bearer Island, Canada',
'bearer island',
'Washington DC 20500-0003',
'東京都千代田区100-0001',
'Security Code Plaza',
'Idaho Falls',
'meet at 12:30:45',
'Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch',
'llanfairpwllgwyngyll',
'Boise ID 83702',
'Boise, ID 83702',
'Hayden ID 83835-1234',
'mfa boston',
'otp bank',
'security code plaza',
'zip code 90210',
'area code 415',
'Settipalle @ K.Bandarlapalle',
'boise ID 83702',
"Coeur d'Alene ID 83814",
'meet at West Point tomorrow',
'OTP Bank',
'GATE CODE LANE',
// Questions for the assistant, however many short words they have.
'can you tell where the most flights are going over texas today',
'are there any storms near florida right now that might cause delays',
'OTP Bank',
// A long request is not a recovery phrase.
'show flights over texas near austin with altitude above thirty thousand feet please',
'show fires near austin then show flights above texas with labels please',
])
assert.equal(mayBePrivate(line), false, line);
});
test('a house is named by its number and street in the order its country writes them', async () => {
assert.equal(
houseAddress({
houseNumber: '10',
street: 'Downing Street',
countryCode: 'gb',
}),
'10 Downing Street',
);
assert.equal(
houseAddress({
houseNumber: '12',
street: 'Hauptstraße',
countryCode: 'DE',
}),
'Hauptstraße 12',
);
assert.equal(houseAddress({ houseNumber: '12', street: '' }), '');
// Without a street, a house's number and its locality name it, so two
// houses in one hamlet stay two places, not the city twice.
const house = (number) => ({
geometry: { type: 'Point', coordinates: [11.2, 47.6] },
properties: {
housenumber: number,
locality: 'Mittenwald Au',
city: 'Mittenwald',
country: 'Germany',
countrycode: 'de',
osm_value: 'house',
},
});
const service = createPlaceSuggester({
endpoint: 'https://fixture.test/api/',
fetchImpl: async () =>
Response.json({ features: [house('3'), house('5')] }),
});
assert.deepEqual(
(await service.suggest('Mittenwald Au')).map((place) => place.name),
['Mittenwald Au 3', 'Mittenwald Au 5'],
);
});
test('codes, phones, tokens, emails and addresses in further shapes stay private', () => {
for (const line of [
// A phone's three and four digits after a name, as a postcode can't be
// told from it ("Shibuya 150-0002" is refused for that).
'Alice 555-0100',
'Shibuya 150-0002',
`${Array(23).fill('abandon').join(' ')} art`,
'Bearer Abcdefghijklmnopqrstuvwxyz',
'Bearer Island bearer abcdef',
'verification code Abc',
'verification code ABC',
'verification code abc thanks',
'PIN aBcD',
'gate code aBcD',
'john at gmail.com',
'john at gmail (dot) com',
'john at gmail [dot] com',
'john at gmail dot technology',
'passport number 123456',
'passport no. 123456',
'ID AB123',
'::1',
'fe80::1',
'2001:db8:0:0:0:0:2:1',
])
assert.equal(mayBePrivate(line), true, line);
});
test('a line longer than a place name is never sent for suggestions', async () => {
let sent = 0;
const service = createPlaceSuggester({
endpoint: 'https://fixture.test/api/',
fetchImpl: async () => {
sent++;
return Response.json({ features: [] });
},
});
assert.deepEqual(
await service.suggest('one two three four five six seven eight nine'),
[],
);
assert.equal(sent, 0);
// An address has more words: as many as the Omnibar reads as a place.
await service.suggest('350 Fifth Avenue, New York, NY 10118, United States');
assert.equal(sent, 1);
await service.suggest('1 2 3 4 5 6 7 8 9 10 11');
assert.equal(sent, 1);
});
+30 -3
View File
@@ -67,11 +67,26 @@ 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) {
/** The body class the welcome sets while BROWSE STORIES loads. */
const OPENING_STORIES = 'first-run-opening-stories';
/**
* True when a mutation can show or hide the Stories card (`#hPop`): the card
* itself coming or going, or the welcome that hides it (`#first-run-launcher`,
* and the body class it sets while BROWSE STORIES loads) ending.
*/
export function movesStoriesCard(record) {
if (record.type === 'attributes')
return (
(record.oldValue || '').split(/\s+/).includes(OPENING_STORIES) !==
record.target.classList.contains(OPENING_STORIES)
);
for (const list of [record.addedNodes, record.removedNodes])
for (const node of list)
if (node.id === 'hPop' || node.querySelector?.('#hPop')) return true;
if (
['hPop', 'first-run-launcher'].includes(node.id) ||
node.querySelector?.('#hPop, #first-run-launcher')
)
return true;
return false;
}
@@ -276,6 +291,18 @@ export class PanelLayoutController {
subtree: true,
childList: true,
});
const welcomeHost = document.querySelector('[data-gev-view="welcome"]');
if (welcomeHost)
this._storiesCardObserver.observe(welcomeHost, {
subtree: true,
childList: true,
});
if (document.body)
this._storiesCardObserver.observe(document.body, {
attributes: true,
attributeFilter: ['class'],
attributeOldValue: true,
});
this._storiesCardShownHandler = (event) => {
if (event.target?.id === 'hPop') this._scheduleRightPanelLayout();
};
+39
View File
@@ -878,3 +878,42 @@ test('left rail keeps collapsed panels shown beside Cockpit, still one open', ()
assert.equal(f.stack.classList.contains('layout-exclusive'), false);
assert.equal(f.first.getAttribute('aria-hidden'), undefined);
});
test('the right rail is laid out again when the Stories card can appear or go', async () => {
const { movesStoriesCard } = await import('./panelLayoutController.js');
const node = (id, inner = null) => ({
id,
querySelector: (selector) =>
inner && selector.split(', ').includes(`#${inner}`) ? {} : null,
});
const childList = (added = [], removed = []) => ({
type: 'childList',
addedNodes: added,
removedNodes: removed,
});
const bodyClass = (oldValue, now) => ({
type: 'attributes',
oldValue,
target: { classList: { contains: (name) => now.includes(name) } },
});
// The card itself, or a wrapper holding it, comes or goes.
assert.equal(movesStoriesCard(childList([node('hPop')])), true);
assert.equal(movesStoriesCard(childList([], [node('', 'hPop')])), true);
// The welcome, which hides the card, is removed.
assert.equal(
movesStoriesCard(childList([], [node('first-run-launcher')])),
true,
);
// Story playback's own changes do not lay the rail out.
assert.equal(movesStoriesCard(childList([node('story-frame')])), false);
// Only the welcome's loading class coming or going counts.
assert.equal(
movesStoriesCard(bodyClass('first-run-opening-stories', ['stories-mode'])),
true,
);
assert.equal(
movesStoriesCard(bodyClass('', ['first-run-opening-stories'])),
true,
);
assert.equal(movesStoriesCard(bodyClass('a', ['b'])), false);
});
+2 -2
View File
@@ -8,7 +8,7 @@ import { markRaw, shallowRef } from 'vue';
*/
export const useFirstRunStore = defineStore('gev-first-run', () => {
/**
* `{removed, shown, visible, closing, state, busy, status, description,
* `{removed, shown, visible, closing, state, busy, status,
* environmentalTitle, environmentalSub, scrollable}`, or null until the
* launcher is initialized (the card stays hidden).
*/
@@ -19,7 +19,7 @@ export const useFirstRunStore = defineStore('gev-first-run', () => {
launcher.value = next && markRaw(next);
}
/** `{choose(choice), dismiss(), suppress(wanted) → boolean}`, or null. */
/** `{choose(choice), dismiss(), suppress(wanted) → boolean, refreshLayout()}`, or null. */
const controls = shallowRef(null);
/** @param {?object} next The launcher's controls, or null to disconnect. */
File diff suppressed because it is too large. Load diff
+2 -8
View File
@@ -125,16 +125,10 @@ html[dir='rtl'] #command-dock :is(#location-bar, #control-panel) .dock-pin-btn {
}
/* The right rail sits on the left: its expand/collapse arrows point the
other way, and the start window's "go" arrows point along the reading
direction. */
html[dir='rtl'] #right-context-rail .panel-collapse-btn,
html[dir='rtl'] .first-run-arrow {
other way. (The first-run card flips its own arrow in first-run.css.) */
html[dir='rtl'] #right-context-rail .panel-collapse-btn {
transform: scaleX(-1);
}
html[dir='rtl'] .first-run-choices button:hover .first-run-arrow,
html[dir='rtl'] .first-run-choices button:focus-visible .first-run-arrow {
transform: translateX(-2px) scaleX(-1);
}
/* The cockpit is an aircraft panel, not page chrome: its windows keep their
physical sides, so the data-layer stack goes back to the left edge instead
+10
View File
@@ -9,6 +9,10 @@
* @param {() => boolean} options.isActive Whether this surface may handle input now.
* @param {() => void} options.onEscape Caller-owned dismissal action.
* @param {() => HTMLElement} [options.fallbackFocus] Return target if the opener is gone.
* @param {boolean} [options.claimOutsideFocus=true] Tab from a control outside
* the surface moves into it. False leaves Tab to the page then, for a
* surface that does not hold the keyboard (focus that has nowhere to be,
* on the page body, still moves in).
* @returns {{activate: Function, deactivate: Function, destroy: Function}}
*/
export function createSurfaceKeyboard({
@@ -17,6 +21,7 @@ export function createSurfaceKeyboard({
isActive,
onEscape,
fallbackFocus,
claimOutsideFocus = true,
}) {
let active = false;
let destroyed = false;
@@ -54,6 +59,11 @@ export function createSurfaceKeyboard({
// Allow native scrolling when cycling to an off-screen control in a short
// surface. Initial focus and return focus use the caller's separate policy.
if (!root.contains(focused)) {
const lost =
!focused ||
focused === documentRef.body ||
focused === documentRef.documentElement;
if (!claimOutsideFocus && !lost) return;
event.preventDefault();
(event.shiftKey ? last : first).focus();
} else if (event.shiftKey && focused === first) {
+19 -1
View File
@@ -2,7 +2,7 @@ import test from 'node:test';
import assert from 'node:assert/strict';
import { createSurfaceKeyboard } from './surfaceKeyboard.js';
function fixture() {
function fixture({ claimOutsideFocus } = {}) {
const listeners = new Set();
const documentRef = {
activeElement: null,
@@ -54,6 +54,7 @@ function fixture() {
isActive: () => visible,
onEscape: () => onEscape(),
fallbackFocus: () => fallback,
claimOutsideFocus,
});
opener.focus();
const event = (key, extra = {}) => ({
@@ -134,6 +135,23 @@ test('Tab enters from outside in either direction and wraps only at an edge', ()
);
});
test('a surface that does not claim outside focus leaves Tab to the page', () => {
const f = fixture({ claimOutsideFocus: false });
f.controller.activate();
// From a control outside (the search bar), Tab follows the page.
f.opener.focus();
assert.equal(f.send('Tab').defaultPrevented, false);
assert.equal(f.send('Tab', { shiftKey: true }).defaultPrevented, false);
assert.equal(f.documentRef.activeElement, f.opener);
// Focus with nowhere to be still moves in, and wraps inside as before.
f.documentRef.activeElement = null;
assert.equal(f.send('Tab').defaultPrevented, true);
assert.equal(f.documentRef.activeElement, f.first);
f.last.focus();
f.send('Tab');
assert.equal(f.documentRef.activeElement, f.first);
});
test('Tab uses current controls and skips hidden/disabled nodes without changing native middle movement', () => {
const f = fixture();
f.controller.activate();
+272 -47
View File
@@ -1,22 +1,142 @@
<script setup>
import { storeToRefs } from 'pinia';
import { nextTick, ref, watch } from 'vue';
import { msg, t } from '../../i18n/index.js';
import {
FIRST_RUN_TIP,
environmentalLabel,
} from '../../firstRunCopy.js';
import { FIRST_RUN_LINKS, environmentalLabel } from '../../firstRunCopy.js';
import { useFirstRunStore } from '../stores/firstRun.js';
import { useStoriesStore } from '../stores/stories.js';
// The launcher initFirstRunExperience presents, and the controls it connects.
const { launcher, controls } = storeToRefs(useFirstRunStore());
// The card stays hidden until it is initialized; these show in the markup.
const DESCRIPTION = msg(
'It feels like a forbidden cockpit—then you realize the sources are public and the data is real.',
);
const ENVIRONMENTAL_SUB = msg(
'Live earthquakes and active fires, from USGS and NASA',
);
// Where the visitor starts: a tile selects it, ENTER GOD MODE runs it. A clean
// globe unless they pick a mission.
const start = ref('explore');
const settling = ref(false);
function selectStart(choice) {
if (settling.value || launcher.value?.busy === 'true' || launcher.value?.closing) return;
start.value = choice;
}
// Three short steps instead of one dense card: mode, where to start, then the
// three things worth knowing. Back and Next move between them; Skip closes.
const STEPS = 3;
const step = ref(1);
const direction = ref('forward');
function go(next, event) {
if (event?.detail > 1) return;
if (settling.value || launcher.value?.busy === 'true' || launcher.value?.closing) return;
settling.value = true;
direction.value = next > step.value ? 'forward' : 'back';
step.value = Math.min(STEPS, Math.max(1, next));
}
// A press belongs to the step it began on: one begun while the steps were
// changing (and released after) runs nothing. Keyboard clicks (detail 0)
// have no press.
let pressedOn = null;
function onPrimaryDown() {
pressedOn = settling.value ? null : step.value;
}
// A quick second click still moves to the next step, so the button never
// looks dead; only the launch itself takes a single click, so a double click
// that began on NEXT never confirms the start it lands on.
function onPrimary(event) {
if (settling.value) return;
const pressed = pressedOn;
pressedOn = null;
if (event.detail >= 1 && pressed !== step.value) return;
if (step.value < STEPS) go(step.value + 1);
else if (event.detail <= 1) controls.value?.choose(start.value);
}
// GEV Stories opens in place: the card closes as Skip would, then Explore
// takes the globe. The Stories announcement stays hidden while Stories loads,
// so it does not flash up between the card closing and Explore opening; it is
// still not marked seen. The card is left out where Stories is not offered.
const stories = useStoriesStore();
let openingStories = false;
function openStories(event) {
if (event?.detail > 1) return;
if (settling.value || launcher.value?.busy === 'true' || launcher.value?.closing) return;
if (!stories.available || !stories.controller) return;
if (openingStories) return;
const body = globalThis.document?.body;
// Stories says at once whether it opens (it refuses while another mode
// holds the globe): only then does the card close, so a refusal never
// leaves nothing on screen.
const opening = stories.controller.open();
if (opening === false) return;
openingStories = true;
body?.classList.add('first-run-opening-stories');
controls.value?.dismiss();
Promise.resolve(opening)
.catch(() => {})
.finally(() => {
openingStories = false;
body?.classList.remove('first-run-opening-stories');
});
}
function onPrimaryKeydown(event) {
if (event.repeat) event.preventDefault();
}
function beforeStepEnter() {
globalThis.document?.querySelector('#first-run-launcher .first-run-choices')
?.scrollTo({ top: 0, behavior: 'instant' });
}
function afterStepEnter() {
settling.value = false;
controls.value?.refreshLayout();
}
// Keyboard users stay on the main action as the steps change.
watch(step, async () => {
await nextTick();
if (!launcher.value?.visible || launcher.value?.closing) return;
globalThis.document
?.querySelector('#first-run-launcher [data-first-run-primary]')
?.focus?.({ preventScroll: true });
});
const TITLES = [
msg('Welcome to God\'s Eye View'),
msg('Where do you want to start?'),
msg('Three things to know'),
];
const LEADS = [
msg('It feels like a forbidden cockpit—then you realize the sources are public and the data is real.'),
msg('Pick one to begin with. You can change everything later.'),
msg('That is all you need to get going.'),
];
// A callout opens from the chip's start edge unless that would run past the
// scrolling list, which clips it; then it opens from the end edge, and where
// neither side has room it narrows (and wraps) to the roomier side.
function alignCallout(event) {
const chip = event.target?.closest?.('[data-callout]');
const list = chip?.closest('.first-run-choices');
if (!chip || !list) return;
delete chip.dataset.calloutAlign;
chip.style.removeProperty('--first-run-callout-max');
const after = globalThis.getComputedStyle?.(chip, '::after');
const width = parseFloat(after?.width);
if (!Number.isFinite(width)) return;
const box = chip.getBoundingClientRect();
const bounds = list.getBoundingClientRect();
const inset = parseFloat(after.insetInlineStart) || 0;
const extra = ['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth']
.reduce((sum, key) => sum + (parseFloat(after[key]) || 0), 0);
const size = after.boxSizing === 'border-box' ? width : width + extra;
const rtl = globalThis.getComputedStyle?.(chip).direction === 'rtl';
const roomStart = rtl ? box.right - inset - bounds.left : bounds.right - box.left - inset;
const roomEnd = rtl ? bounds.right - box.left - inset : box.right - inset - bounds.left;
if (size <= roomStart) return;
if (roomEnd > roomStart) chip.dataset.calloutAlign = 'end';
if (size > Math.max(roomStart, roomEnd)) {
chip.style.setProperty('--first-run-callout-max', `${Math.floor(Math.max(roomStart, roomEnd))}px`);
}
}
// A refused save puts the box back where the stored preference is.
function onSuppress(event) {
const box = event.currentTarget;
@@ -25,62 +145,167 @@ function onSuppress(event) {
</script>
<template>
<!-- Explicit mission choice on a fresh session. Live feeds are not auto-enabled
<!-- Explicit first choice on a fresh session. Live feeds are not auto-enabled
until the visitor asks; shared links skip this surface entirely. It returns
every session until "Don't show this again" is ticked — see
src/firstRunExperience.js for the full show policy. -->
<!-- Tints the globe behind the card; click-through, so the card stays non-modal. -->
<div v-if="!launcher?.removed && launcher?.shown" class="first-run-backdrop" :class="{ visible: launcher?.visible }" aria-hidden="true"></div>
<aside v-if="!launcher?.removed" id="first-run-launcher" role="dialog" aria-labelledby="first-run-title" aria-describedby="first-run-description" :class="{ visible: launcher?.visible }" :hidden="!launcher?.shown" :aria-hidden="launcher?.closing ? 'true' : undefined" :aria-busy="launcher?.busy ?? undefined" :data-state="launcher?.state ?? undefined">
<div class="first-run-scanline" aria-hidden="true"></div>
<header class="first-run-header">
<span class="first-run-kicker">{{ t('MISSION CONTROL · FIRST LAUNCH') }}</span>
<ol role="img" class="first-run-dots" :aria-label="t('Step {step} of {total}', { step, total: STEPS })">
<li v-for="n in STEPS" :key="n" :class="{ on: n === step, done: n < step }" aria-hidden="true"></li>
</ol>
<!-- A button, not just a hint: phones and tablets have no ESC key. It
closes exactly as ESC does, for this session only. Touch screens
see SKIP; a keyboard sees SKIP · ESC (first-run.css). -->
<button type="button" class="first-run-dismiss" data-first-run-dismiss @click="controls?.dismiss()">
<span class="first-run-dismiss-key">{{ t('SKIP · ESC') }}</span>
<span class="first-run-dismiss-touch">{{ t('SKIP') }}</span>
</button>
</header>
<h2 id="first-run-title">{{ t('Choose your first view') }}</h2>
<!-- The card's one persuasive line, owner-authored and VERBATIM (2026-08-23)
— including the unspaced em dash. The arc it has to carry: this looks
like something you should not have access to → the sources are all
public → the data is real. Tile subcopy stays purely functional. -->
<p id="first-run-description">{{ launcher?.description ?? DESCRIPTION }}</p>
<h2 id="first-run-title">{{ t(TITLES[step - 1]) }}</h2>
<p class="first-run-step-announcement" role="status" aria-live="polite" aria-atomic="true">{{ t(TITLES[step - 1]) }}</p>
<p id="first-run-description">{{ t(LEADS[step - 1]) }}</p>
<div class="first-run-choices ui-scroll" :data-scrollable="launcher?.scrollable ?? undefined">
<button type="button" data-first-run-choice="contacts" :aria-disabled="launcher?.busy ?? undefined" @click="controls?.choose('contacts')">
<span class="material-symbols-outlined" aria-hidden="true">radar</span>
<span><strong>{{ t('LIVE CONTACTS') }}</strong><small>{{ t('Aircraft, vessels and nearby intelligence') }}</small></span>
<span class="material-symbols-outlined first-run-arrow" aria-hidden="true">arrow_forward</span>
</button>
<button type="button" data-first-run-choice="space-missions" :aria-disabled="launcher?.busy ?? undefined" @click="controls?.choose('space-missions')">
<span class="material-symbols-outlined" aria-hidden="true">rocket_launch</span>
<span><strong>{{ t('SPACE MISSIONS') }}</strong><small>{{ t('Launches, spacecraft and orbital context') }}</small></span>
<span class="material-symbols-outlined first-run-arrow" aria-hidden="true">arrow_forward</span>
</button>
<button type="button" data-first-run-choice="environmental" :aria-disabled="launcher?.busy ?? undefined" @click="controls?.choose('environmental')">
<span class="material-symbols-outlined" aria-hidden="true">local_fire_department</span>
<!-- The title is ENVIRONMENTAL_LABEL_CHOICE's label once initialized. -->
<!-- Subcopy names BOTH feeds this tile turns on, because the launcher
optimizes for the fully configured experience (owner ruling,
2026-08-23) — see the mission table in src/firstRunExperience.js. -->
<span><strong data-first-run-environmental-title>{{ launcher?.environmentalTitle ?? environmentalLabel().title }}</strong><small>{{ launcher?.environmentalSub ?? ENVIRONMENTAL_SUB }}</small></span>
<span class="material-symbols-outlined first-run-arrow" aria-hidden="true">arrow_forward</span>
</button>
<button type="button" class="first-run-explore" data-first-run-choice="explore" :aria-disabled="launcher?.busy ?? undefined" @click="controls?.choose('explore')">
<span class="material-symbols-outlined" aria-hidden="true">public</span>
<span><strong>{{ t('EXPLORE MANUALLY') }}</strong><small>{{ t('Begin with a clean globe') }}</small></span>
<span class="material-symbols-outlined first-run-arrow" aria-hidden="true">arrow_forward</span>
</button>
<Transition :name="`first-run-step-${direction}`" mode="out-in" @before-enter="beforeStepEnter" @after-enter="afterStepEnter">
<div v-if="step === 1" key="1" class="first-run-step">
<section class="first-run-section" aria-labelledby="first-run-mode-heading">
<h3 id="first-run-mode-heading" class="first-run-section-title">{{ t('Choose your mode') }}</h3>
<div class="first-run-modes" role="list" aria-labelledby="first-run-mode-heading">
<div class="first-run-mode" role="listitem" data-first-run-mode="god">
<div class="first-run-preview first-run-preview--god" aria-hidden="true"><i><svg class="first-run-globe" viewBox="0 0 64 64" fill="none" stroke="currentColor" stroke-width="1"><circle cx="32" cy="32" r="26" /><path d="M6 32h52M10 19h44M10 45h44" /><g class="first-run-meridians"><ellipse cx="32" cy="32" rx="26" ry="26" style="--m: 0" /><ellipse cx="32" cy="32" rx="26" ry="26" style="--m: 0.38" /><ellipse cx="32" cy="32" rx="26" ry="26" style="--m: 0.71" /><ellipse cx="32" cy="32" rx="26" ry="26" style="--m: 0.92" /></g></svg></i><svg class="first-run-callouts" viewBox="0 0 120 120" fill="none" stroke="currentColor" stroke-width="1"><path class="first-run-brackets" d="M8 18V8h10M102 8h10v10M112 102v10h-10M18 112H8v-10" /><circle class="first-run-orbit" cx="60" cy="60" r="34" /><g class="first-run-callout first-run-callout--a"><circle class="first-run-blip" cx="69" cy="50" r="1.6" /><circle class="first-run-ping" cx="69" cy="50" r="1.6" /><polyline class="first-run-leader" points="69,50 86,33 108,33" pathLength="1" /><path class="first-run-label" d="M88 29h18M88 37h11" /></g><g class="first-run-callout first-run-callout--b"><circle class="first-run-blip" cx="50" cy="71" r="1.6" /><circle class="first-run-ping" cx="50" cy="71" r="1.6" /><polyline class="first-run-leader" points="50,71 33,88 12,88" pathLength="1" /><path class="first-run-label" d="M14 84h18M14 92h11" /></g><g class="first-run-time"><line class="first-run-time-track" x1="26" y1="106" x2="94" y2="106" /><path class="first-run-time-ticks" d="M26 104v4 M34.5 105v2 M43 104v4 M51.5 105v2 M60 104v4 M68.5 105v2 M77 104v4 M85.5 105v2 M94 104v4" /><line class="first-run-time-played" x1="26" y1="106" x2="94" y2="106" /><g class="first-run-time-head"><line x1="26" y1="101" x2="26" y2="111" /><path d="M24 100h4l-2 2.5z" /></g></g></svg></div>
<div class="first-run-mode-body">
<p class="first-run-mode-title"><strong>{{ t('God') }}</strong> <span class="first-run-tag">{{ t('FUN') }}</span></p>
<p class="first-run-mode-copy">{{ t('The spy-satellite keyhole: circular viewport, tactical HUD, cinematic camera. For exploring.') }}</p>
<ul class="first-run-mode-points">
<li>{{ t('Keyhole HUD') }}</li>
<li>{{ t('Visual presets') }}</li>
</ul>
</div>
<span class="first-run-radio" aria-hidden="true"></span>
</div>
<div class="first-run-mode" role="listitem" data-first-run-mode="analyst">
<div class="first-run-preview first-run-preview--analyst" aria-hidden="true"><i></i></div>
<div class="first-run-mode-body">
<p class="first-run-mode-title"><strong>{{ t('Analyst') }}</strong> <span class="first-run-tag first-run-tag--soon">{{ t('COMING SOON') }}</span></p>
<p class="first-run-mode-copy">{{ t('A cleaner, readable view where every value shows its source. For research and reporting.') }}</p>
</div>
<span class="first-run-radio" aria-hidden="true"></span>
</div>
</div>
</section>
</div>
<div v-else-if="step === 2" key="2" class="first-run-step">
<section class="first-run-section" aria-labelledby="first-run-start-heading">
<h3 id="first-run-start-heading" class="first-run-section-title">{{ t('Start with') }}</h3>
<div class="first-run-missions first-run-missions--tiles" role="group" aria-labelledby="first-run-start-heading">
<button type="button" data-first-run-start="space-missions" :aria-pressed="String(start === 'space-missions')" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="selectStart('space-missions')">
<span class="material-symbols-outlined" aria-hidden="true">rocket_launch</span>
<span><strong>{{ t('SPACE MISSIONS') }}</strong><small>{{ t('Launches, spacecraft and orbital context') }}</small></span>
</button>
<button type="button" data-first-run-start="environmental" :aria-pressed="String(start === 'environmental')" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="selectStart('environmental')">
<span class="material-symbols-outlined" aria-hidden="true">local_fire_department</span>
<!-- The title is ENVIRONMENTAL_LABEL_CHOICE's label once initialized. -->
<!-- Subcopy names BOTH feeds this tile turns on, because the launcher
optimizes for the fully configured experience (owner ruling,
2026-08-23) — see the mission table in src/firstRunExperience.js. -->
<span><strong data-first-run-environmental-title>{{ launcher?.environmentalTitle ?? environmentalLabel().title }}</strong><small>{{ launcher?.environmentalSub ?? t(ENVIRONMENTAL_SUB) }}</small></span>
</button>
<button type="button" data-first-run-start="explore" :aria-pressed="String(start === 'explore')" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="selectStart('explore')">
<span class="material-symbols-outlined" aria-hidden="true">public</span>
<span><strong>{{ t('EXPLORE MANUALLY') }}</strong><small>{{ t('Begin with a clean globe') }}</small></span>
</button>
</div>
</section>
</div>
<div v-else key="3" class="first-run-step">
<ul class="first-run-tips">
<li class="first-run-tip first-run-tip--search">
<span class="first-run-tip-art" aria-hidden="true"><span class="material-symbols-outlined">search</span><i class="first-run-tip-caret"></i></span>
<strong>{{ t('Search places') }}</strong>
<small>{{ t('Type a place into the search bar.') }}</small>
</li>
<li class="first-run-tip first-run-tip--layers">
<span class="first-run-tip-art" aria-hidden="true"><span class="material-symbols-outlined">layers</span><i class="first-run-tip-dot"></i></span>
<strong>{{ t('Turn on layers') }}</strong>
<small>{{ t('Turn layers on to see flights, ships, cameras, weather and more.') }}</small>
</li>
<li class="first-run-tip first-run-tip--context">
<span class="first-run-tip-art" aria-hidden="true"><span class="material-symbols-outlined">my_location</span><i class="first-run-tip-ring"></i></span>
<strong>{{ t('Click anything') }}</strong>
<small>{{ t('Select a map item to see its details.') }}</small>
</li>
</ul>
<section class="first-run-section" aria-labelledby="first-run-deeper-heading">
<h3 id="first-run-deeper-heading" class="first-run-section-title">{{ t('Go deeper') }}</h3>
<div v-if="stories.available" class="first-run-link-card first-run-stories">
<div class="first-run-preview first-run-preview--stories" aria-hidden="true"><span class="material-symbols-outlined">movie</span></div>
<div class="first-run-link-body">
<p class="first-run-mode-title"><strong translate="no">GEV Stories</strong> <span class="first-run-tag">{{ t('NEW') }}</span></p>
<p class="first-run-mode-copy">{{ t('Curated, interactive views of what is happening on Earth. Play one, take over the map whenever you like, then pick the story back up.') }}</p>
</div>
<button type="button" class="first-run-link-button" data-first-run-stories :aria-disabled="String(settling || launcher?.busy === 'true')" @click="openStories">{{ t('BROWSE STORIES') }}</button>
</div>
</section>
<section class="first-run-section" aria-labelledby="first-run-more-heading">
<h3 id="first-run-more-heading" class="first-run-section-title">{{ t('More from Halfpixel') }}</h3>
<div class="first-run-link-row first-run-link-row--chips" @pointerover="alignCallout" @focusin="alignCallout">
<a class="first-run-link-card first-run-link-card--quiet" :href="FIRST_RUN_LINKS.youtube" :data-callout="t('Bilawal on YouTube')" target="_blank" rel="noopener noreferrer">
<span class="first-run-link-badge" aria-hidden="true">▶</span>
<span class="first-run-link-body"><strong translate="no">YouTube</strong></span>
</a>
<a class="first-run-link-card first-run-link-card--quiet" :href="FIRST_RUN_LINKS.x" :data-callout="t('Bilawal on {site}', { site: 'X' })" target="_blank" rel="noopener noreferrer">
<span class="first-run-link-badge" aria-hidden="true">X</span>
<span class="first-run-link-body"><strong translate="no">X</strong></span>
</a>
<a class="first-run-link-card first-run-link-card--quiet" :href="FIRST_RUN_LINKS.instagram" :data-callout="t('Bilawal on {site}', { site: 'Instagram' })" target="_blank" rel="noopener noreferrer">
<span class="first-run-link-badge" aria-hidden="true">IG</span>
<span class="first-run-link-body"><strong translate="no">Instagram</strong></span>
</a>
<a class="first-run-link-card first-run-link-card--quiet" :href="FIRST_RUN_LINKS.linkedin" :data-callout="t('Bilawal on {site}', { site: 'LinkedIn' })" target="_blank" rel="noopener noreferrer">
<span class="first-run-link-badge" aria-hidden="true">in</span>
<span class="first-run-link-body"><strong translate="no">LinkedIn</strong></span>
</a>
<a class="first-run-link-card first-run-link-card--quiet" :href="FIRST_RUN_LINKS.website" :data-callout="t('Bilawal\'s website')" target="_blank" rel="noopener noreferrer">
<span class="first-run-link-badge" aria-hidden="true">B</span>
<span class="first-run-link-body"><strong translate="no">bilawal.ai</strong></span>
</a>
<a class="first-run-link-card first-run-link-card--quiet" :href="FIRST_RUN_LINKS.halfpixel" :data-callout="t('The studio behind GEV')" target="_blank" rel="noopener noreferrer">
<span class="first-run-link-badge" aria-hidden="true">HP</span>
<span class="first-run-link-body"><strong translate="no">halfpixel.ai</strong></span>
</a>
<a class="first-run-link-card first-run-link-card--quiet" :href="FIRST_RUN_LINKS.source" target="_blank" rel="noopener noreferrer" :data-callout="t('Open source. Self-host, fork, add a layer.')">
<span class="first-run-link-badge" aria-hidden="true">&lt;/&gt;</span>
<span class="first-run-link-body"><strong translate="no">GitHub</strong></span>
</a>
</div>
</section>
</div>
</Transition>
</div>
<div class="first-run-footer">
<label class="first-run-suppress">
<input type="checkbox" data-first-run-suppress @change="onSuppress" />
<span>{{ t('Don\'t show this again') }}</span>
</label>
<!-- A button, not just a hint: phones and tablets have no ESC key. It
closes exactly as ESC does, for this session only. Touch screens
see DISMISS; a keyboard keeps the ESC hint (first-run.css). -->
<button type="button" class="first-run-dismiss" data-first-run-dismiss @click="controls?.dismiss()">
<span class="first-run-dismiss-key">{{ t('ESC to dismiss') }}</span>
<span class="first-run-dismiss-touch">{{ t('DISMISS') }}</span>
<!-- The status line: empty until a mission reports progress or an
error. It sits in the footer row, so it never changes the card's
height. -->
<p class="first-run-note" data-first-run-status role="status" aria-live="polite">{{ launcher?.status ?? '' }}</p>
<!-- The card's main action: God mode, starting where the selected tile
says (a clean globe by default). -->
<button v-if="step > 1" type="button" class="first-run-back" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="go(step - 1, $event)">{{ t('BACK') }}</button>
<button type="button" class="first-run-enter" :data-first-run-choice="step === STEPS ? start : undefined" :data-first-run-next="step < STEPS ? '' : undefined" data-first-run-primary aria-describedby="first-run-title first-run-description" @pointerdown="onPrimaryDown" @keydown.enter="onPrimaryKeydown" :aria-disabled="String(settling || launcher?.busy === 'true')" @click="onPrimary">
{{ step < STEPS ? t('NEXT') : t('ENTER GOD MODE') }} <span class="material-symbols-outlined" aria-hidden="true">arrow_forward</span>
</button>
</div>
<!-- Kept out of the footer row: it swaps to mission progress and errors, and
a live region that also holds layout makes the row jump as it speaks. -->
<p class="first-run-note" data-first-run-status role="status" aria-live="polite">{{ launcher?.status ?? FIRST_RUN_TIP }}</p>
</aside>
</template>