@flemo/devtools 0.4.0 → 0.5.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.
@@ -0,0 +1,17 @@
1
+ import { LandingAudit } from './types';
2
+ /** How many rAF frames past flight end the landing audit waits. */
3
+ export declare const LANDING_AUDIT_FRAMES = 2;
4
+ /**
5
+ * Hold markers still on the page at rest. Both of these are supposed to be
6
+ * gone by the landing: whatever they hide has no owner left to reveal it.
7
+ * Scanned document-wide on purpose — an orphan's screen is often exactly the
8
+ * one that was swapped out from under the hold.
9
+ *
10
+ * `busy` is the caller's "another flight is already running" test. The audit
11
+ * lands two frames after the previous flight ended, and by then a fast
12
+ * back-to-back navigation legitimately owns hold markers of its own. A missed
13
+ * detection is recoverable; blaming a flight for its successor's working holds
14
+ * would train the reader to ignore the signal.
15
+ */
16
+ export declare const orphanedHolds: (busy: boolean) => string[];
17
+ export declare const auditLanding: (elements: readonly Element[], busy: boolean) => Omit<LandingAudit, "stuckStatuses">;
@@ -0,0 +1,57 @@
1
+ import { MorphActivity, TripwireHit } from './types';
2
+ /** A ghost cut this soon after it appeared was never seen. */
3
+ export declare const GHOST_BLADE_MS = 34;
4
+ export interface MorphProbeState {
5
+ /** Registered ends seen when the flight opened. */
6
+ registered: number;
7
+ /** Keys with ends this flight could have paired. */
8
+ pairable: Set<string>;
9
+ /** Keys carried by more than one end inside a single screen. */
10
+ duplicated: Set<string>;
11
+ /** Keys seen carrying a flight role at any point during the flight. */
12
+ flew: Set<string>;
13
+ camera: boolean;
14
+ /** Ghosts seen, and when each appeared, so a cut one can be timed. */
15
+ ghosts: number;
16
+ ghostBornAt: Map<Element, number>;
17
+ shortestGhostLifeMs: number | null;
18
+ /** Morph keyframe rules in the sheet when the flight opened. */
19
+ sheetRulesAtStart: number;
20
+ }
21
+ /**
22
+ * Morph keyframe rules currently in the per-flight sheet.
23
+ *
24
+ * One `<style>` element holds them all and outlives every flight, so counting
25
+ * the element proves nothing; the rules are what a flight inserts and drops.
26
+ * A landing that leaves more than it started with leaked a flight's keyframes.
27
+ */
28
+ export declare const morphSheetRuleCount: () => number;
29
+ /**
30
+ * Read the pairing picture as the flight opens.
31
+ *
32
+ * By this point the runtime has already staged whatever it paired: the
33
+ * observer that opens a flight runs after the commit that stamped the roles.
34
+ * So a role is read as fact, and only the ends still sitting in their screens
35
+ * are grouped to decide what COULD have paired.
36
+ *
37
+ * Ends are grouped by owning screen because two ends under one screen are not
38
+ * a pair — they are the same key used twice, which is a consumer mistake worth
39
+ * naming rather than a runtime failure. Ends outside any screen (shared chrome:
40
+ * a bar rendered beside the screen scope, not inside it) count as their own
41
+ * owner, which is the runtime's own rule for them.
42
+ */
43
+ export declare const createMorphProbeState: (participants: readonly Element[]) => MorphProbeState;
44
+ /** A role stamped (or cleared) during the flight: proof the pair flew. */
45
+ export declare const trackMorphAttribute: (state: MorphProbeState, target: Element) => void;
46
+ /** Ghosts arriving and leaving, so one cut inside a frame can be timed. */
47
+ export declare const trackMorphNodes: (state: MorphProbeState, mutation: MutationRecord, atMs: number) => void;
48
+ /**
49
+ * Tripwire hits the morph probe raises, at the moment they can be judged.
50
+ *
51
+ * A ghost is a copy of the element being replaced and its whole job is to be
52
+ * seen fading; one removed within a frame of appearing was never on screen at
53
+ * all, which is the first-frame blade this project spent a campaign on.
54
+ */
55
+ export declare const morphTripwires: (state: MorphProbeState) => TripwireHit[];
56
+ /** The flight's morph picture, plus what it left behind at rest. */
57
+ export declare const morphActivity: (state: MorphProbeState, busy: boolean) => MorphActivity;
package/dist/noop.d.ts CHANGED
@@ -1,13 +1,22 @@
1
+ import { DevtoolsHudHandle, DevtoolsHudOptions } from './hud';
1
2
  import { DevtoolsPanelHandle, DevtoolsPanelOptions } from './panel';
2
3
  import { FlightRecorderHandle, FlightRecorderOptions } from './types';
3
4
  export * from './anomalies';
4
5
  export * from './blindSpots';
6
+ export * from './buckets';
5
7
  export * from './environment';
8
+ export * from './judging';
6
9
  export * from './overrides';
10
+ export * from './persistence';
11
+ export * from './preconditions';
7
12
  export * from './sampling';
8
- export declare const REPORT_SCHEMA_VERSION = "2";
13
+ export * from './verdict';
14
+ export declare const REPORT_SCHEMA_VERSION = "3";
9
15
  export declare const attachFlightRecorder: (_options?: FlightRecorderOptions) => FlightRecorderHandle;
10
16
  export declare const attachDevtoolsPanel: (_options?: DevtoolsPanelOptions) => DevtoolsPanelHandle;
17
+ export declare const attachDevtoolsHud: (_options?: DevtoolsHudOptions) => DevtoolsHudHandle;
11
18
  export type { FlemoGlobal } from './recorder';
19
+ export type { DevtoolsHudHandle, DevtoolsHudOptions } from './hud';
12
20
  export type { DevtoolsPanelHandle, DevtoolsPanelOptions } from './panel';
13
- export type { EnvironmentFingerprint, FlemoReport, FlightDriver, FlightHolds, FlightKind, FlightParticipants, FlightRecord, FlightRecorderHandle, FlightRecorderOptions, FlightTimestamp, FramePhaseStats, FrameSampleStats, LandingAudit, LongTaskSpan, ObservationCapabilities, OverridesSection, PlayerGapStats, UaBrand } from './types';
21
+ export type { DriverEvidence } from './frameProbe';
22
+ export type { BucketSummary, EnvironmentFingerprint, FlemoReport, FlightDriver, FlightHolds, FlightKind, FlightParticipants, FlightRecord, FlightRecorderHandle, FlightRecorderOptions, FlightTimestamp, FramePhaseStats, FrameSampleStats, ImageActivity, InputEvidence, LandingAudit, LongTaskSpan, MorphActivity, MotionProgress, ObservationCapabilities, OverridesSection, Precondition, PreconditionStatus, PreviousSession, TripwireHit, UaBrand } from './types';