@flemo/devtools 0.2.0 → 0.2.2

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.
package/dist/index.mjs CHANGED
@@ -116,12 +116,6 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
116
116
  kind: "opt-in-diagnostic",
117
117
  description: "hard driver pin ('css@<epoch-ms>' / 'raf@<epoch-ms>', 24h TTL) — pins EVERY transition"
118
118
  },
119
- {
120
- key: "flemo:lpm",
121
- storage: "session",
122
- kind: "production-state",
123
- description: "low-power-mode cadence seed (learned)"
124
- },
125
119
  {
126
120
  key: "flemo:sixty",
127
121
  storage: "session",
@@ -186,13 +180,13 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
186
180
  key: "flemo:layers",
187
181
  storage: "session",
188
182
  kind: "opt-in-diagnostic",
189
- description: "resident screen layers at rest (armed by ?flemo-layers=)"
183
+ description: "resident screen layers at rest"
190
184
  },
191
185
  {
192
186
  key: "flemo:freeze",
193
187
  storage: "session",
194
188
  kind: "opt-in-diagnostic",
195
- description: "keep the direct prev screen live (armed by ?flemo-freeze=)"
189
+ description: "keep the direct prev screen live"
196
190
  },
197
191
  {
198
192
  key: "flemo:preraster",
@@ -403,20 +397,20 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
403
397
  for (let t of e.imagesTracked) t.hasAttribute(L) && e.imagesHeld.add(t);
404
398
  }, G = (e, t) => {
405
399
  e.releasedFrames += 1;
406
- let n = !1;
400
+ let n = !1, r = !1;
407
401
  for (let t of e.elements) {
408
- let r = e.clocks.get(t);
409
- if (r) {
410
- r.playState === "paused" && (e.pausedAfterRelease = !0);
411
- let i = typeof r.currentTime == "number" ? r.currentTime : null;
412
- if (i !== null) {
402
+ let i = e.clocks.get(t);
403
+ if (i) {
404
+ i.playState === "paused" && (e.pausedAfterRelease = !0), i.playState !== "finished" && (r = !0);
405
+ let a = typeof i.currentTime == "number" ? i.currentTime : null;
406
+ if (a !== null) {
413
407
  let r = e.lastClock.get(t);
414
- r !== void 0 && i !== r && (n = !0), e.lastClock.set(t, i);
408
+ r !== void 0 && a !== r && (n = !0), e.lastClock.set(t, a);
415
409
  }
416
410
  }
417
- let i = t.style;
418
- if (i && i.animation !== "") {
419
- let r = `${i.transform}/${i.opacity}`;
411
+ let a = t.style;
412
+ if (a && a.animation !== "") {
413
+ let r = `${a.transform}/${a.opacity}`;
420
414
  e.lastPose.get(t) !== r && (n = !0);
421
415
  }
422
416
  }
@@ -425,6 +419,10 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
425
419
  e.stallRunMs = 0;
426
420
  return;
427
421
  }
422
+ if (!r && e.clocks.size > 0) {
423
+ e.tailFrames += 1, e.stallRunMs = 0;
424
+ return;
425
+ }
428
426
  e.stalledFrames += 1, e.stallRunMs += t, e.stallRunMs > e.longestStallMs && (e.longestStallMs = e.stallRunMs);
429
427
  }
430
428
  }, K = (e) => {
@@ -507,6 +505,7 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
507
505
  clocks: /* @__PURE__ */ new Map(),
508
506
  lastClock: /* @__PURE__ */ new Map(),
509
507
  releasedFrames: 0,
508
+ tailFrames: 0,
510
509
  stalledFrames: 0,
511
510
  stallRunMs: 0,
512
511
  longestStallMs: 0,
@@ -582,7 +581,8 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
582
581
  stalledFrames: i.stalledFrames,
583
582
  longestStallMs: z(i.longestStallMs),
584
583
  pausedAfterRelease: i.pausedAfterRelease,
585
- holdReassertedAtMs: i.holdReassertedAtMs
584
+ holdReassertedAtMs: i.holdReassertedAtMs,
585
+ tailFrames: i.tailFrames
586
586
  },
587
587
  images: H(i),
588
588
  ...a ? { playerGaps: a } : {},
@@ -708,7 +708,8 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
708
708
  stalledFrames: r.stalledFrames,
709
709
  longestStallMs: z(r.longestStallMs),
710
710
  pausedAfterRelease: r.pausedAfterRelease,
711
- holdReassertedAtMs: r.holdReassertedAtMs
711
+ holdReassertedAtMs: r.holdReassertedAtMs,
712
+ tailFrames: r.tailFrames
712
713
  },
713
714
  images: H(r),
714
715
  longTasks: [],
package/dist/noop.mjs CHANGED
@@ -111,12 +111,6 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = 48, o = (e) => {
111
111
  kind: "opt-in-diagnostic",
112
112
  description: "hard driver pin ('css@<epoch-ms>' / 'raf@<epoch-ms>', 24h TTL) — pins EVERY transition"
113
113
  },
114
- {
115
- key: "flemo:lpm",
116
- storage: "session",
117
- kind: "production-state",
118
- description: "low-power-mode cadence seed (learned)"
119
- },
120
114
  {
121
115
  key: "flemo:sixty",
122
116
  storage: "session",
@@ -181,13 +175,13 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = 48, o = (e) => {
181
175
  key: "flemo:layers",
182
176
  storage: "session",
183
177
  kind: "opt-in-diagnostic",
184
- description: "resident screen layers at rest (armed by ?flemo-layers=)"
178
+ description: "resident screen layers at rest"
185
179
  },
186
180
  {
187
181
  key: "flemo:freeze",
188
182
  storage: "session",
189
183
  kind: "opt-in-diagnostic",
190
- description: "keep the direct prev screen live (armed by ?flemo-freeze=)"
184
+ description: "keep the direct prev screen live"
191
185
  },
192
186
  {
193
187
  key: "flemo:preraster",
package/dist/types.d.ts CHANGED
@@ -85,6 +85,15 @@ export interface MotionProgress {
85
85
  pausedAfterRelease: boolean;
86
86
  /** Offset from t0 at which a hold was re-asserted AFTER the release. */
87
87
  holdReassertedAtMs: number | null;
88
+ /**
89
+ * Released frames sampled AFTER every tracked animation reported "finished".
90
+ * The motion is over there and the pose is legitimately still; the flight is
91
+ * simply not closed yet. Counted separately because folding them into
92
+ * `stalledFrames` made a ~50ms "stall" fire on EVERY healthy flight — a
93
+ * constant that masks the real ones (measured on plen, 2026-08-20: 10 of 10
94
+ * flights, always exactly 3 frames).
95
+ */
96
+ tailFrames: number;
88
97
  }
89
98
  /**
90
99
  * Images inside the flight's participants. A still-loading <img> that
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flemo/devtools",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Zero-config flight recorder for flemo screen transitions: captures per-flight driver routing, frame pacing, long tasks, landing residues, active debug overrides, and environment/observation-trap fingerprints into one JSON report readable by humans and coding agents.",
5
5
  "main": "./dist/index.mjs",
6
6
  "module": "./dist/index.mjs",