@graview/pages 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ import { type PageWhere } from "./one-place-geometry.js";
2
2
  import type { OnePlaceCityProps } from "./one-place.js";
3
3
  /** How long one level's move takes. A person who asked for less motion is cut straight there. */
4
4
  export declare const MOVE_MS = 560;
5
- export declare function OnePlaceCity({ where, out, sheet, connected, boards, current, boardEls, boardLayer, fab, view, lessMotion, resolve, openRecord, openKind, onGround, motion, onAltitude }: OnePlaceCityProps): import("react").JSX.Element;
5
+ export declare function OnePlaceCity({ where, out, sheet, connected, boards, current, boardEls, boardLayer, fab, view, lessMotion, resolve, openRecord, openKind, onGround, motion, onAltitude, sceneRules }: OnePlaceCityProps): import("react").JSX.Element;
6
6
  export type { PageWhere };
7
7
  /** The one kind a view stands on: a kind's list, or a view of one kind; null for the home, a view of several kinds and the connections. */
8
8
  export declare function signKindOf(where: PageWhere): string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"one-place-city.d.ts","sourceRoot":"","sources":["../src/one-place-city.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAmY,KAAK,SAAS,EAAc,MAAM,yBAAyB,CAAC;AACtc,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAwFxD,iGAAiG;AACjG,eAAO,MAAM,OAAO,MAAM,CAAC;AA6C3B,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,iBAAiB,+BAqrD1M;AAED,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,2IAA2I;AAC3I,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAI1D"}
