@floless/app 0.129.0 → 0.130.0

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.
@@ -54980,7 +54980,7 @@ function appVersion() {
54980
54980
  return resolveVersion({
54981
54981
  isSea: isSea2(),
54982
54982
  sqVersionXml: readSqVersionXml(),
54983
- define: true ? "0.129.0" : void 0,
54983
+ define: true ? "0.130.0" : void 0,
54984
54984
  pkgVersion: readPkgVersion()
54985
54985
  });
54986
54986
  }
@@ -54996,7 +54996,7 @@ function resolveChannel(s) {
54996
54996
  function appChannel() {
54997
54997
  return resolveChannel({
54998
54998
  isSea: isSea2(),
54999
- define: true ? "0.129.0" : void 0,
54999
+ define: true ? "0.130.0" : void 0,
55000
55000
  // argv[1] is the entry the runtime actually loaded (…/dist/floless-server.cjs), which is what
55001
55001
  // carries the npx cache prefix. Absent under the SEA exe, which never reaches the npx branch.
55002
55002
  modulePath: process.argv[1]
@@ -60486,9 +60486,44 @@ function releaseLease(leaseId) {
60486
60486
  }
60487
60487
  return false;
60488
60488
  }
60489
+ function psRejectionIsEmptyMatch(err2) {
60490
+ return err2.code === 1 && !err2.signal && !err2.killed && typeof err2.stdout === "string" && !err2.stdout.trim() && typeof err2.stderr === "string" && !err2.stderr.trim();
60491
+ }
60492
+ function pidProvenDead(pid) {
60493
+ try {
60494
+ process.kill(pid, 0);
60495
+ return false;
60496
+ } catch (e) {
60497
+ return e.code === "ESRCH";
60498
+ }
60499
+ }
60500
+ async function posixStartTimes(wanted, queryPs, provenDead = pidProvenDead) {
60501
+ let stdout;
60502
+ try {
60503
+ stdout = await queryPs(wanted);
60504
+ } catch (err2) {
60505
+ if (!psRejectionIsEmptyMatch(err2)) return null;
60506
+ stdout = "";
60507
+ }
60508
+ const out = /* @__PURE__ */ new Map();
60509
+ const now = Date.now();
60510
+ for (const [pid, secs] of pairs(stdout)) out.set(pid, now - secs * 1e3);
60511
+ for (const pid of wanted) {
60512
+ if (out.has(pid)) continue;
60513
+ if (!provenDead(pid)) return null;
60514
+ }
60515
+ return out;
60516
+ }
60517
+ function psQuery(pids) {
60518
+ return run(
60519
+ "ps",
60520
+ ["-o", "pid=,etimes=", "-p", pids.join(",")],
60521
+ { encoding: "utf8", timeout: 1e4, maxBuffer: 8 * 1024 * 1024 }
60522
+ ).then((r) => r.stdout);
60523
+ }
60489
60524
  async function processStartTimes(pids) {
60490
60525
  const out = /* @__PURE__ */ new Map();
60491
- const wanted = [...new Set(pids)].filter((p) => Number.isInteger(p) && p > 0);
60526
+ const wanted = [...new Set(pids)].filter((p) => Number.isInteger(p) && p > 0 && p <= 2147483647);
60492
60527
  if (!wanted.length) return out;
60493
60528
  try {
60494
60529
  if (WIN) {
@@ -60496,9 +60531,7 @@ async function processStartTimes(pids) {
60496
60531
  const script = `Get-CimInstance Win32_Process -Filter '${filter}' | ForEach-Object { "$($_.ProcessId) $([int64]($_.CreationDate.ToUniversalTime() - [datetime]'1970-01-01').TotalMilliseconds)" }`;
60497
60532
  for (const [pid, t] of pairs(await psLines(script))) out.set(pid, t);
60498
60533
  } else {
60499
- const { stdout } = await run("ps", ["-o", "pid=,etimes=", "-p", wanted.join(",")]);
60500
- const now = Date.now();
60501
- for (const [pid, secs] of pairs(stdout)) out.set(pid, now - secs * 1e3);
60534
+ return await posixStartTimes(wanted, psQuery);
60502
60535
  }
60503
60536
  } catch {
60504
60537
  return null;
@@ -235,6 +235,11 @@ function init(canvas, theApi) {
235
235
  // live dimension readout (toast-styled, follows the cursor during a drag — feet + snap type).
236
236
  // Two spans + textContent (never innerHTML) so it's XSS-proof; the type span is muted.
237
237
  readout = document.createElement('div');
238
+ // The ids on this and its sibling hosts below are not hooks for script — nothing looks them up. They
239
+ // exist so the pages' light theme can name them in their dark-island rule (#727): every one of these
240
+ // is glued to the 3D model and paints in colours tuned for the dark canvas, so they must NOT follow
241
+ // the shell into light the way the surrounding chrome does.
242
+ readout.id = 'm3dReadout';
238
243
  readout.style.cssText = 'position:fixed;display:none;pointer-events:none;z-index:60;background:var(--panel,#0f172a);color:var(--text,#f8fafc);border:1px solid var(--line,#1e293b);border-radius:4px;padding:3px 7px;font:12px system-ui;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,.5)';
239
244
  readout._dist = document.createElement('span');
240
245
  readout._type = document.createElement('span'); readout._type.style.color = 'var(--mut,#94a3b8)';
@@ -281,6 +286,7 @@ function init(canvas, theApi) {
281
286
  * `rubber` (a live drag overlay, which must cover everything it is drawn across).
282
287
  */
283
288
  dimLabelHost = document.createElement('div');
289
+ dimLabelHost.id = 'm3dDimLabels';
284
290
  dimLabelHost.style.cssText = 'position:fixed;left:0;top:0;pointer-events:none;z-index:4';
285
291
  document.body.appendChild(dimLabelHost);
286
292
  // …and its label, in the dim host so it is positioned by the same per-frame projection. The cssText is
@@ -289,11 +295,14 @@ function init(canvas, theApi) {
289
295
  refMeasureLabel.style.cssText = 'position:absolute;transform:translate(-50%,-50%);pointer-events:none;background:var(--panel,#0f172a);color:#e2e8f0;border:1px solid #22d3ee;border-radius:4px;padding:1px 6px;font:11px system-ui;white-space:nowrap;box-shadow:0 1px 4px rgba(0,0,0,.4);display:none';
290
296
  dimLabelHost.appendChild(refMeasureLabel);
291
297
  memberLabelHost = document.createElement('div'); // member mark/id labels (Slice 4) — below the dim labels
298
+ memberLabelHost.id = 'm3dMemberLabels';
292
299
  memberLabelHost.style.cssText = 'position:fixed;left:0;top:0;pointer-events:none;z-index:3;display:none';
293
300
  document.body.appendChild(memberLabelHost);
294
301
  propLabelHost = document.createElement('div'); // right-click property labels — own host so they never clobber the mark/id pool
302
+ propLabelHost.id = 'm3dPropLabelHost'; // NOT 'm3dPropLabels' — that id is the ⋯ menu's checkbox
295
303
  propLabelHost.style.cssText = 'position:fixed;left:0;top:0;pointer-events:none;z-index:3;display:none';
296
304
  selLenLabelHost = document.createElement('div'); // ⋯ Display → Show member length: on-select length chips (cyan dimension read)
305
+ selLenLabelHost.id = 'm3dSelLenLabels';
297
306
  selLenLabelHost.style.cssText = 'position:fixed;left:0;top:0;pointer-events:none;z-index:3;display:none';
298
307
  document.body.appendChild(selLenLabelHost);
299
308
  document.body.appendChild(propLabelHost);
@@ -317,11 +326,13 @@ function init(canvas, theApi) {
317
326
  };
318
327
  hoverChipShell.append(hoverChipToggle, hoverChip); statusDock.appendChild(hoverChipShell);
319
328
  } else {
329
+ hoverChip.id = 'm3dHoverChip';
320
330
  hoverChip.style.cssText = 'position:fixed;display:none;pointer-events:none;z-index:55;background:var(--panel,#0f172a);color:var(--mut,#94a3b8);border:1px solid var(--line,#334155);border-radius:6px;padding:5px 12px;font:12px system-ui;white-space:nowrap;max-width:60vw;overflow:hidden;text-overflow:ellipsis;box-shadow:0 2px 8px rgba(0,0,0,.45)';
321
331
  document.body.appendChild(hoverChip);
322
332
  }
323
333
  // rubber-band overlay for LEFT-drag box-select on empty space
324
334
  rubber = document.createElement('div');
335
+ rubber.id = 'm3dRubber';
325
336
  rubber.style.cssText = 'position:fixed;display:none;pointer-events:none;z-index:58;border:1px solid var(--brand,#3b82f6);background:rgba(59,130,246,.12)';
326
337
  document.body.appendChild(rubber);
327
338
  // Pointer gestures: down on a member → grab it (suppress orbit); move → drag with snapping; up →