@reticlehq/browser 2.0.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.
- package/LICENSE +202 -0
- package/README.md +17 -0
- package/dist/actions/actions-dom.d.ts +29 -0
- package/dist/actions/actions-dom.d.ts.map +1 -0
- package/dist/actions/actions-dom.js +153 -0
- package/dist/actions/actions-dom.js.map +1 -0
- package/dist/actions/actions.d.ts +92 -0
- package/dist/actions/actions.d.ts.map +1 -0
- package/dist/actions/actions.js +348 -0
- package/dist/actions/actions.js.map +1 -0
- package/dist/actions/scroll.d.ts +19 -0
- package/dist/actions/scroll.d.ts.map +1 -0
- package/dist/actions/scroll.js +44 -0
- package/dist/actions/scroll.js.map +1 -0
- package/dist/commands/commands.d.ts +5 -0
- package/dist/commands/commands.d.ts.map +1 -0
- package/dist/commands/commands.js +246 -0
- package/dist/commands/commands.js.map +1 -0
- package/dist/dom/a11y.d.ts +20 -0
- package/dist/dom/a11y.d.ts.map +1 -0
- package/dist/dom/a11y.js +263 -0
- package/dist/dom/a11y.js.map +1 -0
- package/dist/dom/auto-anchor.d.ts +66 -0
- package/dist/dom/auto-anchor.d.ts.map +1 -0
- package/dist/dom/auto-anchor.js +75 -0
- package/dist/dom/auto-anchor.js.map +1 -0
- package/dist/dom/dom-ignore.d.ts +7 -0
- package/dist/dom/dom-ignore.d.ts.map +1 -0
- package/dist/dom/dom-ignore.js +21 -0
- package/dist/dom/dom-ignore.js.map +1 -0
- package/dist/dom/query.d.ts +6 -0
- package/dist/dom/query.d.ts.map +1 -0
- package/dist/dom/query.js +236 -0
- package/dist/dom/query.js.map +1 -0
- package/dist/dom/refs.d.ts +15 -0
- package/dist/dom/refs.d.ts.map +1 -0
- package/dist/dom/refs.js +36 -0
- package/dist/dom/refs.js.map +1 -0
- package/dist/dom/snapshot.d.ts +22 -0
- package/dist/dom/snapshot.d.ts.map +1 -0
- package/dist/dom/snapshot.js +171 -0
- package/dist/dom/snapshot.js.map +1 -0
- package/dist/dom/theme.d.ts +26 -0
- package/dist/dom/theme.d.ts.map +1 -0
- package/dist/dom/theme.js +90 -0
- package/dist/dom/theme.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/observers/animation.d.ts +4 -0
- package/dist/observers/animation.d.ts.map +1 -0
- package/dist/observers/animation.js +35 -0
- package/dist/observers/animation.js.map +1 -0
- package/dist/observers/console.d.ts +4 -0
- package/dist/observers/console.d.ts.map +1 -0
- package/dist/observers/console.js +58 -0
- package/dist/observers/console.js.map +1 -0
- package/dist/observers/dom.d.ts +4 -0
- package/dist/observers/dom.d.ts.map +1 -0
- package/dist/observers/dom.js +96 -0
- package/dist/observers/dom.js.map +1 -0
- package/dist/observers/health.d.ts +8 -0
- package/dist/observers/health.d.ts.map +1 -0
- package/dist/observers/health.js +33 -0
- package/dist/observers/health.js.map +1 -0
- package/dist/observers/network.d.ts +11 -0
- package/dist/observers/network.d.ts.map +1 -0
- package/dist/observers/network.js +128 -0
- package/dist/observers/network.js.map +1 -0
- package/dist/observers/route.d.ts +4 -0
- package/dist/observers/route.d.ts.map +1 -0
- package/dist/observers/route.js +56 -0
- package/dist/observers/route.js.map +1 -0
- package/dist/observers/scroll.d.ts +4 -0
- package/dist/observers/scroll.d.ts.map +1 -0
- package/dist/observers/scroll.js +42 -0
- package/dist/observers/scroll.js.map +1 -0
- package/dist/observers/types.d.ts +6 -0
- package/dist/observers/types.d.ts.map +1 -0
- package/dist/observers/types.js +2 -0
- package/dist/observers/types.js.map +1 -0
- package/dist/presenter/overlay.d.ts +12 -0
- package/dist/presenter/overlay.d.ts.map +1 -0
- package/dist/presenter/overlay.js +31 -0
- package/dist/presenter/overlay.js.map +1 -0
- package/dist/presenter/presenter-config.d.ts +86 -0
- package/dist/presenter/presenter-config.d.ts.map +1 -0
- package/dist/presenter/presenter-config.js +51 -0
- package/dist/presenter/presenter-config.js.map +1 -0
- package/dist/presenter/presenter-controls.d.ts +74 -0
- package/dist/presenter/presenter-controls.d.ts.map +1 -0
- package/dist/presenter/presenter-controls.js +360 -0
- package/dist/presenter/presenter-controls.js.map +1 -0
- package/dist/presenter/presenter-effects.d.ts +14 -0
- package/dist/presenter/presenter-effects.d.ts.map +1 -0
- package/dist/presenter/presenter-effects.js +40 -0
- package/dist/presenter/presenter-effects.js.map +1 -0
- package/dist/presenter/presenter-glow.d.ts +43 -0
- package/dist/presenter/presenter-glow.d.ts.map +1 -0
- package/dist/presenter/presenter-glow.js +126 -0
- package/dist/presenter/presenter-glow.js.map +1 -0
- package/dist/presenter/presenter-log.d.ts +43 -0
- package/dist/presenter/presenter-log.d.ts.map +1 -0
- package/dist/presenter/presenter-log.js +118 -0
- package/dist/presenter/presenter-log.js.map +1 -0
- package/dist/presenter/presenter-run-state.d.ts +48 -0
- package/dist/presenter/presenter-run-state.d.ts.map +1 -0
- package/dist/presenter/presenter-run-state.js +37 -0
- package/dist/presenter/presenter-run-state.js.map +1 -0
- package/dist/presenter/presenter-styles.d.ts +7 -0
- package/dist/presenter/presenter-styles.d.ts.map +1 -0
- package/dist/presenter/presenter-styles.js +118 -0
- package/dist/presenter/presenter-styles.js.map +1 -0
- package/dist/presenter/presenter-tally.d.ts +20 -0
- package/dist/presenter/presenter-tally.d.ts.map +1 -0
- package/dist/presenter/presenter-tally.js +38 -0
- package/dist/presenter/presenter-tally.js.map +1 -0
- package/dist/presenter/presenter-verbs.d.ts +2 -0
- package/dist/presenter/presenter-verbs.d.ts.map +1 -0
- package/dist/presenter/presenter-verbs.js +29 -0
- package/dist/presenter/presenter-verbs.js.map +1 -0
- package/dist/presenter/presenter.d.ts +89 -0
- package/dist/presenter/presenter.d.ts.map +1 -0
- package/dist/presenter/presenter.js +428 -0
- package/dist/presenter/presenter.js.map +1 -0
- package/dist/recorder/recorder-styles.d.ts +12 -0
- package/dist/recorder/recorder-styles.d.ts.map +1 -0
- package/dist/recorder/recorder-styles.js +45 -0
- package/dist/recorder/recorder-styles.js.map +1 -0
- package/dist/recorder/recorder.d.ts +60 -0
- package/dist/recorder/recorder.d.ts.map +1 -0
- package/dist/recorder/recorder.js +436 -0
- package/dist/recorder/recorder.js.map +1 -0
- package/dist/registry/adapters.d.ts +31 -0
- package/dist/registry/adapters.d.ts.map +1 -0
- package/dist/registry/adapters.js +47 -0
- package/dist/registry/adapters.js.map +1 -0
- package/dist/registry/capabilities.d.ts +25 -0
- package/dist/registry/capabilities.d.ts.map +1 -0
- package/dist/registry/capabilities.js +48 -0
- package/dist/registry/capabilities.js.map +1 -0
- package/dist/registry/commit-and-signal.d.ts +9 -0
- package/dist/registry/commit-and-signal.d.ts.map +1 -0
- package/dist/registry/commit-and-signal.js +12 -0
- package/dist/registry/commit-and-signal.js.map +1 -0
- package/dist/registry/domains.d.ts +15 -0
- package/dist/registry/domains.d.ts.map +1 -0
- package/dist/registry/domains.js +19 -0
- package/dist/registry/domains.js.map +1 -0
- package/dist/registry/emitter.d.ts +28 -0
- package/dist/registry/emitter.d.ts.map +1 -0
- package/dist/registry/emitter.js +27 -0
- package/dist/registry/emitter.js.map +1 -0
- package/dist/registry/stores.d.ts +9 -0
- package/dist/registry/stores.d.ts.map +1 -0
- package/dist/registry/stores.js +30 -0
- package/dist/registry/stores.js.map +1 -0
- package/dist/reticle-presenter-helpers.d.ts +19 -0
- package/dist/reticle-presenter-helpers.d.ts.map +1 -0
- package/dist/reticle-presenter-helpers.js +81 -0
- package/dist/reticle-presenter-helpers.js.map +1 -0
- package/dist/reticle.d.ts +113 -0
- package/dist/reticle.d.ts.map +1 -0
- package/dist/reticle.js +379 -0
- package/dist/reticle.js.map +1 -0
- package/dist/review/annotator.d.ts +36 -0
- package/dist/review/annotator.d.ts.map +1 -0
- package/dist/review/annotator.js +321 -0
- package/dist/review/annotator.js.map +1 -0
- package/dist/review/mark-anchor.d.ts +23 -0
- package/dist/review/mark-anchor.d.ts.map +1 -0
- package/dist/review/mark-anchor.js +74 -0
- package/dist/review/mark-anchor.js.map +1 -0
- package/dist/security/serialization.d.ts +6 -0
- package/dist/security/serialization.d.ts.map +1 -0
- package/dist/security/serialization.js +103 -0
- package/dist/security/serialization.js.map +1 -0
- package/dist/timers/clock.d.ts +6 -0
- package/dist/timers/clock.d.ts.map +1 -0
- package/dist/timers/clock.js +80 -0
- package/dist/timers/clock.js.map +1 -0
- package/dist/timers/native-timers.d.ts +37 -0
- package/dist/timers/native-timers.d.ts.map +1 -0
- package/dist/timers/native-timers.js +79 -0
- package/dist/timers/native-timers.js.map +1 -0
- package/dist/transport/transport.d.ts +54 -0
- package/dist/transport/transport.d.ts.map +1 -0
- package/dist/transport/transport.js +182 -0
- package/dist/transport/transport.js.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { PresenterMode, type PresenterTone, SessionState } from '@reticlehq/core';
|
|
2
|
+
import { type LogKind, type LogResult, type LogHandle } from './presenter-log.js';
|
|
3
|
+
import { GlowPhase, type PresenterOptions } from './presenter-config.js';
|
|
4
|
+
import { type PresenterRunState } from './presenter-run-state.js';
|
|
5
|
+
import { type ControlHandler } from './presenter-controls.js';
|
|
6
|
+
export type { ControlHandler, ControlIntent } from './presenter-controls.js';
|
|
7
|
+
export { GlowPhase, type PresenterOptions } from './presenter-config.js';
|
|
8
|
+
export { LOG_KIND, LOG_RESULT, type LogKind, type LogResult, type LogHandle, } from './presenter-log.js';
|
|
9
|
+
export declare class Presenter {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(options?: PresenterOptions);
|
|
12
|
+
/** Setter so reticle.ts can wire the control callback after construction. */
|
|
13
|
+
setControlHandler(handler: ControlHandler): void;
|
|
14
|
+
/** Current live-control session state mirrored onto the panel (data-reticle-state). */
|
|
15
|
+
get state(): SessionState;
|
|
16
|
+
/** Whether a run is currently being presented (false before the agent's first activity / after end). */
|
|
17
|
+
get sessionActive(): boolean;
|
|
18
|
+
/** Drive the panel's live-control visual state (server-push / agent path; never emits). */
|
|
19
|
+
setState(state: SessionState, text?: string, tone?: PresenterTone): void;
|
|
20
|
+
/** Apply a bridge→browser presenter push: PRESENTER (state echo) or FLOWS (replay list, the human's
|
|
21
|
+
* no-agent replay surface). Owns the wire parsing so the SDK dispatcher stays a thin router;
|
|
22
|
+
* setState-only so an echo can't re-emit. */
|
|
23
|
+
/** Re-scope the replay-flow chips to the current page (called by the SDK on route change). */
|
|
24
|
+
refilterFlows(): void;
|
|
25
|
+
handlePush(command: {
|
|
26
|
+
name: string;
|
|
27
|
+
args: Record<string, unknown>;
|
|
28
|
+
}): void;
|
|
29
|
+
/** Current cap on accumulated log rows. */
|
|
30
|
+
get logMax(): number;
|
|
31
|
+
set logMax(n: number);
|
|
32
|
+
mount(): void;
|
|
33
|
+
destroy(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Session start: in 'session' border mode this fades the base border IN and keeps it on until
|
|
36
|
+
* sessionEnd(). Idempotent, and a no-op when unmounted or in 'busy' border mode.
|
|
37
|
+
*/
|
|
38
|
+
sessionStart(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Session end: hides the log/HUD and (in 'session' mode) clears the base border. Idempotent; a
|
|
41
|
+
* no-op without a prior sessionStart or when unmounted.
|
|
42
|
+
*/
|
|
43
|
+
sessionEnd(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Record agent activity. Idempotent while busy — only the first activity from idle/fading flips
|
|
46
|
+
* the glow on, so a burst never restarts the reticle-pulse animation (no strobe). Subsequent calls
|
|
47
|
+
* just refresh the last-activity timestamp and re-arm the idle check.
|
|
48
|
+
*/
|
|
49
|
+
markActivity(): void;
|
|
50
|
+
/** Re-arm the quiet-window idle check (kept for reticle.ts's finally block). */
|
|
51
|
+
scheduleIdle(): void;
|
|
52
|
+
/** Test/diagnostic accessor for the current glow phase. */
|
|
53
|
+
glowPhase(): GlowPhase;
|
|
54
|
+
/** Current intent (reading vs acting), exposed for tests + the watcher. */
|
|
55
|
+
get mode(): PresenterMode;
|
|
56
|
+
/**
|
|
57
|
+
* Set the presenter intent. READING shows a cyan scan + chip and hides the cursor; ACTING
|
|
58
|
+
* keeps the warm cursor/ripple + chip; IDLE clears the chip. Drives color via data-reticle-mode.
|
|
59
|
+
*/
|
|
60
|
+
setMode(mode: PresenterMode): void;
|
|
61
|
+
status(text: string): void;
|
|
62
|
+
/** Agent-tunable idle-end window (reticle_session). Floored so it can't be set uselessly small. */
|
|
63
|
+
setIdleEndMs(ms: number): void;
|
|
64
|
+
/**
|
|
65
|
+
* The exported "run state" for the Copy/Export buttons — everything the page holds about this
|
|
66
|
+
* run: session id, url, duration, capability surface, per-kind counts, and the full activity log.
|
|
67
|
+
* (The full network/console ring-buffer lives server-side; this is the in-page run summary.)
|
|
68
|
+
*/
|
|
69
|
+
runState(): PresenterRunState;
|
|
70
|
+
/**
|
|
71
|
+
* Append an activity-log row. Accumulates (never overwrites): each call adds a timestamped row
|
|
72
|
+
* with a mode chip + text. Returns a handle to stamp the row's outcome glyph (✓/✗) later, or
|
|
73
|
+
* undefined when unmounted / when the text is empty after trimming.
|
|
74
|
+
*/
|
|
75
|
+
log(kind: LogKind, text: string, result?: LogResult): LogHandle | undefined;
|
|
76
|
+
/** Back-compat: narration appends to the live log (append-only, never overwrites). */
|
|
77
|
+
narrate(text: string, level?: string): LogHandle | undefined;
|
|
78
|
+
/** Legacy no-op kept for source compat; outcomes now flow through LogHandle.result(). */
|
|
79
|
+
result(_ok: boolean): void;
|
|
80
|
+
/**
|
|
81
|
+
* Mirror the server's session.throttled() state onto the HUD border. When throttled (tab
|
|
82
|
+
* backgrounded or stale), the border turns amber so the developer knows actions are no-oping —
|
|
83
|
+
* the same signal the agent already reads from result.session.throttled.
|
|
84
|
+
*/
|
|
85
|
+
setThrottled(throttled: boolean): void;
|
|
86
|
+
/** Fly the cursor to an element, play the action's effect, then pace for the human. */
|
|
87
|
+
beforeAct(refId: string, action: string, label: string): Promise<void>;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=presenter.d.ts.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/core';
|
|
2
|
+
import { refs } from '../dom/refs.js';
|
|
3
|
+
import { actionVerb } from './presenter-verbs.js';
|
|
4
|
+
import { nativeSetTimeout, nativeClearTimeout, nativeNow } from '../timers/native-timers.js';
|
|
5
|
+
import { LOG_KIND, CHIP_LABEL, DATA_RETICLE_LOG, HUMAN_ROW_PREFIX, clampLogMax, formatElapsed, humanDuration, appendLogRow, } from './presenter-log.js';
|
|
6
|
+
import { PRESENTER_CSS } from './presenter-styles.js';
|
|
7
|
+
import { BorderMode, DEFAULT_BORDER_MODE, DATA_BUSY, BUSY_OFF, DEFAULT_PACE, GlowPhase, IDLE_AFTER_MS, HEARTBEAT_MS, IDLE_NOTICE_MS, IDLE_END_MS, IDLE_END_MIN_MS, GLOW_FADE_MS, GLOW_ON, GLOW_OFF, DATA_ON, MIN_ATTR, THROTTLED_ATTR, } from './presenter-config.js';
|
|
8
|
+
import { buildRunState } from './presenter-run-state.js';
|
|
9
|
+
import { moveCursor, ringAround, spawnRipple, pace } from './presenter-effects.js';
|
|
10
|
+
import { GlowController } from './presenter-glow.js';
|
|
11
|
+
import { renderTally } from './presenter-tally.js';
|
|
12
|
+
import { CONTROLS_HEAD_HTML, CONTROLS_BANNER_HTML, CONTROLS_FLOWS_HTML, CONTROLS_FOOT_HTML, ENDED_FADE_MS, ControlPanel, } from './presenter-controls.js';
|
|
13
|
+
// Re-export the config surface so the public import path (`./presenter.js`) is unchanged.
|
|
14
|
+
export { GlowPhase } from './presenter-config.js';
|
|
15
|
+
export { LOG_KIND, LOG_RESULT, } from './presenter-log.js';
|
|
16
|
+
// Presenter / transparency layer: a human watches the agent work. Glowing border while
|
|
17
|
+
// active, a synthetic cursor that flies to targets, click/hover/type effects, and a HUD that
|
|
18
|
+
// shows the current action + the agent's narrated intent. All nodes carry data-reticle-* attrs
|
|
19
|
+
// so they're excluded from snapshots/observers (see dom-ignore.ts).
|
|
20
|
+
export class Presenter {
|
|
21
|
+
#paceMs;
|
|
22
|
+
#root;
|
|
23
|
+
#glow;
|
|
24
|
+
#cursor;
|
|
25
|
+
#ring;
|
|
26
|
+
#hud;
|
|
27
|
+
#actLine;
|
|
28
|
+
#chip;
|
|
29
|
+
/** Live verdict tally (✓N ✗M) in the header — the running testing score the human watches. */
|
|
30
|
+
#tally;
|
|
31
|
+
#tallied = { passes: 0, fails: 0 };
|
|
32
|
+
#liveLine;
|
|
33
|
+
#mode = PresenterMode.IDLE;
|
|
34
|
+
#now;
|
|
35
|
+
#heartbeatMs;
|
|
36
|
+
#idleNoticeMs;
|
|
37
|
+
#borderMode;
|
|
38
|
+
/** The glow / activity state machine (border shimmer + cursor visibility from activity timing). */
|
|
39
|
+
#glowCtl;
|
|
40
|
+
/** Liveness: the most recent action text + a 1s ticker that ages it into an "idle · {dur}" clock. */
|
|
41
|
+
#lastActionText = '';
|
|
42
|
+
#heartbeatTimer;
|
|
43
|
+
/** Session lifecycle: idle-end window (tweakable), session id, start/end cursors, structured run log. */
|
|
44
|
+
#idleEndMs;
|
|
45
|
+
#sessionId;
|
|
46
|
+
#startMs;
|
|
47
|
+
#endMs;
|
|
48
|
+
#runLog = [];
|
|
49
|
+
/** Tracks sessionStart/sessionEnd so both are idempotent (no strobe / no spurious off-write). */
|
|
50
|
+
#sessionActive = false;
|
|
51
|
+
// v2: narration + action status accumulate in a persistent, timestamped, scrollable log.
|
|
52
|
+
#logMax;
|
|
53
|
+
#log;
|
|
54
|
+
/** now() of the first row, the baseline for the +elapsed timestamps. */
|
|
55
|
+
#logBaseMs;
|
|
56
|
+
// Live-control panel: the two-way control surface (Pause/Resume + End + message Send).
|
|
57
|
+
#onControl;
|
|
58
|
+
#panel;
|
|
59
|
+
constructor(options = {}) {
|
|
60
|
+
this.#paceMs = options.paceMs ?? DEFAULT_PACE;
|
|
61
|
+
this.#now = options.now ?? nativeNow;
|
|
62
|
+
this.#heartbeatMs = options.heartbeatMs ?? HEARTBEAT_MS;
|
|
63
|
+
this.#idleNoticeMs = options.idleNoticeMs ?? IDLE_NOTICE_MS;
|
|
64
|
+
this.#idleEndMs = options.idleEndMs ?? IDLE_END_MS;
|
|
65
|
+
this.#sessionId = options.sessionId ?? '';
|
|
66
|
+
this.#borderMode = options.border ?? DEFAULT_BORDER_MODE;
|
|
67
|
+
this.#glowCtl = new GlowController({
|
|
68
|
+
now: this.#now,
|
|
69
|
+
idleAfterMs: options.idleAfterMs ?? IDLE_AFTER_MS,
|
|
70
|
+
glowFadeMs: options.glowFadeMs ?? GLOW_FADE_MS,
|
|
71
|
+
borderMode: this.#borderMode,
|
|
72
|
+
setMode: (mode) => this.setMode(mode),
|
|
73
|
+
});
|
|
74
|
+
this.#logMax = clampLogMax(options.logMax);
|
|
75
|
+
this.#onControl = options.onControl;
|
|
76
|
+
this.#panel = new ControlPanel({
|
|
77
|
+
emit: (kind, text) => this.#onControl?.(text !== undefined ? { kind, text } : { kind }),
|
|
78
|
+
logHuman: (text) => {
|
|
79
|
+
this.log(LOG_KIND.HUMAN, HUMAN_ROW_PREFIX + text);
|
|
80
|
+
},
|
|
81
|
+
endedFadeMs: options.endedFadeMs ?? ENDED_FADE_MS,
|
|
82
|
+
runState: () => this.runState(),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/** Setter so reticle.ts can wire the control callback after construction. */
|
|
86
|
+
setControlHandler(handler) {
|
|
87
|
+
this.#onControl = handler;
|
|
88
|
+
}
|
|
89
|
+
/** Current live-control session state mirrored onto the panel (data-reticle-state). */
|
|
90
|
+
get state() {
|
|
91
|
+
return this.#panel.state;
|
|
92
|
+
}
|
|
93
|
+
/** Whether a run is currently being presented (false before the agent's first activity / after end). */
|
|
94
|
+
get sessionActive() {
|
|
95
|
+
return this.#sessionActive;
|
|
96
|
+
}
|
|
97
|
+
/** Drive the panel's live-control visual state (server-push / agent path; never emits). */
|
|
98
|
+
setState(state, text, tone) {
|
|
99
|
+
this.#panel.setState(state, text, tone);
|
|
100
|
+
}
|
|
101
|
+
/** Apply a bridge→browser presenter push: PRESENTER (state echo) or FLOWS (replay list, the human's
|
|
102
|
+
* no-agent replay surface). Owns the wire parsing so the SDK dispatcher stays a thin router;
|
|
103
|
+
* setState-only so an echo can't re-emit. */
|
|
104
|
+
/** Re-scope the replay-flow chips to the current page (called by the SDK on route change). */
|
|
105
|
+
refilterFlows() {
|
|
106
|
+
this.#panel.refilterFlows();
|
|
107
|
+
}
|
|
108
|
+
handlePush(command) {
|
|
109
|
+
const a = command.args;
|
|
110
|
+
if (command.name === ReticleCommand.FLOWS)
|
|
111
|
+
return void this.#panel.setFlows(a['flows']);
|
|
112
|
+
const state = a['state'];
|
|
113
|
+
const tone = a['tone'];
|
|
114
|
+
const text = typeof a['text'] === 'string' && a['text'].length > 0 ? a['text'] : undefined;
|
|
115
|
+
if (isSessionState(state))
|
|
116
|
+
this.setState(state, text, isPresenterTone(tone) ? tone : undefined);
|
|
117
|
+
}
|
|
118
|
+
/** Current cap on accumulated log rows. */
|
|
119
|
+
get logMax() {
|
|
120
|
+
return this.#logMax;
|
|
121
|
+
}
|
|
122
|
+
set logMax(n) {
|
|
123
|
+
this.#logMax = clampLogMax(n);
|
|
124
|
+
this.#pruneLog();
|
|
125
|
+
}
|
|
126
|
+
mount() {
|
|
127
|
+
if (this.#root !== undefined || typeof document === 'undefined')
|
|
128
|
+
return;
|
|
129
|
+
const style = document.createElement('style');
|
|
130
|
+
style.setAttribute('data-reticle-overlay', '');
|
|
131
|
+
style.textContent = PRESENTER_CSS;
|
|
132
|
+
document.head.appendChild(style);
|
|
133
|
+
const root = document.createElement('div');
|
|
134
|
+
root.setAttribute('data-reticle-overlay', '');
|
|
135
|
+
root.innerHTML = `
|
|
136
|
+
<div data-reticle-glow></div>
|
|
137
|
+
<div data-reticle-cursor></div>
|
|
138
|
+
<div data-reticle-ring></div>
|
|
139
|
+
<div data-reticle-hud>
|
|
140
|
+
<div class="reticle-hud-head"><span class="reticle-dot"></span><span class="reticle-brand">Reticle</span><span class="reticle-chip" data-reticle-chip></span><span class="reticle-tally" data-reticle-tally hidden></span><span class="reticle-live"></span><span class="reticle-head-sp"></span><button type="button" data-reticle-min-btn title="Minimise" aria-label="Minimise the panel">⌄</button>${CONTROLS_HEAD_HTML}<span class="reticle-maxhint" aria-hidden="true">⌃</span></div>
|
|
141
|
+
<div class="reticle-act-strip"><span class="reticle-act">idle</span></div>
|
|
142
|
+
${CONTROLS_BANNER_HTML}
|
|
143
|
+
<div ${DATA_RETICLE_LOG}></div>
|
|
144
|
+
${CONTROLS_FLOWS_HTML}
|
|
145
|
+
${CONTROLS_FOOT_HTML}
|
|
146
|
+
</div>`;
|
|
147
|
+
document.body.appendChild(root);
|
|
148
|
+
this.#root = root;
|
|
149
|
+
this.#glow = root.querySelector('[data-reticle-glow]') ?? undefined;
|
|
150
|
+
this.#cursor = root.querySelector('[data-reticle-cursor]') ?? undefined;
|
|
151
|
+
this.#ring = root.querySelector('[data-reticle-ring]') ?? undefined;
|
|
152
|
+
this.#hud = root.querySelector('[data-reticle-hud]') ?? undefined;
|
|
153
|
+
this.#actLine = root.querySelector('.reticle-act') ?? undefined;
|
|
154
|
+
this.#log = root.querySelector(`[${DATA_RETICLE_LOG}]`) ?? undefined;
|
|
155
|
+
this.#chip = root.querySelector('[data-reticle-chip]') ?? undefined;
|
|
156
|
+
this.#tally = root.querySelector('[data-reticle-tally]') ?? undefined;
|
|
157
|
+
this.#liveLine = root.querySelector('.reticle-live') ?? undefined;
|
|
158
|
+
// Minimise → collapse the panel to a bar (only the live line streams). Click the bar to restore.
|
|
159
|
+
const setMin = (on) => root.setAttribute(MIN_ATTR, on ? '1' : '0');
|
|
160
|
+
root.querySelector('[data-reticle-min-btn]')?.addEventListener('click', (e) => {
|
|
161
|
+
e.stopPropagation(); // don't let the head's maximise handler immediately re-open it
|
|
162
|
+
setMin(true);
|
|
163
|
+
});
|
|
164
|
+
root.querySelector('.reticle-hud-head')?.addEventListener('click', () => {
|
|
165
|
+
if (root.getAttribute(MIN_ATTR) === '1')
|
|
166
|
+
setMin(false); // clicking the minimised bar restores
|
|
167
|
+
});
|
|
168
|
+
this.#glowCtl.setElements(this.#glow, this.#cursor);
|
|
169
|
+
// The panel queries its refs, binds listeners, and paints the initial active state.
|
|
170
|
+
this.#panel.mount(root, this.#glow);
|
|
171
|
+
this.setMode(this.#mode);
|
|
172
|
+
}
|
|
173
|
+
destroy() {
|
|
174
|
+
this.#glowCtl.teardown();
|
|
175
|
+
if (this.#heartbeatTimer !== undefined)
|
|
176
|
+
nativeClearTimeout(this.#heartbeatTimer);
|
|
177
|
+
this.#heartbeatTimer = undefined;
|
|
178
|
+
this.#panel.teardown();
|
|
179
|
+
this.#sessionActive = false;
|
|
180
|
+
this.#logBaseMs = undefined;
|
|
181
|
+
this.#log = undefined;
|
|
182
|
+
this.#root?.remove();
|
|
183
|
+
document.querySelectorAll('style[data-reticle-overlay]').forEach((s) => s.remove());
|
|
184
|
+
this.#root = undefined;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Session start: in 'session' border mode this fades the base border IN and keeps it on until
|
|
188
|
+
* sessionEnd(). Idempotent, and a no-op when unmounted or in 'busy' border mode.
|
|
189
|
+
*/
|
|
190
|
+
sessionStart() {
|
|
191
|
+
// Returning agent activity after the session ended (idle or explicit) revives it as a fresh run.
|
|
192
|
+
if (this.state === SessionState.ENDED) {
|
|
193
|
+
this.#revive();
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
if (this.#sessionActive)
|
|
197
|
+
return;
|
|
198
|
+
this.#sessionActive = true;
|
|
199
|
+
this.#startMs ??= this.#now();
|
|
200
|
+
this.#endMs = undefined;
|
|
201
|
+
this.#showSession();
|
|
202
|
+
this.#glowCtl.resetActivity(this.#now());
|
|
203
|
+
this.#startHeartbeat();
|
|
204
|
+
}
|
|
205
|
+
/** Turn the base border (session mode) + the HUD/log on — the visible "session is live" state. */
|
|
206
|
+
#showSession() {
|
|
207
|
+
// The activity log/HUD persists the WHOLE session, like the border — it never fades on idle.
|
|
208
|
+
this.#hud?.setAttribute(DATA_ON, GLOW_ON);
|
|
209
|
+
// Base border persists in 'session' mode; 'busy' mode leaves it to the busy machine.
|
|
210
|
+
if (this.#borderMode === BorderMode.SESSION)
|
|
211
|
+
this.#glow?.setAttribute(DATA_ON, GLOW_ON);
|
|
212
|
+
}
|
|
213
|
+
/** Revive after an ended session (new agent activity): clear the ended state + glow back on. */
|
|
214
|
+
#revive() {
|
|
215
|
+
this.#panel.setState(SessionState.ACTIVE);
|
|
216
|
+
this.#endMs = undefined;
|
|
217
|
+
this.#showSession();
|
|
218
|
+
this.#glowCtl.resetActivity(this.#now());
|
|
219
|
+
this.#startHeartbeat();
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Session end: hides the log/HUD and (in 'session' mode) clears the base border. Idempotent; a
|
|
223
|
+
* no-op without a prior sessionStart or when unmounted.
|
|
224
|
+
*/
|
|
225
|
+
sessionEnd() {
|
|
226
|
+
if (!this.#sessionActive)
|
|
227
|
+
return;
|
|
228
|
+
this.#sessionActive = false;
|
|
229
|
+
if (this.#heartbeatTimer !== undefined) {
|
|
230
|
+
nativeClearTimeout(this.#heartbeatTimer);
|
|
231
|
+
this.#heartbeatTimer = undefined;
|
|
232
|
+
}
|
|
233
|
+
this.#hud?.setAttribute(DATA_ON, GLOW_OFF);
|
|
234
|
+
if (this.#borderMode === BorderMode.SESSION) {
|
|
235
|
+
this.#glow?.setAttribute(DATA_ON, GLOW_OFF);
|
|
236
|
+
this.#glow?.setAttribute(DATA_BUSY, BUSY_OFF);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Record agent activity. Idempotent while busy — only the first activity from idle/fading flips
|
|
241
|
+
* the glow on, so a burst never restarts the reticle-pulse animation (no strobe). Subsequent calls
|
|
242
|
+
* just refresh the last-activity timestamp and re-arm the idle check.
|
|
243
|
+
*/
|
|
244
|
+
markActivity() {
|
|
245
|
+
this.#glowCtl.markActivity();
|
|
246
|
+
}
|
|
247
|
+
/** Re-arm the quiet-window idle check (kept for reticle.ts's finally block). */
|
|
248
|
+
scheduleIdle() {
|
|
249
|
+
this.#glowCtl.scheduleIdle();
|
|
250
|
+
}
|
|
251
|
+
/** Test/diagnostic accessor for the current glow phase. */
|
|
252
|
+
glowPhase() {
|
|
253
|
+
return this.#glowCtl.phase();
|
|
254
|
+
}
|
|
255
|
+
/** Current intent (reading vs acting), exposed for tests + the watcher. */
|
|
256
|
+
get mode() {
|
|
257
|
+
return this.#mode;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Set the presenter intent. READING shows a cyan scan + chip and hides the cursor; ACTING
|
|
261
|
+
* keeps the warm cursor/ripple + chip; IDLE clears the chip. Drives color via data-reticle-mode.
|
|
262
|
+
*/
|
|
263
|
+
setMode(mode) {
|
|
264
|
+
this.#mode = mode;
|
|
265
|
+
this.#root?.setAttribute('data-reticle-mode', mode);
|
|
266
|
+
if (this.#chip !== undefined) {
|
|
267
|
+
this.#chip.textContent = CHIP_LABEL[mode];
|
|
268
|
+
this.#chip.setAttribute('data-mode', mode);
|
|
269
|
+
}
|
|
270
|
+
// READING has no real pointer to show (synthetic-hover pointer is native-only) — hide the cursor.
|
|
271
|
+
if (mode === PresenterMode.READING)
|
|
272
|
+
this.#cursor?.setAttribute(DATA_ON, GLOW_OFF);
|
|
273
|
+
}
|
|
274
|
+
status(text) {
|
|
275
|
+
this.markActivity();
|
|
276
|
+
this.#lastActionText = text;
|
|
277
|
+
if (this.#actLine !== undefined)
|
|
278
|
+
this.#actLine.textContent = text;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Liveness heartbeat (native 1s timer — never rAF, so it ticks in a foreground tab regardless of
|
|
282
|
+
* agent activity). Once the agent has been quiet for IDLE_NOTICE_MS, the act strip shows a LIVE,
|
|
283
|
+
* growing "◌ idle · {duration} since last action" — the signal that was missing when a stopped
|
|
284
|
+
* agent left the panel frozen and indistinguishable from one still thinking.
|
|
285
|
+
*/
|
|
286
|
+
#startHeartbeat() {
|
|
287
|
+
if (this.#heartbeatTimer !== undefined)
|
|
288
|
+
nativeClearTimeout(this.#heartbeatTimer);
|
|
289
|
+
const tick = () => {
|
|
290
|
+
this.#tickLiveness();
|
|
291
|
+
this.#heartbeatTimer = nativeSetTimeout(tick, this.#heartbeatMs);
|
|
292
|
+
};
|
|
293
|
+
this.#heartbeatTimer = nativeSetTimeout(tick, this.#heartbeatMs);
|
|
294
|
+
}
|
|
295
|
+
#tickLiveness() {
|
|
296
|
+
if (!this.#sessionActive || this.#actLine === undefined)
|
|
297
|
+
return;
|
|
298
|
+
if (this.state === SessionState.ENDED)
|
|
299
|
+
return; // already ended — leave the summary
|
|
300
|
+
const idleMs = this.#now() - this.#glowCtl.lastActivityMs();
|
|
301
|
+
if (idleMs >= this.#idleEndMs) {
|
|
302
|
+
this.#endIdle(idleMs); // crossed the idle-end window → auto-end (glow off, panel kept)
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
if (idleMs < this.#idleNoticeMs)
|
|
306
|
+
return; // still active (or a brief think) — keep the action text
|
|
307
|
+
const since = this.#lastActionText !== '' ? ` since last action` : '';
|
|
308
|
+
this.#actLine.textContent = `◌ idle · ${humanDuration(idleMs)}${since}`;
|
|
309
|
+
}
|
|
310
|
+
/** Auto-end after the idle window: stamp the end, drive the panel to ENDED, stop the heartbeat. */
|
|
311
|
+
#endIdle(idleMs) {
|
|
312
|
+
this.#endMs = this.#now();
|
|
313
|
+
this.#panel.setState(SessionState.ENDED, `idle ${humanDuration(idleMs)}`);
|
|
314
|
+
if (this.#heartbeatTimer !== undefined) {
|
|
315
|
+
nativeClearTimeout(this.#heartbeatTimer);
|
|
316
|
+
this.#heartbeatTimer = undefined;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
/** Agent-tunable idle-end window (reticle_session). Floored so it can't be set uselessly small. */
|
|
320
|
+
setIdleEndMs(ms) {
|
|
321
|
+
if (!Number.isFinite(ms))
|
|
322
|
+
return;
|
|
323
|
+
this.#idleEndMs = Math.max(IDLE_END_MIN_MS, Math.floor(ms));
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* The exported "run state" for the Copy/Export buttons — everything the page holds about this
|
|
327
|
+
* run: session id, url, duration, capability surface, per-kind counts, and the full activity log.
|
|
328
|
+
* (The full network/console ring-buffer lives server-side; this is the in-page run summary.)
|
|
329
|
+
*/
|
|
330
|
+
runState() {
|
|
331
|
+
return buildRunState({
|
|
332
|
+
sessionId: this.#sessionId,
|
|
333
|
+
state: this.state,
|
|
334
|
+
startMs: this.#startMs,
|
|
335
|
+
endMs: this.#endMs,
|
|
336
|
+
now: this.#now(),
|
|
337
|
+
runLog: this.#runLog,
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Append an activity-log row. Accumulates (never overwrites): each call adds a timestamped row
|
|
342
|
+
* with a mode chip + text. Returns a handle to stamp the row's outcome glyph (✓/✗) later, or
|
|
343
|
+
* undefined when unmounted / when the text is empty after trimming.
|
|
344
|
+
*/
|
|
345
|
+
log(kind, text, result) {
|
|
346
|
+
const ms = this.#now();
|
|
347
|
+
this.#glowCtl.markActivity(ms);
|
|
348
|
+
if (this.#log === undefined)
|
|
349
|
+
return undefined;
|
|
350
|
+
const trimmed = text.trim();
|
|
351
|
+
if (trimmed.length === 0)
|
|
352
|
+
return undefined;
|
|
353
|
+
this.#logBaseMs ??= ms;
|
|
354
|
+
// Structured run-log entry (mirrors the DOM row) for the exported run state, capped like the DOM.
|
|
355
|
+
const entry = result !== undefined
|
|
356
|
+
? { at: ms - this.#logBaseMs, kind, text: trimmed, result }
|
|
357
|
+
: { at: ms - this.#logBaseMs, kind, text: trimmed };
|
|
358
|
+
this.#runLog.push(entry);
|
|
359
|
+
while (this.#runLog.length > this.#logMax)
|
|
360
|
+
this.#runLog.shift();
|
|
361
|
+
const ts = formatElapsed(ms - this.#logBaseMs);
|
|
362
|
+
const handle = appendLogRow(this.#log, kind, trimmed, ts, this.#logMax);
|
|
363
|
+
if (result !== undefined)
|
|
364
|
+
handle.result(result);
|
|
365
|
+
// Feed the minimised-bar live line so the latest activity always shows when collapsed.
|
|
366
|
+
if (this.#liveLine !== undefined)
|
|
367
|
+
this.#liveLine.textContent = trimmed;
|
|
368
|
+
this.#renderTally(); // a row that landed with a verdict updates the header score immediately
|
|
369
|
+
// Wrap the handle so a later outcome stamp updates BOTH the DOM glyph and the run-log entry.
|
|
370
|
+
return {
|
|
371
|
+
result: (r) => {
|
|
372
|
+
handle.result(r);
|
|
373
|
+
entry.result = r;
|
|
374
|
+
this.#renderTally(); // a deferred ✓/✗ stamp bumps the header tally
|
|
375
|
+
},
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
/** Repaint the header verdict tally from the run log; the side that grew gets a one-shot pop. */
|
|
379
|
+
#renderTally() {
|
|
380
|
+
this.#tallied = renderTally(this.#tally, this.#runLog, this.#tallied);
|
|
381
|
+
}
|
|
382
|
+
/** Back-compat: narration appends to the live log (append-only, never overwrites). */
|
|
383
|
+
narrate(text, level = 'info') {
|
|
384
|
+
const line = level === 'info' ? text : `[${level}] ${text}`;
|
|
385
|
+
return this.log(LOG_KIND.NARRATION, line);
|
|
386
|
+
}
|
|
387
|
+
#pruneLog() {
|
|
388
|
+
if (this.#log === undefined)
|
|
389
|
+
return;
|
|
390
|
+
while (this.#log.childElementCount > this.#logMax) {
|
|
391
|
+
this.#log.firstElementChild?.remove();
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
/** Legacy no-op kept for source compat; outcomes now flow through LogHandle.result(). */
|
|
395
|
+
result(_ok) {
|
|
396
|
+
/* no-op */
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Mirror the server's session.throttled() state onto the HUD border. When throttled (tab
|
|
400
|
+
* backgrounded or stale), the border turns amber so the developer knows actions are no-oping —
|
|
401
|
+
* the same signal the agent already reads from result.session.throttled.
|
|
402
|
+
*/
|
|
403
|
+
setThrottled(throttled) {
|
|
404
|
+
this.#root?.setAttribute(THROTTLED_ATTR, throttled ? '1' : '0');
|
|
405
|
+
if (throttled && this.#actLine !== undefined) {
|
|
406
|
+
this.#actLine.textContent =
|
|
407
|
+
'Tab backgrounded — actions throttled. Bring tab to front or use `reticle drive`.';
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
/** Fly the cursor to an element, play the action's effect, then pace for the human. */
|
|
411
|
+
async beforeAct(refId, action, label) {
|
|
412
|
+
const el = refs.resolve(refId);
|
|
413
|
+
this.status(`${actionVerb(action)} ${label}`);
|
|
414
|
+
if (!(el instanceof HTMLElement)) {
|
|
415
|
+
await pace(this.#paceMs);
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
const rect = el.getBoundingClientRect();
|
|
419
|
+
const cx = rect.left + rect.width / 2;
|
|
420
|
+
const cy = rect.top + rect.height / 2;
|
|
421
|
+
moveCursor(this.#cursor, cx, cy);
|
|
422
|
+
ringAround(this.#ring, rect);
|
|
423
|
+
await pace(this.#paceMs);
|
|
424
|
+
if (action === 'click' || action === 'dblclick' || action === 'submit')
|
|
425
|
+
spawnRipple(this.#root, cx, cy);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
//# sourceMappingURL=presenter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presenter.js","sourceRoot":"","sources":["../../src/presenter/presenter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,aAAa,EAEb,YAAY,EACZ,eAAe,EACf,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC7F,OAAO,EACL,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,aAA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der toolbar. Browser-local UI
|
|
3
|
+
* text (never crosses the wire), split out of recorder.ts to keep that file under the 500-line cap
|
|
4
|
+
* (mirrors how presenter.ts extracts presenter-log.ts). All toolbar nodes also carry
|
|
5
|
+
* data-reticle-overlay, so they are snapshot-excluded via dom-ignore.ts regardless of these styles.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TOOLBAR_CSS: string;
|
|
8
|
+
export declare const BTN_CSS: string;
|
|
9
|
+
export declare const NAME_CSS: string;
|
|
10
|
+
export declare const STATUS_CSS: string;
|
|
11
|
+
export declare const MENU_CSS: string;
|
|
12
|
+
//# sourceMappingURL=recorder-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recorder-styles.d.ts","sourceRoot":"","sources":["../../src/recorder/recorder-styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,WAAW,QAkBb,CAAC;AAEZ,eAAO,MAAM,OAAO,QAQT,CAAC;AAEZ,eAAO,MAAM,QAAQ,QAOV,CAAC;AAEZ,eAAO,MAAM,UAAU,QAA+C,CAAC;AACvE,eAAO,MAAM,QAAQ,QAEpB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline style strings for the floating recorder toolbar. Browser-local UI
|
|
3
|
+
* text (never crosses the wire), split out of recorder.ts to keep that file under the 500-line cap
|
|
4
|
+
* (mirrors how presenter.ts extracts presenter-log.ts). All toolbar nodes also carry
|
|
5
|
+
* data-reticle-overlay, so they are snapshot-excluded via dom-ignore.ts regardless of these styles.
|
|
6
|
+
*/
|
|
7
|
+
export const TOOLBAR_CSS = [
|
|
8
|
+
'position:fixed',
|
|
9
|
+
'top:8px',
|
|
10
|
+
'left:50%',
|
|
11
|
+
'transform:translateX(-50%)',
|
|
12
|
+
'z-index:2147483647',
|
|
13
|
+
'display:flex',
|
|
14
|
+
'gap:6px',
|
|
15
|
+
'align-items:center',
|
|
16
|
+
'flex-wrap:wrap',
|
|
17
|
+
'max-width:90vw',
|
|
18
|
+
'font:12px ui-sans-serif,system-ui,sans-serif',
|
|
19
|
+
'background:#151823',
|
|
20
|
+
'color:#e6e9f0',
|
|
21
|
+
'border:1px solid #2a2f3d',
|
|
22
|
+
'border-radius:10px',
|
|
23
|
+
'padding:6px 10px',
|
|
24
|
+
'box-shadow:0 8px 30px rgba(0,0,0,.5)',
|
|
25
|
+
].join(';');
|
|
26
|
+
export const BTN_CSS = [
|
|
27
|
+
'font:inherit',
|
|
28
|
+
'cursor:pointer',
|
|
29
|
+
'background:#262b3a',
|
|
30
|
+
'color:#e6e9f0',
|
|
31
|
+
'border:1px solid #3a4151',
|
|
32
|
+
'border-radius:7px',
|
|
33
|
+
'padding:3px 9px',
|
|
34
|
+
].join(';');
|
|
35
|
+
export const NAME_CSS = [
|
|
36
|
+
'font:inherit',
|
|
37
|
+
'background:#0e1018',
|
|
38
|
+
'color:#e6e9f0',
|
|
39
|
+
'border:1px solid #3a4151',
|
|
40
|
+
'border-radius:7px',
|
|
41
|
+
'padding:3px 8px',
|
|
42
|
+
].join(';');
|
|
43
|
+
export const STATUS_CSS = ['opacity:.75', 'margin-left:4px'].join(';');
|
|
44
|
+
export const MENU_CSS = ['display:flex', 'gap:6px', 'align-items:center', 'flex-wrap:wrap'].join(';');
|
|
45
|
+
//# sourceMappingURL=recorder-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recorder-styles.js","sourceRoot":"","sources":["../../src/recorder/recorder-styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,gBAAgB;IAChB,SAAS;IACT,UAAU;IACV,4BAA4B;IAC5B,oBAAoB;IACpB,cAAc;IACd,SAAS;IACT,oBAAoB;IACpB,gBAAgB;IAChB,gBAAgB;IAChB,8CAA8C;IAC9C,oBAAoB;IACpB,eAAe;IACf,0BAA0B;IAC1B,oBAAoB;IACpB,kBAAkB;IAClB,sCAAsC;CACvC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc;IACd,gBAAgB;IAChB,oBAAoB;IACpB,eAAe;IACf,0BAA0B;IAC1B,mBAAmB;IACnB,iBAAiB;CAClB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,cAAc;IACd,oBAAoB;IACpB,eAAe;IACf,0BAA0B;IAC1B,mBAAmB;IACnB,iBAAiB;CAClB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACvE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,cAAc,EAAE,SAAS,EAAE,oBAAoB,EAAE,gBAAgB,CAAC,CAAC,IAAI,CAC9F,GAAG,CACJ,CAAC"}
|