1
+ {"version":3,"file":"one-place-city.d.ts","sourceRoot":"","sources":["../src/one-place-city.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAmY,KAAK,SAAS,EAAc,MAAM,yBAAyB,CAAC;AACtc,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAsGxD,iGAAiG;AACjG,eAAO,MAAM,OAAO,MAAM,CAAC;AA6C3B,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,iBAAiB,+BA0xDtN;AAED,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,2IAA2I;AAC3I,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAI1D"}
@@ -3,6 +3,7 @@ import { labelOf, ONE_FACE_LAYERS } from "@graview/core";
3
3
  import { RECORD_BOXES_ATTRIBUTE, RECORD_BOXES_MOVED, recordBoxesOf } from "@graview/core/record-boxes";
4
4
  import { EMPTY_VIEW, toUrl, withOverview } from "@graview/layout/view";
5
5
  import { Scene } from "@graview/react";
6
+ import { sceneCss } from "@graview/primitives/scene";
6
7
  import { useGraview, useNavigation, useViolations } from "@graview/react/provider";
7
8
  import { useOneFace } from "./one-place-control.js";
8
9
  import { useEffect, useLayoutEffect, useMemo, useRef } from "react";
@@ -87,6 +88,20 @@ const zoomNowOf = (cam) => cam.zoom().toFixed(4);
87
88
  const MOST_LINES = 40;
88
89
  /** As many lines into one district as this, and they are one line into it with their count on it. */
89
90
  const GATHER = 4;
91
+ /** How far inside a phone's sheet a line goes up its side to the top edge: in the sheet's own margin, clear of its words. */
92
+ const SHEET_SIDE = 6;
93
+ /**
94
+ * The furthest from its row a line in a view runs along a gap. The page
95
+ * cannot read a view's words, so this is a guess at a row's own spacing (a
96
+ * pill's margin): words set closer under a row than this are crossed.
97
+ */
98
+ const FRAMED_GAP = 4;
99
+ /** And on a phone's page: a group's label stands a few pixels over its row of pills, and a line along the gap over the row passes under its words. */
100
+ const PHONE_GAP = 2.5;
101
+ /** How far inside the city's side the home keeps its views' districts while bringing the city to the middle: a district's edge never on the window's or the sheet's. */
102
+ const HOME_EDGE = 8;
103
+ /** How far from its own district a name may stand beside a page, edge to edge: a name's height and a little air. Past it, a name reads as another district's. */
104
+ const NAME_REACH = 32;
90
105
  /** What a district's "+n" is kept under among the picture's buildings: never a record's id. */
91
106
  const REST_KEY = "\u0000rest:";
92
107
  /** How long one level's move takes. A person who asked for less motion is cut straight there. */
@@ -105,7 +120,14 @@ const clamp01 = (t) => Math.max(0, Math.min(1, t));
105
120
  const sameIds = (a, b) => a.length === b.length && a.every((id, at) => id === b[at]);
106
121
  /** Whether a point stands inside a box. */
107
122
  const inside = (p, box) => p.x >= box.x && p.x <= box.x + box.width && p.y >= box.y && p.y <= box.y + box.height;
108
- export function OnePlaceCity({ where, out, sheet, connected, boards, current, boardEls, boardLayer, fab, view, lessMotion, resolve, openRecord, openKind, onGround, motion, onAltitude }) {
123
+ export function OnePlaceCity({ where, out, sheet, connected, boards, current, boardEls, boardLayer, fab, view, lessMotion, resolve, openRecord, openKind, onGround, motion, onAltitude, sceneRules }) {
124
+ /*
125
+ * THE SCENE'S OWN RULES, where the host's sheet has none (the embed's
126
+ * frame writes `themeBaseCss`): fetched with this part, after the page's
127
+ * first draw, so they are never in its first load, and written before
128
+ * the city's own, where `themeCss` has them.
129
+ */
130
+ const sceneSheet = useMemo(() => (sceneRules ? sceneCss(sceneRules.scheme, sceneRules.scope === undefined ? {} : { scope: sceneRules.scope }) : null), [sceneRules?.scheme, sceneRules?.scope]);
109
131
  const { store } = useGraview();
110
132
  const { view: seen, go } = useNavigation();
111
133
  const box = useRef(null);
@@ -517,6 +539,8 @@ export function OnePlaceCity({ where, out, sheet, connected, boards, current, bo
517
539
  key: board.key,
518
540
  kind: board.where.type === "record" ? board.where.kind : signKindOf(board.where),
519
541
  building: board.where.type === "record" && w.buildings.has(board.where.id) ? onScreen(w.buildings.get(board.where.id)) : null,
542
+ // Beside a page, where the city's side is narrow, the app's views stand before the kinds' own lists: a view whose district is in sight keeps its board. Under the page too, so a move from it to Nearby carries each board from a place in the same order, never a leap halfway.
543
+ first: lvl !== CITY && board.where.type === "place",
520
544
  }));
521
545
  const reserved = footNow().now.map((box) => ({ x: box.x - 6, y: box.y - 6, width: box.width + 12, height: box.height + 12 }));
522
546
  const round = (n) => Math.round(n / 2) * 2;
@@ -552,6 +576,8 @@ export function OnePlaceCity({ where, out, sheet, connected, boards, current, bo
552
576
  ...(lvl === PANEL ? { least: boardLeast(view) } : {}),
553
577
  // Beside the page the plaza is behind the city: only the views that stand on a district stand there.
554
578
  plaza: lvl !== PANEL,
579
+ // Beside a page (and under it, so a move to Nearby carries each name from a place found the same way) each district's name stands right after the views, before the kinds' lists, and beside its own district or nowhere.
580
+ ...(lvl !== CITY ? { namesFirst: true, nameReach: NAME_REACH } : {}),
555
581
  });
556
582
  kept = { key, origin, placed };
557
583
  }
@@ -703,15 +729,21 @@ export function OnePlaceCity({ where, out, sheet, connected, boards, current, bo
703
729
  return plot ? [plot] : [];
704
730
  }));
705
731
  const what = own ?? city;
732
+ /*
733
+ * THE CITY AS NEAR THE MIDDLE OF ITS SIDE AS ITS VIEWS' DISTRICTS
734
+ * LET IT, they in the side whole: at the zoom that fits them where
735
+ * they fit on their own (a small phone's strip over the sheet), else
736
+ * as far out as the camera goes. Fitted on them alone, the city stood
737
+ * off to one side of a narrow strip with room to come to its middle.
738
+ */
706
739
  const close = fitCamera(what, shown, 16, s);
707
- if (close.s >= least)
708
- return close;
709
- // As far out as the camera goes: the city as near the middle of its side as its views' districts let it, they in the side whole.
710
- const held = cameraPutting(middle(city), middle(shown), least);
740
+ const held = cameraPutting(middle(city), middle(shown), Math.max(close.s, least));
711
741
  const lo = project(held, { x: what.x, y: what.y });
712
742
  const hi = project(held, { x: what.x + what.width, y: what.y + what.height });
713
743
  const shift = (low, high, from, to) => (low < from ? from - low : high > to ? to - high : 0);
