Merge origin/main into german/navara

Conflict resolutions:
- src/main.js: upstream's PHOTON_URL place-search setting is read once at
  module level and passed as geospatial: { endpoints: { photon } } by
  createApplication(), so every engine start of the switch flow gets it; the
  old single top-level createStandaloneApplication() call stays removed.
- src/layers/bikeshare/render/cesium/rendering.js: upstream's
  publishedCapacity fix applied with this branch's
  resolveCapacity(model, capacity, status) signature. The same fix is ported
  to src/layers/bikeshare/render/navara.js (record.publishedCapacity, status
  polls resolve from it), with a Navara regression test; upstream's
  proxyRoute test imports the moved render/cesium/rendering.js.
- src/layers/traffic/flow.js: upstream's nextTask() yield and current()
  check kept before the scene is taken from this branch's
  _trafficScene?.() ?? _viewer?.scene with its missing-scene return.
- scripts/package-boundaries.json, scripts/format-scope.json: union of both
  sides' file lists.
- src/voice/actionSchemas.test.mjs: both history comments kept, payload hash
  recomputed for the merged schemas (Sentinel-2 map stack enum plus the
  shorter layer alias hint).
- src/hudAltitudeDatum.test.mjs: this branch's engine-based IntelHUD
  construction with upstream's placeLabels summary context.
This commit is contained in:
German Khokhlov committed 2026-11-03 15:36:06 +04:00
commit 1a1eef0e5c
494 files changed
+28358 -1361

No files matched your search

+61 -21
View File
@@ -88,13 +88,20 @@ const PANEL_GROUPS = [
'weather-cyclones',
],
},
// Directions renders in the Utilities panel, beside Draw and Import, and
// needs no heading there.
{
label: msg('Utilities'),
ids: ['directions', 'radio'],
ids: ['directions'],
containerId: 'utilities-toggles',
},
{
label: msg('Audio'),
ids: ['radio'],
},
];
const PANEL_ORDER = PANEL_GROUPS.flatMap(({ label, ids }) =>
ids.map((id) => ({ id, label })),
const PANEL_ORDER = PANEL_GROUPS.flatMap(({ label, ids, containerId }) =>
ids.map((id) => ({ id, label, containerId })),
);
const PANEL_POSITIONS = new Map(
PANEL_ORDER.map(({ id }, index) => [id, index]),
@@ -264,6 +271,8 @@ export class LayerPanel {
this._generation = 0;
this._removers = [];
this._destroyed = false;
/** @type {Map<string, HTMLElement>} lists of their own, by element id */
this._groupContainers = new Map();
this._cancelRowControlsRefresh = null;
this._recentImageryFactory = null;
this._recentImageryPanel = null;
@@ -277,9 +286,21 @@ export class LayerPanel {
this._releaseBindings();
if (this._toggleContainer && this._toggleContainer !== container)
renderVue(null, this._toggleContainer);
for (const element of this._groupContainers.values())
renderVue(null, element);
// The rows replace whatever the container held before.
if (container && !container._vnode) container.replaceChildren();
this._toggleContainer = container;
// A group with a list of its own (Directions in Utilities) renders there;
// without that list it stays in Data Layers under its heading.
this._groupContainers = new Map();
for (const { containerId } of PANEL_GROUPS) {
const element =
containerId && container?.ownerDocument?.getElementById?.(containerId);
if (!element) continue;
if (!element._vnode) element.replaceChildren();
this._groupContainers.set(containerId, element);
}
this._weatherPanel?.destroy();
this._weatherPanel = createWeatherPanel({
clock: this.weatherClock,
@@ -335,6 +356,9 @@ export class LayerPanel {
this._recentImageryPanel = null;
this._recentImageryFactory = null;
if (this._toggleContainer) renderVue(null, this._toggleContainer);
for (const element of this._groupContainers.values())
renderVue(null, element);
this._groupContainers = new Map();
this._toggleContainer = null;
}
_renderToggles() {
@@ -358,9 +382,15 @@ export class LayerPanel {
const group =
PANEL_ORDER[PANEL_POSITIONS.get(layer.id)]?.label ??
msg('Other layers');
if (group && group !== previousGroup)
const containerId =
PANEL_ORDER[PANEL_POSITIONS.get(layer.id)]?.containerId;
const container = this._groupContainers.has(containerId)
? containerId
: null;
// A group in a list of its own needs no heading there.
if (!container && group && group !== previousGroup)
this._rows.push({ key: `group:${group}`, heading: group });
previousGroup = group;
previousGroup = container ? '' : group;
const readout = Boolean(this._rowControlsFor(layer.id)?.readout);
const controls = this.hasRowControls(layer.id);
if (controls) {
@@ -375,6 +405,7 @@ export class LayerPanel {
this._rows.push({
key: layer.id,
id: layer.id,
container,
count: !readout,
controls: controls && !readout,
info: false,
@@ -395,23 +426,32 @@ export class LayerPanel {
_paint() {
if (this._destroyed || this._suspended || !this._toggleContainer) return;
const layers = new Map(this.getAll().map((layer) => [layer.id, layer]));
const items = this._rows.map((row) => {
if (row.heading) return { key: row.key, heading: t(row.heading) };
const layer = layers.get(row.id);
if (layer) this._rowViews.set(row.id, this._presentRow(row, layer));
return this._rowViews.get(row.id);
});
// Each list renders its own rows: Data Layers, and any group's own list.
const lists = new Map([[null, []]]);
for (const id of this._groupContainers.keys()) lists.set(id, []);
for (const row of this._rows) {
let item;
if (row.heading) item = { key: row.key, heading: t(row.heading) };
else {
const layer = layers.get(row.id);
if (layer) this._rowViews.set(row.id, this._presentRow(row, layer));
item = this._rowViews.get(row.id);
}
if (item) lists.get(row.container ?? null).push(item);
}
const generation = this._generation;
renderVue(
h(LayerRows, {
items: items.filter(Boolean),
onToggle: (id) => this._toggle(id, generation),
onChip: (id, chipId) => this._selectChip(id, chipId, generation),
onListItem: (id, itemId) =>
this._selectListItem(id, itemId, generation),
}),
this._toggleContainer,
);
for (const [id, items] of lists)
renderVue(
h(LayerRows, {
items,
onToggle: (layerId) => this._toggle(layerId, generation),
onChip: (layerId, chipId) =>
this._selectChip(layerId, chipId, generation),
onListItem: (layerId, itemId) =>
this._selectListItem(layerId, itemId, generation),
}),
id === null ? this._toggleContainer : this._groupContainers.get(id),
);
}
_presentRow(row, layer) {