714
- return { s: held.s, x: held.x + shift(lo.x, hi.x, shown.x, shown.x + shown.width), y: held.y + shift(lo.y, hi.y, shown.y, shown.y + shown.height) };
744
+ // Kept a little off the side's edge, as the fit is: never so far in that the city could come nearer the middle than it does.
745
+ const keep = HOME_EDGE;
746
+ return { s: held.s, x: held.x + shift(lo.x, hi.x, shown.x + keep, shown.x + shown.width - keep), y: held.y + shift(lo.y, hi.y, shown.y + keep, shown.y + shown.height - keep) };
715
747
  }
716
748
  }
717
749
  if (lvl === CITY || now.where.type === "home" || now.where.type === "overview") {
@@ -1334,7 +1366,8 @@ export function OnePlaceCity({ where, out, sheet, connected, boards, current, bo
1334
1366
  const asked = [];
1335
1367
  /** Every part's box on the page in sight: what a line inside the page goes round. */
1336
1368
  const words = [];
1337
- const offer = (target, part, visible, partBox) => {
1369
+ // `framed`: drawn by a view (a worker view, a frame), whose words between its records the page cannot read.
1370
+ const offer = (target, part, visible, partBox, framed = false) => {
1338
1371
  const key = target.type === "record" ? target.id : `kind:${target.kind}`;
1339
1372
  // Only what is in sight on the page: a part scrolled past, or under the page's own edge, draws none.
1340
1373
  if (part.x < visible.left || part.x > visible.right || part.y < visible.top || part.y > visible.bottom)
@@ -1347,7 +1380,7 @@ export function OnePlaceCity({ where, out, sheet, connected, boards, current, bo
1347
1380
  if (!end)
1348
1381
  return;
1349
1382
  taken.add(key);
1350
- asked.push({ key, target, part, box: partBox, visible, end });
1383
+ asked.push({ key, target, part, box: partBox, visible, end, framed });
1351
1384
  };
1352
1385
  /* The record page drawn by a view that names no other record: where its one line to the record leaves from. */
1353
1386
  let aboutPart = null;
@@ -1384,7 +1417,7 @@ export function OnePlaceCity({ where, out, sheet, connected, boards, current, bo
1384
1417
  continue;
1385
1418
  }
1386
1419
  named = true;
1387
- offer({ type: "record", id: box.id }, part, visible, partBox);
1420
+ offer({ type: "record", id: box.id }, part, visible, partBox, true);
1388
1421
  }
1389
1422
  if (!named && subjectId !== null && aboutPart === null) {
1390
1423
  // From the middle of what is in sight of it, or the record's own part where it drew one.
@@ -1424,47 +1457,127 @@ export function OnePlaceCity({ where, out, sheet, connected, boards, current, bo
1424
1457
  * into the gap above or below its row — the one toward where it is
1425
1458
  * going first — runs along it to the edge, and goes on from there.
1426
1459
  * Lines along one gap stand a pixel or two apart.
1460
+ *
1461
+ * ON A PHONE THE SAME, toward the sheet's top edge: along the gap to
1462
+ * the sheet's side, clear of its words, and up that side to the top —
1463
+ * never straight up across the rows above.
1464
+ *
1465
+ * IN A VIEW (a worker view, a frame) the page cannot read the words
1466
+ * between its records: the middle of a gap between two rows may be a
1467
+ * paragraph (Graview Cloud's Family tree, where the lines from a pill
1468
+ * row rose into the paragraph above it and drew a box through it). A
1469
+ * line there takes the gap below its row first, and keeps to its
1470
+ * row's own edge — never further from it than the rows' own spacing —
1471
+ * so it never runs along a gap that holds words. On a phone it never
1472
+ * goes straight up through them either.
1427
1473
  */
1428
1474
  const hits = (a, b, own) => words.some((o) => o !== own && Math.max(a.x, b.x) > o.x + 1 && Math.min(a.x, b.x) < o.x + o.width - 1 && Math.max(a.y, b.y) > o.y + 1 && Math.min(a.y, b.y) < o.y + o.height - 1);
1429
1475
  const edgeX = pageRect.x;
1476
+ /** Something standing on the sheet's top edge there (the control riding on it): a line up that side would leave the edge somewhere else. */
1477
+ const standsOnTheEdge = (x) => reserved.some((box) => x >= box.x - 3 && x <= box.x + box.width + 3 && box.y + box.height >= pageRect.y - 43 && box.y - 3 <= pageRect.y);
1478
+ const districtOf = (target) => (target.type === "record" ? (store.graph.getNode(target.id)?.kind ?? null) : target.kind);
1479
+ /*
1480
+ * ON A PHONE, ONE RISER A DISTRICT (Graview Cloud's Deep Time, the
1481
+ * Cretaceous at 390: each row's line rose up the sheet's edge on its
1482
+ * own, ten verticals side by side). Every line into one district runs
1483
+ * along its row to the same place in the sheet's margin and goes up
1484
+ * as one. The district whose lines start lowest goes up outermost, so
1485
+ * no run along a row above crosses another district's riser.
1486
+ */
1487
+ const risers = new Map();
1488
+ if (phone) {
1489
+ const right = pageRect.x + pageRect.width;
1490
+ const onRight = !standsOnTheEdge(right - SHEET_SIDE) || standsOnTheEdge(pageRect.x + SHEET_SIDE);
1491
+ const lowest = new Map();
1492
+ for (const one of asked) {
1493
+ const kind = districtOf(one.target);
1494
+ if (kind)
1495
+ lowest.set(kind, Math.max(lowest.get(kind) ?? -Infinity, one.part.y));
1496
+ }
1497
+ const order = [...lowest.keys()].sort((p, q) => lowest.get(q) - lowest.get(p));
1498
+ const apart = order.length > 1 ? Math.min(3, (2 * SHEET_SIDE - 2) / (order.length - 1)) : 0;
1499
+ order.forEach((kind, rank) => risers.set(kind, onRight ? right - 2 - rank * apart : pageRect.x + 2 + rank * apart));
1500
+ }
1430
1501
  const wayIn = (one) => {
1431
1502
  const b = one.box;
1432
1503
  const from = leaveFrom(one.part, pageRect, phone);
1433
1504
  const straight = phone ? { x: one.part.x, y: Math.max(b.y, one.visible.top, from.y) } : { x: Math.max(b.x, one.visible.left, from.x), y: one.part.y };
1434
- if (phone || !hits(straight, from, b))
1435
- return { via: [straight, from], gap: null };
1436
- const beside = words.filter((o) => o !== b && o.x < b.x + b.width && o.x + o.width > edgeX);
1437
- const above = beside.filter((o) => o.y + o.height <= b.y + 1).reduce((most, o) => Math.max(most, o.y + o.height), -Infinity);
1438
- const below = beside.filter((o) => o.y >= b.y + b.height - 1).reduce((least, o) => Math.min(least, o.y), Infinity);
1439
- const gaps = [
1440
- { y: Number.isFinite(above) ? (above + b.y) / 2 : b.y - 4, leave: b.y },
1441
- { y: Number.isFinite(below) ? (b.y + b.height + below) / 2 : b.y + b.height + 4, leave: b.y + b.height },
1442
- ].filter((g) => g.y > one.visible.top && g.y < one.visible.bottom);
1443
- // Toward where it is going first: up for a building above the part, down for one below.
1444
- if (one.end.at.y > one.part.y)
1445
- gaps.reverse();
1505
+ const plain = { via: [straight, from], gap: null };
1506
+ // On a phone never straight up: the page's own words over a row (a group's label, a heading) are not parts it can go round.
1507
+ if (!phone && !hits(straight, from, b))
1508
+ return plain;
1509
+ // The row it stands in: every part level with it and of a row's size, never a view's whole box.
1510
+ const level = words.filter((o) => o !== b && o.height <= b.height * 2 + 8 && o.y < b.y + b.height - 1 && o.y + o.height > b.y + 1);
1511
+ const rowTop = Math.min(b.y, ...level.map((o) => o.y));
1512
+ const rowBottom = Math.max(b.y + b.height, ...level.map((o) => o.y + o.height));
1446
1513
  const x = b.x + Math.min(10, b.width / 2);
1447
- for (const gap of gaps) {
1448
- const leave = { x, y: gap.leave };
1449
- const down = { x, y: gap.y };
1450
- const out = { x: edgeX, y: gap.y };
1451
- if (!hits(leave, down, b) && !hits(down, out, b))
1452
- return { via: [leave, down, out], gap: Math.round(gap.y) };
1514
+ const kind = districtOf(one.target);
1515
+ const ends = phone ? [(kind !== null ? risers.get(kind) : undefined) ?? pageRect.x + pageRect.width - 2] : [edgeX];
1516
+ for (const end of ends) {
1517
+ // What stands across the way along the gap: between the part and the edge it runs to.
1518
+ const lo = Math.min(end, b.x);
1519
+ const hi = Math.max(end, b.x + b.width);
1520
+ const beside = words.filter((o) => o !== b && o.x < hi && o.x + o.width > lo);
1521
+ const above = beside.filter((o) => o.y + o.height <= rowTop + 1).reduce((most, o) => Math.max(most, o.y + o.height), -Infinity);
1522
+ const below = beside.filter((o) => o.y >= rowBottom - 1).reduce((least, o) => Math.min(least, o.y), Infinity);
1523
+ // In a view, and on a phone, no further from the row than its own spacing: what lies past that (a view's words, a group's label) the page does not go round.
1524
+ const off = (room) => (one.framed ? Math.min(Number.isFinite(room) ? room / 2 : FRAMED_GAP, FRAMED_GAP) : phone ? Math.min(Number.isFinite(room) ? room / 2 : PHONE_GAP, PHONE_GAP) : Number.isFinite(room) ? room / 2 : 4);
1525
+ const gaps = [
1526
+ { y: rowTop - off(rowTop - above), leave: b.y },
1527
+ { y: rowBottom + off(below - rowBottom), leave: b.y + b.height },
1528
+ ].filter((g) => g.y > one.visible.top && g.y < one.visible.bottom);
1529
+ // On a phone the gap above first, toward the sheet's top edge; in a view the gap below first; on a desk's page toward where it is going first — up for a building above the part, down for one below.
1530
+ if (one.framed || (!phone && one.end.at.y > one.part.y))
1531
+ gaps.reverse();
1532
+ const wayAlong = (gap) => {
1533
+ const leave = { x, y: gap.leave };
1534
+ const down = { x, y: gap.y };
1535
+ const out = { x: end, y: gap.y };
1536
+ return { via: phone ? [leave, down, out, { x: end, y: pageRect.y }] : [leave, down, out], gap: Math.round(gap.y) };
1537
+ };
1538
+ for (const gap of gaps) {
1539
+ const way = wayAlong(gap);
1540
+ if (!way.via.some((p, i) => i > 0 && hits(way.via[i - 1], p, b)))
1541
+ return way;
1542
+ }
1543
+ // A phone's line goes along its row's gap all the same: across a part there, never up across the words over it.
1544
+ if (phone && gaps.length > 0)
1545
+ return wayAlong(gaps[0]);
1453
1546
  }
1454
- return { via: [straight, from], gap: null };
1547
+ return plain;
1455
1548
  };
1456
1549
  const ways = asked.map(wayIn);
1457
- // Lines along one gap: a pixel and a half apart, about its middle.
1550
+ // Lines along one gap: a pixel and a half apart, about its middle. On a phone those into one district run along it as one, into their riser.
1458
1551
  const along = new Map();
1459
1552
  ways.forEach((way, at) => {
1460
- if (way.gap !== null)
1461
- along.set(way.gap, [...(along.get(way.gap) ?? []), at]);
1553
+ if (way.gap === null)
1554
+ return;
1555
+ const key = phone ? `${way.gap}|${districtOf(asked[at].target) ?? ""}` : String(way.gap);
1556
+ along.set(key, [...(along.get(key) ?? []), at]);
1462
1557
  });
1558
+ if (phone) {
1559
+ // One shift a district along a gap that several districts' lines share.
1560
+ const byGap = new Map();
1561
+ for (const key of along.keys()) {
1562
+ const [gap] = key.split("|");
1563
+ byGap.set(gap, [...(byGap.get(gap) ?? []), key]);
1564
+ }
1565
+ for (const keys of byGap.values()) {
1566
+ keys.forEach((key, nth) => {
1567
+ const shift = (nth - (keys.length - 1) / 2) * 1;
1568
+ for (const at of along.get(key)) {
1569
+ const via = ways[at].via;
1570
+ ways[at] = { ...ways[at], via: via.map((p, i) => (i === 0 || i === via.length - 1 ? p : { x: p.x, y: p.y + shift })) };
1571
+ }
1572
+ });
1573
+ }
1574
+ along.clear();
1575
+ }
1463
1576
  for (const ats of along.values()) {
1464
1577
  ats.forEach((at, nth) => {
1465
1578
  const shift = (nth - (ats.length - 1) / 2) * 1.5;
1466
1579
  const via = ways[at].via;
1467
- ways[at] = { ...ways[at], via: [via[0], ...via.slice(1).map((p) => ({ x: p.x, y: p.y + shift }))] };
1580
+ ways[at] = { ...ways[at], via: via.map((p, i) => (i === 0 ? p : { x: p.x, y: p.y + shift })) };
1468
1581
  });
1469
1582
  }
1470
1583
  asked.forEach((one, at) => {
@@ -1493,7 +1606,9 @@ export function OnePlaceCity({ where, out, sheet, connected, boards, current, bo
1493
1606
  if (!end)
1494
1607
  continue;
1495
1608
  const parts = ats.map((at) => found[at].part);
1496
- const meet = leaveFrom({ x: parts.reduce((sum, p) => sum + p.x, 0) / parts.length, y: parts.reduce((sum, p) => sum + p.y, 0) / parts.length }, pageRect, phone);
1609
+ // On a phone they meet where their riser reaches the sheet's top edge.
1610
+ const riser = phone ? risers.get(kind) : undefined;
1611
+ const meet = riser !== undefined ? { x: riser, y: pageRect.y } : leaveFrom({ x: parts.reduce((sum, p) => sum + p.x, 0) / parts.length, y: parts.reduce((sum, p) => sum + p.y, 0) / parts.length }, pageRect, phone);
1497
1612
  const route = routeLine(meet, end.at, area, phone, reserved);
1498
1613
  if (!route)
1499
1614
  continue;
@@ -1874,7 +1989,7 @@ export function OnePlaceCity({ where, out, sheet, connected, boards, current, bo
1874
1989
  * in the page — and what of it reaches past the window is inside a
1875
1990
  * box that scrolls, as a phone's sideways row would be.
1876
1991
  */
1877
- style: { position: "fixed", inset: 0, zIndex: ONE_FACE_LAYERS.city, display: "none", visibility: "hidden", overflow: "hidden", containerType: "size" }, children: [_jsx("style", { children: CITY_CSS }), _jsx(Scene, { renderer: "dom", blur: false, animate: false, camera: camera, options: sceneOptions, style: { width: "100%", height: "100%" } })] }), _jsx("svg", { ref: overlay, "aria-hidden": "true", "data-testid": "one-place-lines", width: view.width, height: view.height, style: { position: "fixed", left: 0, top: 0, zIndex: ONE_FACE_LAYERS.marks, pointerEvents: "none", overflow: "visible", opacity: 0 } }), _jsx("div", { ref: rings, hidden: true, role: "group", "aria-label": "What this page shows, in the city", style: { position: "fixed", left: 0, top: 0, width: 0, height: 0, zIndex: ONE_FACE_LAYERS.marks, opacity: 0 } }), _jsx("div", { ref: tagLayer, role: "region", "aria-label": "The districts", "data-testid": "one-place-names", style: { position: "fixed", left: 0, top: 0, width: 0, height: 0, zIndex: ONE_FACE_LAYERS.marks }, children: districtNames.map((one) => (_jsxs("span", { ref: (el) => {
1992
+ style: { position: "fixed", inset: 0, zIndex: ONE_FACE_LAYERS.city, display: "none", visibility: "hidden", overflow: "hidden", containerType: "size" }, children: [sceneSheet === null ? null : _jsx("style", { children: sceneSheet }), _jsx("style", { children: CITY_CSS }), _jsx(Scene, { renderer: "dom", blur: false, animate: false, camera: camera, options: sceneOptions, style: { width: "100%", height: "100%" } })] }), _jsx("svg", { ref: overlay, "aria-hidden": "true", "data-testid": "one-place-lines", width: view.width, height: view.height, style: { position: "fixed", left: 0, top: 0, zIndex: ONE_FACE_LAYERS.marks, pointerEvents: "none", overflow: "visible", opacity: 0 } }), _jsx("div", { ref: rings, hidden: true, role: "group", "aria-label": "What this page shows, in the city", style: { position: "fixed", left: 0, top: 0, width: 0, height: 0, zIndex: ONE_FACE_LAYERS.marks, opacity: 0 } }), _jsx("div", { ref: tagLayer, role: "region", "aria-label": "The districts", "data-testid": "one-place-names", style: { position: "fixed", left: 0, top: 0, width: 0, height: 0, zIndex: ONE_FACE_LAYERS.marks }, children: districtNames.map((one) => (_jsxs("span", { ref: (el) => {
1878
1993
  if (el)
1879
1994
  tagEls.current.set(one.kind, el);
1880
1995
  else