@vitrinka/web 0.2.2 → 0.3.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/CHANGELOG.md +27 -0
- package/README.md +46 -4
- package/build/hud.d.ts +1 -1
- package/build/hud.iife.js +9 -8
- package/build/recorder/RecorderProvider.d.ts +2 -1
- package/build/recorder/RecorderProvider.js +18 -4
- package/build/recorder/capture/net.js +16 -10
- package/build/recorder/capture/redact.d.ts +3 -1
- package/build/recorder/capture/redact.js +2 -1
- package/build/recorder/capture/rrweb.d.ts +7 -1
- package/build/recorder/capture/rrweb.js +21 -6
- package/build/recorder/config.d.ts +6 -0
- package/build/recorder/config.js +1 -0
- package/build/recorder/flight.d.ts +63 -0
- package/build/recorder/flight.js +93 -0
- package/build/recorder/hud/Hud.d.ts +2 -1
- package/build/recorder/hud/Hud.js +113 -11
- package/build/recorder/hud/Menu.d.ts +4 -2
- package/build/recorder/hud/Menu.js +2 -2
- package/build/recorder/hud/RecorderPill.d.ts +2 -1
- package/build/recorder/hud/RecorderPill.js +11 -5
- package/build/recorder/hud/Sheet.d.ts +11 -2
- package/build/recorder/hud/Sheet.js +13 -4
- package/build/recorder/hud/controller.d.ts +29 -0
- package/build/recorder/hud/flow.d.ts +13 -3
- package/build/recorder/hud/flow.js +17 -6
- package/build/recorder/hud/icons.d.ts +1 -0
- package/build/recorder/hud/icons.js +3 -0
- package/build/recorder/hud/styles.d.ts +1 -1
- package/build/recorder/hud/styles.js +1 -0
- package/build/recorder/index.d.ts +5 -0
- package/build/recorder/index.js +9 -1
- package/build/recorder/page-controller.js +4 -0
- package/build/recorder/queue.d.ts +11 -4
- package/build/recorder/queue.js +15 -8
- package/build/recorder/report.d.ts +36 -0
- package/build/recorder/report.js +250 -0
- package/build/recorder/session.d.ts +12 -2
- package/build/recorder/session.js +23 -10
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The ⋯ menu: who the recorder is linked as, the open board,
|
|
3
|
-
* recent recordings and "Go to vitrinka", then the HUD's own settings —
|
|
2
|
+
* The ⋯ menu: who the recorder is linked as, "Report a bug", the open board,
|
|
3
|
+
* the device's recent recordings and "Go to vitrinka", then the HUD's own settings —
|
|
4
4
|
* size, verbose details, position (a miniature screen of the eight spots) —
|
|
5
5
|
* and Unlink. A fixed float placed beside the dock by the caller; ↑/↓ move
|
|
6
6
|
* between items, Esc closes.
|
|
@@ -26,5 +26,7 @@ export interface MenuProps {
|
|
|
26
26
|
onVerbose: (on: boolean) => void;
|
|
27
27
|
onAskUnlink: () => void;
|
|
28
28
|
onLink: () => void;
|
|
29
|
+
/** Opens the bug report sheet; the row shows only when set. */
|
|
30
|
+
onReport?: () => void;
|
|
29
31
|
}
|
|
30
32
|
export declare function Menu(p: MenuProps): ReactElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { HomeIcon, NewTabIcon, UnlinkIcon } from './icons';
|
|
2
|
+
import { BugIcon, HomeIcon, NewTabIcon, UnlinkIcon } from './icons';
|
|
3
3
|
import { isVertical, SPOT_NAMES, SPOTS } from './spots';
|
|
4
4
|
import { fmtAgo, fmtDuration } from './status';
|
|
5
5
|
const SIZES = [
|
|
@@ -48,7 +48,7 @@ export function Menu(p) {
|
|
|
48
48
|
p.onClose();
|
|
49
49
|
fn();
|
|
50
50
|
};
|
|
51
|
-
return (_jsxs("div", { ref: p.menuRef, className: `float menu ${p.className}`, role: "menu", "aria-label": "Recorder", "data-e2e": "recorder-menu", onKeyDown: onKey, children: [_jsxs("div", { className: "m-head", "data-e2e": "menu-account", children: [_jsxs("div", { className: snap.account?.kind === 'key' ? 'm-who wraps' : 'm-who', children: [_jsx("span", { className: "email", children: lines.who }), lines.ws ? _jsxs("span", { className: "ws", children: ["\u00B7 ", lines.ws] }) : null] }), _jsxs("div", { className: "m-sub", children: [rec ? _jsx("span", { className: "live", children: "\u25CF recording \u00B7 " }) : null, lines.sub] })] }), !snap.linked ? (_jsx("button", { type: "button", role: "menuitem", className: "mi", onClick: act(p.onLink), children: _jsx("span", { children: "Link recorder" }) })) : null, rec?.boardUrl ? (_jsxs("a", { role: "menuitem", className: "mi", href: rec.boardUrl, target: "_blank", rel: "noopener noreferrer", onClick: p.onClose, children: [_jsx(NewTabIcon, {}), " Open this board"] })) : null, _jsx("div", { className: "m-rule" }), _jsx("div", { className: "m-label", "aria-hidden": "true", children: "Recent" }), snap.recents.length === 0 ? _jsx("div", { className: "m-empty", children: "No recordings on this device yet" }) : null, snap.recents.map((r) => {
|
|
51
|
+
return (_jsxs("div", { ref: p.menuRef, className: `float menu ${p.className}`, role: "menu", "aria-label": "Recorder", "data-e2e": "recorder-menu", onKeyDown: onKey, children: [_jsxs("div", { className: "m-head", "data-e2e": "menu-account", children: [_jsxs("div", { className: snap.account?.kind === 'key' ? 'm-who wraps' : 'm-who', children: [_jsx("span", { className: "email", children: lines.who }), lines.ws ? _jsxs("span", { className: "ws", children: ["\u00B7 ", lines.ws] }) : null] }), _jsxs("div", { className: "m-sub", children: [rec ? _jsx("span", { className: "live", children: "\u25CF recording \u00B7 " }) : null, lines.sub] })] }), !snap.linked ? (_jsx("button", { type: "button", role: "menuitem", className: "mi", onClick: act(p.onLink), children: _jsx("span", { children: "Link recorder" }) })) : null, p.onReport ? (_jsxs("button", { type: "button", role: "menuitem", className: "mi", onClick: act(p.onReport), children: [_jsx(BugIcon, {}), " Report a bug"] })) : null, rec?.boardUrl ? (_jsxs("a", { role: "menuitem", className: "mi", href: rec.boardUrl, target: "_blank", rel: "noopener noreferrer", onClick: p.onClose, children: [_jsx(NewTabIcon, {}), " Open this board"] })) : null, _jsx("div", { className: "m-rule" }), _jsx("div", { className: "m-label", "aria-hidden": "true", children: "Recent" }), snap.recents.length === 0 ? _jsx("div", { className: "m-empty", children: "No recordings on this device yet" }) : null, snap.recents.map((r) => {
|
|
52
52
|
const live = rec?.sessionId === r.sessionId;
|
|
53
53
|
const meta = [
|
|
54
54
|
live ? 'now' : fmtAgo(p.now - r.startedAt),
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* vertical pill (a measured morph, see useMorph).
|
|
11
11
|
* - Flows (flow.ts): the pill itself asks "Stop & save?" / "Unlink this
|
|
12
12
|
* device?", spins while saving, says "Saved · Open board" until dismissed,
|
|
13
|
-
* or says why it could not save
|
|
13
|
+
* or says why it could not save (a bug report: "Sending…", "Sent",
|
|
14
|
+
* "Couldn't send"). Always horizontal.
|
|
14
15
|
* - Tucked: a 6px edge tab.
|
|
15
16
|
* The handle, the puck and the tab are the drag handles. Tooltips are
|
|
16
17
|
* `data-tip` / `data-keys` on the triggers (Tooltip.tsx paints them).
|
|
@@ -11,7 +11,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
11
11
|
* vertical pill (a measured morph, see useMorph).
|
|
12
12
|
* - Flows (flow.ts): the pill itself asks "Stop & save?" / "Unlink this
|
|
13
13
|
* device?", spins while saving, says "Saved · Open board" until dismissed,
|
|
14
|
-
* or says why it could not save
|
|
14
|
+
* or says why it could not save (a bug report: "Sending…", "Sent",
|
|
15
|
+
* "Couldn't send"). Always horizontal.
|
|
15
16
|
* - Tucked: a 6px edge tab.
|
|
16
17
|
* The handle, the puck and the tab are the drag handles. Tooltips are
|
|
17
18
|
* `data-tip` / `data-keys` on the triggers (Tooltip.tsx paints them).
|
|
@@ -116,8 +117,11 @@ function SyncGlyph({ chip }) {
|
|
|
116
117
|
return _jsx(ArrowUpIcon, {});
|
|
117
118
|
}
|
|
118
119
|
/** "Couldn't save" in a few words; the full sentence rides the tooltip. */
|
|
119
|
-
function shortFailure(message) {
|
|
120
|
-
|
|
120
|
+
function shortFailure(message, report) {
|
|
121
|
+
const offline = /unreachable|offline|fetch|network/i.test(message);
|
|
122
|
+
if (report)
|
|
123
|
+
return offline ? 'Offline — not sent' : 'Couldn’t send';
|
|
124
|
+
if (offline)
|
|
121
125
|
return 'Offline — kept here';
|
|
122
126
|
if (/ended locally|rejected/i.test(message))
|
|
123
127
|
return 'Ended by the server';
|
|
@@ -295,7 +299,9 @@ export function RecorderPill(p) {
|
|
|
295
299
|
const confirmAction = shownFlow.face === 'confirm' ? shownFlow.action : 'stop';
|
|
296
300
|
const savedUrl = shownFlow.face === 'saved' ? shownFlow.boardUrl : undefined;
|
|
297
301
|
const failure = shownFlow.face === 'failed' ? shownFlow.message : '';
|
|
298
|
-
|
|
302
|
+
// A bug report's send: "Sending…", "Sent", "Couldn't send" — and it can always be retried.
|
|
303
|
+
const report = 'report' in shownFlow && shownFlow.report === true;
|
|
304
|
+
return (_jsxs("div", { ref: p.pillRef, className: "pill glass", "data-e2e": "recorder-pill", "data-face": dataFace, "data-orient": orient, "data-state": state, "data-open": unfolded && face !== 'flow' ? '' : undefined, onPointerDown: onTouch, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKey, children: [_jsx(Seg, { on: face === 'idle', className: "s-idle", children: _jsxs("button", { ref: puckRef, type: "button", className: "puck", "data-state": unlinked ? 'unlinked' : p.starting ? 'busy' : 'ready', "aria-label": puckLabel, onClick: unlinked ? p.onLink : p.onStart, disabled: p.starting, ...p.handle, children: [_jsx("span", { className: "ring" }), _jsx("span", { className: "lab", "aria-hidden": "true", children: _jsx("span", { children: puckLabel }) })] }) }), _jsx(Seg, { on: face === 'idle' && unfolded, className: "s-more", children: _jsx("button", { type: "button", className: "tb b-more", "aria-label": "More", "aria-haspopup": "menu", "aria-expanded": p.menuOpen, "data-tip": "Recents \u00B7 settings", onClick: (e) => p.onMenu(e.detail === 0), onKeyDown: onMoreKey, children: _jsx(MoreIcon, {}) }) }), _jsx(Seg, { on: face === 'rec' || (confirming && rec !== null), className: "s-handle", children: _jsxs("button", { type: "button", className: "handle", "aria-label": "Recorder controls", "aria-expanded": unfolded && face === 'rec', onClick: toggle, ...p.handle, children: [_jsx("span", { className: "dot" }), _jsxs("span", { className: "clock", children: [_jsx(Seg, { on: !p.flash, className: "c-time", children: _jsx("span", { className: "time", children: shownRec ? fmtClock(elapsedOf(shownRec, p.now)) : '00:00' }) }), _jsx(Seg, { on: p.flash, className: "c-flash", children: _jsxs("span", { className: "flash", "data-e2e": "saved-flash", children: [_jsx(CheckIcon, {}), _jsx("span", { children: "Saved" })] }) })] })] }) }), _jsx(Seg, { on: face === 'rec' && unfolded, className: "s-tray", children: _jsxs("div", { className: "tools seg-row", children: [_jsx("span", { className: "sep" }), chip ? (_jsxs("span", { className: "sync", "data-kind": chip.kind, "data-tip": chip.title, role: "status", "aria-label": chip.title, "data-e2e": "sync-chip", children: [_jsx("span", { className: "swap", children: _jsx(SyncGlyph, { chip: chip }) }, `glyph-${chip.kind}`), _jsx("span", { className: "word swap", children: chip.label }, `word-${chip.label}`)] })) : null, _jsx("button", { type: "button", className: "tb b-pause", "aria-label": shownRec?.paused ? 'Resume' : 'Pause', "aria-keyshortcuts": "Alt+Shift+P", "data-tip": shownRec?.paused ? 'Resume' : 'Pause', "data-keys": `${MOD}P`, onClick: p.onPause, children: shownRec?.paused ? _jsx(PlayIcon, {}) : _jsx(PauseIcon, {}) }), _jsx("button", { type: "button", className: "tb b-note", "aria-label": "Note", "aria-keyshortcuts": "Alt+Shift+N", "data-tip": "Note", "data-keys": `${MOD}N`, onClick: p.onNote, children: _jsx(PencilIcon, {}) }), _jsx("button", { type: "button", className: annotating ? 'tb b-annotate on' : 'tb b-annotate', "aria-label": "Annotate", "aria-pressed": annotating, "aria-keyshortcuts": "Alt+Shift+A", "data-tip": "Annotate", "data-keys": `${MOD}A`, onClick: p.onAnnotate, children: _jsx(AnnotateIcon, {}) }), _jsx("button", { ref: stopRef, type: "button", className: "tb b-stop", "aria-label": "Stop", "aria-keyshortcuts": "Alt+Shift+S", "data-tip": "Stop & save", "data-keys": `${MOD}S`, onClick: p.onAskStop, children: _jsx(StopIcon, {}) }), _jsx("button", { type: "button", className: "tb b-more", "aria-label": "More", "aria-haspopup": "menu", "aria-expanded": p.menuOpen, "data-tip": "More", onClick: (e) => p.onMenu(e.detail === 0), onKeyDown: onMoreKey, children: _jsx(MoreIcon, {}) })] }) }), _jsx(Seg, { on: p.flow.face === 'confirm', className: "s-confirm", children: _jsxs("div", { className: "flow confirm", role: "group", "aria-label": confirmAction === 'stop' ? 'Stop and save' : 'Unlink', children: [_jsx("span", { className: "q", children: confirmAction === 'stop' ? 'Stop & save?' : 'Unlink this device?' }), _jsx("button", { type: "button", className: "fb primary", onClick: p.onConfirm, children: confirmAction === 'stop' ? 'Stop' : 'Unlink' }), _jsx("button", { ref: keepRef, type: "button", className: "fb", onClick: p.onCancel, children: confirmAction === 'stop' ? 'Keep recording' : 'Cancel' })] }) }), _jsx(Seg, { on: p.flow.face === 'saving', className: "s-saving", children: _jsxs("div", { className: "flow saving", role: "status", "data-e2e": "saving", children: [_jsx(SpinnerIcon, {}), _jsx("span", { children: report ? 'Sending…' : 'Saving…' }), progress !== null && rec ? _jsxs("span", { className: "muted", children: [rec.sync.queued, " left"] }) : null, _jsx("span", { className: "bar-track", "data-indeterminate": progress === null ? '' : undefined, role: "progressbar", "aria-label": report ? 'Sending' : 'Saving', "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": progress === null ? undefined : Math.round(progress * 100), style: { '--p': String(progress ?? 0) }, children: _jsx("i", {}) })] }) }), _jsx(Seg, { on: p.flow.face === 'saved', className: "s-saved", children: _jsxs("div", { className: "flow saved", "data-e2e": "saved", children: [_jsx("span", { className: "ok t-check", "data-state": flowShown === 'saved' ? 'in' : undefined, children: _jsx(CheckIcon, {}) }), _jsx("span", { children: report ? 'Sent' : 'Saved' }), savedUrl ? (_jsxs("a", { ref: (el) => {
|
|
299
305
|
savedRef.current = el;
|
|
300
|
-
}, className: "fb", href: savedUrl, target: "_blank", rel: "noopener noreferrer", children: ["Open board ", _jsx(NewTabIcon, {})] })) : (_jsx("span", { className: "muted", children: "in Recents" })), _jsx("button", { ref: savedUrl ? undefined : (el) => void (savedRef.current = el), type: "button", className: "fb icon", "aria-label": "Dismiss", onClick: p.onDismiss, children: _jsx(CloseIcon, {}) })] }) }), _jsx(Seg, { on: p.flow.face === 'failed', className: "s-failed", children: _jsxs("div", { className: "flow failed", role: "alert", "data-tip": failure, children: [_jsx("span", { className: "warn", children: _jsx(AlertIcon, {}) }), _jsx("span", { className: "msg", children: shortFailure(failure) }), rec ? (_jsx("button", { type: "button", className: "fb", onClick: p.onRetry, children: "Retry" })) : null, _jsx("button", { type: "button", className: "fb icon", "aria-label": "Dismiss", onClick: p.onDismiss, children: _jsx(CloseIcon, {}) })] }) })] }));
|
|
306
|
+
}, className: "fb", href: savedUrl, target: "_blank", rel: "noopener noreferrer", children: ["Open board ", _jsx(NewTabIcon, {})] })) : (_jsx("span", { className: "muted", children: "in Recents" })), _jsx("button", { ref: savedUrl ? undefined : (el) => void (savedRef.current = el), type: "button", className: "fb icon", "aria-label": "Dismiss", onClick: p.onDismiss, children: _jsx(CloseIcon, {}) })] }) }), _jsx(Seg, { on: p.flow.face === 'failed', className: "s-failed", children: _jsxs("div", { className: "flow failed", role: "alert", "data-tip": failure, children: [_jsx("span", { className: "warn", children: _jsx(AlertIcon, {}) }), _jsx("span", { className: "msg", children: shortFailure(failure, report) }), rec || report ? (_jsx("button", { type: "button", className: "fb", onClick: p.onRetry, children: "Retry" })) : null, _jsx("button", { type: "button", className: "fb icon", "aria-label": "Dismiss", onClick: p.onDismiss, children: _jsx(CloseIcon, {}) })] }) })] }));
|
|
301
307
|
}
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
* (board|task · context · ↑ Send) and the hint line (hidden on touch). Enter sends, ⇧Enter newlines, Esc
|
|
6
6
|
* cancels. The DRAFT is owned by the caller so a cancel keeps it until the
|
|
7
7
|
* next send (recorder-hud-polish D3); the board|task choice resets on every
|
|
8
|
-
* open — a destination is per observation, not a mode.
|
|
8
|
+
* open — a destination is per observation, not a mode. The bug report is the
|
|
9
|
+
* same sheet: a required description and "Mark on screen" in the board|task
|
|
10
|
+
* slot.
|
|
9
11
|
*/
|
|
10
12
|
import { type ReactElement } from 'react';
|
|
11
13
|
export interface SheetProps {
|
|
@@ -21,5 +23,12 @@ export interface SheetProps {
|
|
|
21
23
|
onDraft: (text: string) => void;
|
|
22
24
|
onSend: (text: string, task: boolean) => void;
|
|
23
25
|
onClose: () => void;
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
/** Send stays off until the description has text. */
|
|
28
|
+
required?: boolean;
|
|
29
|
+
/** Shows "Mark on screen" (instead of board|task): pick a region or element. */
|
|
30
|
+
onMark?: () => void;
|
|
31
|
+
/** Something is marked (the button reads pressed). */
|
|
32
|
+
marked?: boolean;
|
|
24
33
|
}
|
|
25
|
-
export declare function Sheet({ className, origin, title, ctx, pick, draft, onDraft, onSend, onClose }: SheetProps): ReactElement;
|
|
34
|
+
export declare function Sheet({ className, origin, title, ctx, pick, draft, onDraft, onSend, onClose, placeholder, required, onMark, marked, }: SheetProps): ReactElement;
|
|
@@ -6,11 +6,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
* (board|task · context · ↑ Send) and the hint line (hidden on touch). Enter sends, ⇧Enter newlines, Esc
|
|
7
7
|
* cancels. The DRAFT is owned by the caller so a cancel keeps it until the
|
|
8
8
|
* next send (recorder-hud-polish D3); the board|task choice resets on every
|
|
9
|
-
* open — a destination is per observation, not a mode.
|
|
9
|
+
* open — a destination is per observation, not a mode. The bug report is the
|
|
10
|
+
* same sheet: a required description and "Mark on screen" in the board|task
|
|
11
|
+
* slot.
|
|
10
12
|
*/
|
|
11
13
|
import { useEffect, useRef, useState } from 'react';
|
|
12
14
|
import { ArrowUpIcon, CloseIcon } from './icons';
|
|
13
|
-
export function Sheet({ className, origin, title, ctx, pick, draft, onDraft, onSend, onClose }) {
|
|
15
|
+
export function Sheet({ className, origin, title, ctx, pick, draft, onDraft, onSend, onClose, placeholder = "what's wrong / what to refine…", required = false, onMark, marked = false, }) {
|
|
14
16
|
const ta = useRef(null);
|
|
15
17
|
const [task, setTask] = useState(false);
|
|
16
18
|
useEffect(() => {
|
|
@@ -20,7 +22,14 @@ export function Sheet({ className, origin, title, ctx, pick, draft, onDraft, onS
|
|
|
20
22
|
el.focus();
|
|
21
23
|
el.setSelectionRange(el.value.length, el.value.length);
|
|
22
24
|
}, []);
|
|
23
|
-
const
|
|
25
|
+
const empty = required && draft.trim() === '';
|
|
26
|
+
const send = () => {
|
|
27
|
+
if (empty) {
|
|
28
|
+
ta.current?.focus();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
onSend(draft.trim(), task);
|
|
32
|
+
};
|
|
24
33
|
const onKey = (e) => {
|
|
25
34
|
if (e.key === 'Escape') {
|
|
26
35
|
e.preventDefault();
|
|
@@ -33,5 +42,5 @@ export function Sheet({ className, origin, title, ctx, pick, draft, onDraft, onS
|
|
|
33
42
|
send();
|
|
34
43
|
}
|
|
35
44
|
};
|
|
36
|
-
return (_jsxs("div", { className: `pop ${className}`, style: { transformOrigin: origin }, role: "dialog", "aria-labelledby": "vt-pop-title", onKeyDown: onKey, children: [_jsxs("div", { className: "pop-head", children: [_jsxs("span", { className: "title", children: [_jsx("i", {}), _jsx("span", { id: "vt-pop-title", children: title })] }), _jsx("button", { type: "button", className: "closeb", "aria-label": "Close", onClick: onClose, children: _jsx(CloseIcon, {}) })] }), _jsx("textarea", { ref: ta, placeholder: "
|
|
45
|
+
return (_jsxs("div", { className: `pop ${className}`, style: { transformOrigin: origin }, role: "dialog", "aria-labelledby": "vt-pop-title", onKeyDown: onKey, children: [_jsxs("div", { className: "pop-head", children: [_jsxs("span", { className: "title", children: [_jsx("i", {}), _jsx("span", { id: "vt-pop-title", children: title })] }), _jsx("button", { type: "button", className: "closeb", "aria-label": "Close", onClick: onClose, children: _jsx(CloseIcon, {}) })] }), _jsx("textarea", { ref: ta, placeholder: placeholder, "aria-required": required || undefined, value: draft, onChange: (e) => onDraft(e.target.value), onKeyDown: onTaKey }), _jsxs("div", { className: pick || onMark ? 'row' : 'row nodest', children: [onMark ? (_jsx("span", { className: "dest", children: _jsx("button", { type: "button", "aria-pressed": marked, onClick: onMark, children: "Mark on screen" }) })) : pick ? (_jsxs("span", { className: "dest", role: "group", "aria-label": "Where this snap lands", children: [_jsx("button", { type: "button", "aria-pressed": !task, onClick: () => setTask(false), children: "board" }), _jsx("button", { type: "button", "aria-pressed": task, onClick: () => setTask(true), children: "task" })] })) : null, _jsx("span", { className: "ctx", children: ctx }), _jsxs("button", { type: "button", className: "sendb", "aria-disabled": empty || undefined, onClick: send, children: [_jsx(ArrowUpIcon, {}), _jsx("span", { children: "Send" })] })] }), _jsx("div", { className: "hints", children: "\u21A9 send \u00B7 \u21E7\u21A9 newline \u00B7 esc cancel" })] }));
|
|
37
46
|
}
|
|
@@ -94,6 +94,11 @@ export interface HudSnapshot {
|
|
|
94
94
|
workspaceUrl: string;
|
|
95
95
|
/** Recorder id, e.g. `web/0.2.1` (verbose mode shows it). */
|
|
96
96
|
version: string;
|
|
97
|
+
/**
|
|
98
|
+
* "Report a bug" can file now (the ⋯ menu shows the row): into the live
|
|
99
|
+
* session, or, idle, with the last minute the host keeps. Absent = never.
|
|
100
|
+
*/
|
|
101
|
+
canReport?: boolean;
|
|
97
102
|
}
|
|
98
103
|
/** The code half of a device link, as the link sheet paints it. */
|
|
99
104
|
export interface HudLinkCode {
|
|
@@ -122,6 +127,15 @@ export interface HudAnnotation {
|
|
|
122
127
|
/** Also file it as an intake task. */
|
|
123
128
|
task: boolean;
|
|
124
129
|
}
|
|
130
|
+
/** What "Report a bug" sends from the sheet. */
|
|
131
|
+
export interface HudReport {
|
|
132
|
+
/** The description (required); its first line titles the report. */
|
|
133
|
+
text: string;
|
|
134
|
+
/** The region marked on screen, CSS px; null = the whole viewport. */
|
|
135
|
+
rect: HudRect | null;
|
|
136
|
+
/** The marked element's selector; '' for a region or no mark. */
|
|
137
|
+
selector: string;
|
|
138
|
+
}
|
|
125
139
|
export interface HudController {
|
|
126
140
|
getSnapshot(): HudSnapshot;
|
|
127
141
|
subscribe(listener: () => void): () => void;
|
|
@@ -144,5 +158,20 @@ export interface HudController {
|
|
|
144
158
|
setPrefs(patch: Partial<HudPrefs>): Promise<void>;
|
|
145
159
|
/** Fill missing board links of recents from the server. Never rejects. */
|
|
146
160
|
refreshRecents(): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* The report sheet opened (`true`: idle, freeze the last minute it will
|
|
163
|
+
* send) or was dismissed (`false`: drop it). Optional, with `report`.
|
|
164
|
+
*/
|
|
165
|
+
holdReport?(on: boolean): void;
|
|
166
|
+
/**
|
|
167
|
+
* File a bug report. Recording: a task annotation in the live session
|
|
168
|
+
* (resolves at once). Idle: the held last minute as its own short session
|
|
169
|
+
* — resolves `{boardUrl?}` once it is done, rejects with the reason; a
|
|
170
|
+
* second call after a rejection retries the same report. Optional: a host
|
|
171
|
+
* without it never offers the menu row.
|
|
172
|
+
*/
|
|
173
|
+
report?(r: HudReport): Promise<{
|
|
174
|
+
boardUrl?: string;
|
|
175
|
+
}>;
|
|
147
176
|
}
|
|
148
177
|
export declare const DEFAULT_PREFS: HudPrefs;
|
|
@@ -5,10 +5,13 @@
|
|
|
5
5
|
* │ └─failed→ failed ─retry→ saving
|
|
6
6
|
* └─cancel→ none └─dismiss→ none
|
|
7
7
|
* none ─ask(unlink)→ confirm ─confirm→ none (the caller unlinks)
|
|
8
|
+
* none ─send→ saving ─saved→ saved … (a bug report, `report: true`)
|
|
8
9
|
*
|
|
9
|
-
* Saved stays until the tester dismisses it. A
|
|
10
|
-
*
|
|
11
|
-
* the
|
|
10
|
+
* Saved stays until the tester dismisses it. A report's saving, saved and
|
|
11
|
+
* failed faces carry `report: true` through retries, so the pill can say
|
|
12
|
+
* "Sending…" / "Sent". A pure reducer, so the HUD's transitions are testable
|
|
13
|
+
* without a DOM; an event that does not apply to the current state leaves it
|
|
14
|
+
* unchanged.
|
|
12
15
|
*/
|
|
13
16
|
export type ConfirmAction = 'stop' | 'unlink';
|
|
14
17
|
export type Flow = {
|
|
@@ -21,12 +24,15 @@ export type Flow = {
|
|
|
21
24
|
| {
|
|
22
25
|
face: 'saving';
|
|
23
26
|
total: number;
|
|
27
|
+
report?: true;
|
|
24
28
|
} | {
|
|
25
29
|
face: 'saved';
|
|
26
30
|
boardUrl?: string;
|
|
31
|
+
report?: true;
|
|
27
32
|
} | {
|
|
28
33
|
face: 'failed';
|
|
29
34
|
message: string;
|
|
35
|
+
report?: true;
|
|
30
36
|
};
|
|
31
37
|
export type FlowEvent = {
|
|
32
38
|
type: 'ask';
|
|
@@ -36,6 +42,10 @@ export type FlowEvent = {
|
|
|
36
42
|
} | {
|
|
37
43
|
type: 'confirm';
|
|
38
44
|
queued: number;
|
|
45
|
+
}
|
|
46
|
+
/** A bug report went out (idle: its own short session). */
|
|
47
|
+
| {
|
|
48
|
+
type: 'send';
|
|
39
49
|
} | {
|
|
40
50
|
type: 'retry';
|
|
41
51
|
queued: number;
|
|
@@ -5,12 +5,19 @@
|
|
|
5
5
|
* │ └─failed→ failed ─retry→ saving
|
|
6
6
|
* └─cancel→ none └─dismiss→ none
|
|
7
7
|
* none ─ask(unlink)→ confirm ─confirm→ none (the caller unlinks)
|
|
8
|
+
* none ─send→ saving ─saved→ saved … (a bug report, `report: true`)
|
|
8
9
|
*
|
|
9
|
-
* Saved stays until the tester dismisses it. A
|
|
10
|
-
*
|
|
11
|
-
* the
|
|
10
|
+
* Saved stays until the tester dismisses it. A report's saving, saved and
|
|
11
|
+
* failed faces carry `report: true` through retries, so the pill can say
|
|
12
|
+
* "Sending…" / "Sent". A pure reducer, so the HUD's transitions are testable
|
|
13
|
+
* without a DOM; an event that does not apply to the current state leaves it
|
|
14
|
+
* unchanged.
|
|
12
15
|
*/
|
|
13
16
|
export const NO_FLOW = { face: 'none' };
|
|
17
|
+
/** `{report: true}` when the flow is a bug report's — spread into the next face. */
|
|
18
|
+
function reportOf(flow) {
|
|
19
|
+
return 'report' in flow && flow.report ? { report: true } : {};
|
|
20
|
+
}
|
|
14
21
|
export function flowReducer(flow, ev) {
|
|
15
22
|
switch (ev.type) {
|
|
16
23
|
case 'ask':
|
|
@@ -21,12 +28,16 @@ export function flowReducer(flow, ev) {
|
|
|
21
28
|
if (flow.face !== 'confirm')
|
|
22
29
|
return flow;
|
|
23
30
|
return flow.action === 'stop' ? { face: 'saving', total: ev.queued } : NO_FLOW;
|
|
31
|
+
case 'send':
|
|
32
|
+
return flow.face === 'none' ? { face: 'saving', total: 0, report: true } : flow;
|
|
24
33
|
case 'retry':
|
|
25
|
-
return flow.face === 'failed' ? { face: 'saving', total: ev.queued } : flow;
|
|
34
|
+
return flow.face === 'failed' ? { face: 'saving', total: ev.queued, ...reportOf(flow) } : flow;
|
|
26
35
|
case 'saved':
|
|
27
|
-
return flow.face === 'saving'
|
|
36
|
+
return flow.face === 'saving'
|
|
37
|
+
? { face: 'saved', ...(ev.boardUrl ? { boardUrl: ev.boardUrl } : {}), ...reportOf(flow) }
|
|
38
|
+
: flow;
|
|
28
39
|
case 'failed':
|
|
29
|
-
return flow.face === 'saving' ? { face: 'failed', message: ev.message } : flow;
|
|
40
|
+
return flow.face === 'saving' ? { face: 'failed', message: ev.message, ...reportOf(flow) } : flow;
|
|
30
41
|
case 'dismiss':
|
|
31
42
|
return flow.face === 'saved' || flow.face === 'failed' ? NO_FLOW : flow;
|
|
32
43
|
}
|
|
@@ -19,4 +19,5 @@ export declare function AlertIcon(): ReactElement;
|
|
|
19
19
|
/** A ring with a gap; spun by `.spin`. */
|
|
20
20
|
export declare function SpinnerIcon(): ReactElement;
|
|
21
21
|
export declare function UnlinkIcon(): ReactElement;
|
|
22
|
+
export declare function BugIcon(): ReactElement;
|
|
22
23
|
export declare function HomeIcon(): ReactElement;
|
|
@@ -54,6 +54,9 @@ export function SpinnerIcon() {
|
|
|
54
54
|
export function UnlinkIcon() {
|
|
55
55
|
return (_jsxs("svg", { ...base, children: [_jsx("path", { d: "m18.8 12.7 1.7-1.7a5 5 0 0 0-7.1-7.1l-1.7 1.7" }), _jsx("path", { d: "m5.2 11.3-1.7 1.7a5 5 0 0 0 7.1 7.1l1.7-1.7" }), _jsx("path", { d: "M8 2v3" }), _jsx("path", { d: "M2 8h3" }), _jsx("path", { d: "M16 22v-3" }), _jsx("path", { d: "M22 16h-3" })] }));
|
|
56
56
|
}
|
|
57
|
+
export function BugIcon() {
|
|
58
|
+
return (_jsxs("svg", { ...base, children: [_jsx("path", { d: "m8 2 1.88 1.88" }), _jsx("path", { d: "M14.12 3.88 16 2" }), _jsx("path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" }), _jsx("path", { d: "M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6" }), _jsx("path", { d: "M12 20v-9" }), _jsx("path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5" }), _jsx("path", { d: "M6 13H2" }), _jsx("path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4" }), _jsx("path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4" }), _jsx("path", { d: "M22 13h-4" }), _jsx("path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4" })] }));
|
|
59
|
+
}
|
|
57
60
|
export function HomeIcon() {
|
|
58
61
|
return (_jsxs("svg", { ...base, children: [_jsx("path", { d: "M3 10.5 12 3l9 7.5" }), _jsx("path", { d: "M5 9v11h14V9" })] }));
|
|
59
62
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* size tokens (`--h`, `--b`, `--fs`, … and `--s` for the rest).
|
|
17
17
|
* Motion: the transitions.dev token scale; reduced motion stills it all.
|
|
18
18
|
*/
|
|
19
|
-
export declare const HUD_CSS_BASE = "\n* { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif; }\nsvg { width:1em; height:1em; vertical-align:-.125em; flex:none; }\n.hud {\n --ink: rgba(26,22,23,.72); --ink-pop: rgba(26,22,23,.9); --ink-solid: #1d1a1b;\n --ink-2: rgba(255,255,255,.08); --ink-3: rgba(255,255,255,.14); --edge: rgba(255,255,255,.11); --rim: rgba(0,0,0,.30);\n --fg: #f4efea; --fg-2: rgba(244,239,234,.66); --fg-3: rgba(244,239,234,.44);\n --rec: #ff3b57; --rec-soft: rgba(255,59,87,.16); --warn: #f0a63a; --ok: #7fd6a4;\n --m: 16px;\n --s: 1; --h: 28px; --b: 24px; --vw: 36px; --fs: 12px; --fs-s: 10.5px; --ic: 13px;\n --duration-micro: 80ms; --duration-quick: 150ms; --duration-fast: 250ms; --duration-resize: 300ms;\n --duration-medium: 350ms; --duration-very-slow: 500ms; --duration-snap: 500ms;\n --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1); --ease-in-out: ease-in-out; --ease-out: ease-out; --ease-linear: linear;\n --ease-bounce: cubic-bezier(0.34, 1.36, 0.64, 1);\n --ease-spring: var(--ease-smooth-out);\n --distance-micro: 4px; --scale-medium: .97; --scale-small: .98; --scale-tiny: .99; --blur-small: 2px; --rise: 16px;\n color: var(--fg); font-size: var(--fs);\n user-select:none; -webkit-user-select:none;\n}\n.hud[data-size=\"sm\"] { --s: .88; --h: 24px; --b: 20px; --vw: 30px; --fs: 11px; --fs-s: 10px; --ic: 12px; }\n.hud[data-size=\"lg\"] { --s: 1.18; --h: 34px; --b: 30px; --vw: 44px; --fs: 13.5px; --fs-s: 11.5px; --ic: 15px; }\n@supports (transition-timing-function: linear(0, 1)) {\n /* a damped spring, ~4% overshoot over 500ms \u2014 the settle after a throw */\n .hud { --ease-spring: linear(0, 0.042, 0.143, 0.274, 0.414, 0.549, 0.67, 0.773, 0.856, 0.921, 0.968, 1.001, 1.021, 1.033, 1.038, 1.038, 1.035, 1.031, 1.025, 1.02, 1.015, 1.011, 1.007, 1.004, 1); }\n}\n@media (pointer: coarse) {\n .hud { --m: 12px; }\n .hud[data-size=\"sm\"] { --h: 28px; --b: 26px; --vw: 34px; }\n .hud[data-size=\"md\"] { --h: 32px; --b: 30px; --vw: 40px; }\n .hud[data-size=\"lg\"] { --h: 38px; --b: 34px; --vw: 46px; }\n}\n/* scoped under .hud so a control's own `all:unset` reset cannot wipe the surface */\n.hud .glass, .hud .menu, .hud .pop, .hud .detail, .hud .hint, .hud .tip {\n background: var(--ink);\n -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);\n box-shadow: inset 0 0 0 1px var(--edge), 0 0 0 .5px var(--rim), 0 10px 28px -10px rgba(0,0,0,.5), 0 2px 6px -2px rgba(0,0,0,.28);\n color: var(--fg);\n}\n.hud .menu, .hud .pop, .hud .tip { background: var(--ink-pop); }\n@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {\n .hud .glass, .hud .menu, .hud .pop, .hud .detail, .hud .hint, .hud .tip { background: var(--ink-solid); }\n}\n.sr { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }\ntextarea, .code { user-select:text; -webkit-user-select:text; }\n\n/* the dock: one of eight spots, or tucked into a side edge */\n.dock { position:fixed; z-index:4; display:flex; pointer-events:auto; }\n.dock[data-row=\"b\"] { bottom: calc(var(--m) + env(safe-area-inset-bottom, 0px)); }\n.dock[data-row=\"t\"] { top: calc(var(--m) + env(safe-area-inset-top, 0px)); }\n.dock[data-row=\"m\"] { top: calc(50% - var(--hh, 28px) / 2); }\n.dock[data-col=\"l\"] { left: calc(var(--m) + env(safe-area-inset-left, 0px)); }\n.dock[data-col=\"r\"] { right: calc(var(--m) + env(safe-area-inset-right, 0px)); }\n.dock[data-col=\"c\"] { left: calc(50% - var(--hw, 36px) / 2); }\n.dock[data-tuck] { top: clamp(8px, calc(var(--ty, .5) * 100% - 28px), calc(100% - 64px)); }\n.dock[data-tuck=\"left\"] { left:0; }\n.dock[data-tuck=\"right\"] { right:0; }\n.dock.settling { transition: transform var(--duration-snap) var(--ease-spring); }\n/* a throw carries the compact capsule: the tray folds at once, not on its tween */\n.dock.dragging .seg, .dock.dragging .seg-in { transition:none !important; }\n.dock.dragging .glass { box-shadow: inset 0 0 0 1px var(--edge), 0 0 0 .5px var(--rim), 0 18px 40px -12px rgba(0,0,0,.55), 0 4px 10px -4px rgba(0,0,0,.3); }\n\n/* the pill and its segments */\n.pill { position:relative; display:inline-flex; align-items:center; height:var(--h); border-radius:999px; }\n.dock[data-col=\"r\"] .pill[data-orient=\"h\"] { flex-direction:row-reverse; }\n.pill[data-orient=\"v\"] { flex-direction:column; height:auto; width:var(--vw); border-radius:calc(var(--vw) / 2); padding:2px 0 4px; }\n.pill.morphing, .pill.morphing * { transition:none !important; }\n.pill.morphing { overflow:hidden; }\n.seg { display:grid; grid-template-columns:0fr; visibility:hidden;\n transition: grid-template-columns var(--duration-resize) var(--ease-smooth-out), visibility 0s linear var(--duration-resize); }\n.seg-in { min-width:0; overflow:hidden; display:flex; align-items:center; padding:5px 0; margin:-5px 0;\n opacity:0; filter:blur(var(--blur-small));\n transition: opacity var(--duration-quick) var(--ease-in-out), filter var(--duration-quick) var(--ease-in-out); }\n.seg.on { grid-template-columns:1fr; visibility:visible;\n transition: grid-template-columns var(--duration-resize) var(--ease-smooth-out), visibility 0s; }\n.seg.on > .seg-in { opacity:1; filter:none; transition-duration: var(--duration-fast); transition-delay: var(--duration-micro); }\n.pill[data-orient=\"v\"] .seg { grid-template-columns:1fr; grid-template-rows:0fr;\n transition: grid-template-rows var(--duration-resize) var(--ease-smooth-out), visibility 0s linear var(--duration-resize); }\n.pill[data-orient=\"v\"] .seg.on { grid-template-rows:1fr; transition: grid-template-rows var(--duration-resize) var(--ease-smooth-out), visibility 0s; }\n.pill[data-orient=\"v\"] .seg-in { flex-direction:column; min-height:0; padding:0 5px; margin:0 -5px; }\n\n/* the recording dot: its ripple is a pseudo-element, outside layout */\n.dot { position:relative; width:8px; height:8px; flex:none; border-radius:50%; background:var(--rec); }\n.dot::after { content:\"\"; position:absolute; inset:0; border-radius:50%; background:var(--rec); opacity:0; pointer-events:none;\n animation:ripple 2s var(--ease-out) infinite; }\n@keyframes ripple { 0% { transform:scale(1); opacity:.45; } 70%, 100% { transform:scale(2.75); opacity:0; } }\n.pill[data-state=\"paused\"] .dot { background:var(--fg-3); }\n.pill[data-state=\"bad\"] .dot { background:var(--warn); }\n.pill[data-state=\"paused\"] .dot::after, .pill[data-state=\"bad\"] .dot::after { animation:none; }\n\n/* idle: the puck \u2014 ring = not linked, dot = ready; the label slides out on intent */\n.puck { all:unset; box-sizing:border-box; display:inline-flex; align-items:center; height:var(--h); min-width:var(--h);\n padding:0 calc((var(--h) - 10px) / 2); border-radius:999px; cursor:pointer; touch-action:none;\n font-weight:600; font-size:var(--fs); color:var(--fg); }\n.dock[data-col=\"r\"] .puck { flex-direction:row-reverse; }\n.ring { width:10px; height:10px; flex:none; border-radius:50%; box-shadow:inset 0 0 0 1.5px var(--fg-2);\n transition: background-color var(--duration-quick) var(--ease-out), box-shadow var(--duration-quick) var(--ease-out); }\n.puck[data-state=\"ready\"] .ring { background:var(--fg-2); box-shadow:none; }\n.puck[data-state=\"busy\"] .ring { background:var(--fg-3); box-shadow:none; animation:breathe 1.2s var(--ease-in-out) infinite; }\n@keyframes breathe { 50% { opacity:.35; } }\n.lab { display:grid; grid-template-columns:0fr; opacity:0;\n transition: grid-template-columns var(--duration-resize) var(--ease-smooth-out), opacity var(--duration-quick) var(--ease-out); }\n/* the gap to the ring is a clipped pseudo-element: padding would keep a folded label 10px wide */\n.lab > span { min-width:0; overflow:hidden; white-space:nowrap; }\n.lab > span::before, .lab > span::after { content:\"\"; display:inline-block; }\n.lab > span::before { width:8px; }\n.lab > span::after { width:2px; }\n.dock[data-col=\"r\"] .lab > span::before { width:2px; }\n.dock[data-col=\"r\"] .lab > span::after { width:8px; }\n.pill[data-open] .lab, .puck:focus-visible .lab { grid-template-columns:1fr; opacity:1; }\n.puck:focus-visible, .handle:focus-visible { outline:2px solid var(--rec); outline-offset:2px; }\n@media (hover: hover) {\n .puck[data-state=\"ready\"]:hover .ring { background:var(--rec); }\n .puck[data-state=\"unlinked\"]:hover .ring { box-shadow:inset 0 0 0 1.5px var(--fg); }\n}\n\n/* recording: the handle (dot + clock) \u2014 symmetric: the dot centres in the pill's round end */\n.handle { all:unset; box-sizing:border-box; display:inline-flex; align-items:center; gap:6px; height:var(--h);\n padding:0 calc((var(--h) - 8px) / 2); border-radius:999px; cursor:grab; touch-action:none; }\n.dock.dragging .handle { cursor:grabbing; }\n.pill[data-orient=\"v\"] .handle { flex-direction:column; height:auto; width:var(--vw); gap:5px; padding:calc((var(--vw) - 8px) / 2 - 2px) 0 6px; }\n.clock { display:inline-flex; align-items:center; }\n.clock .seg-in { padding:0; margin:0; }\n.time { font-weight:600; font-size:var(--fs); line-height:1; font-variant-numeric:tabular-nums; letter-spacing:.01em; white-space:nowrap; }\n.pill[data-orient=\"v\"] .time { font-size:var(--fs-s); letter-spacing:-.01em; }\n.pill[data-orient=\"v\"] .clock { flex-direction:column; }\n.flash { display:inline-flex; align-items:center; gap:4px; color:var(--ok); font-weight:600; font-size:var(--fs); line-height:1; white-space:nowrap; }\n.flash svg { font-size:var(--ic); }\n.pill[data-orient=\"v\"] .flash span { display:none; }\n\n/* the tool tray */\n.tools { display:flex; align-items:center; gap:calc(2px * var(--s)); padding-right:3px; }\n.dock[data-col=\"r\"] .pill[data-orient=\"h\"] .tools { flex-direction:row-reverse; padding-right:0; padding-left:3px; }\n.pill[data-orient=\"v\"] .tools { flex-direction:column; padding:0 0 2px; gap:calc(3px * var(--s)); }\n.sep { width:1px; height:14px; flex:none; margin:0 4px 0 0; background:var(--edge); }\n.dock[data-col=\"r\"] .pill[data-orient=\"h\"] .sep { margin:0 0 0 4px; }\n.pill[data-orient=\"v\"] .sep { width:14px; height:1px; margin:2px 0 4px; }\nbutton.tb { all:unset; pointer-events:auto; box-sizing:border-box; position:relative; flex:none; display:inline-grid; place-items:center;\n width:var(--b); height:var(--b); border-radius:999px; color:var(--fg-2); cursor:pointer; font-size:var(--ic);\n transition: background-color var(--duration-quick) var(--ease-out), color var(--duration-quick) var(--ease-out); }\nbutton.tb.b-annotate { color:var(--rec); }\nbutton.tb.on { background:var(--rec); color:#fff; }\nbutton.tb.b-stop svg { fill:currentColor; stroke:none; font-size:calc(var(--ic) * .82); }\nbutton.tb:focus-visible { outline:2px solid var(--rec); outline-offset:-2px; }\n@media (hover: hover) {\n button.tb:hover { background:var(--ink-2); color:var(--fg); }\n button.tb.on:hover { background:var(--rec); color:#fff; }\n button.tb.b-stop:hover { background:var(--rec-soft); color:var(--rec); }\n}\n\n/* the sync chip: legible at a glance \u2014 icon + word, colour by state */\n.sync { display:inline-flex; align-items:center; gap:4px; height:var(--b); padding:0 7px 0 5px; margin-right:2px; border-radius:999px;\n font-size:var(--fs-s); font-weight:600; line-height:1; white-space:nowrap; color:var(--fg-3); background:transparent;\n transition: color var(--duration-quick) var(--ease-out), background-color var(--duration-quick) var(--ease-out); }\n.sync svg { font-size:calc(var(--ic) * .95); }\n.sync[data-kind=\"synced\"] svg { color:var(--ok); }\n.sync[data-kind=\"sending\"] { color:var(--fg-2); }\n.sync[data-kind=\"offline\"] { color:var(--warn); background:rgba(240,166,58,.12); }\n.sync[data-kind=\"error\"] { color:var(--rec); background:var(--rec-soft); }\n.sync .swap { display:inline-flex; animation:swap-in var(--duration-quick) var(--ease-in-out) both; }\n.pill[data-orient=\"v\"] .sync { width:var(--b); padding:0; margin:0 0 2px; justify-content:center; }\n.pill[data-orient=\"v\"] .sync .word { display:none; }\n.dock[data-col=\"r\"] .pill[data-orient=\"h\"] .sync { margin:0 0 0 2px; }\n@keyframes swap-in { from { opacity:0; transform:translateY(var(--distance-micro)); filter:blur(var(--blur-small)); } }\n.spin { animation:spin .9s var(--ease-linear) infinite; transform-origin:50% 50%; }\n@keyframes spin { to { transform:rotate(360deg); } }\n\n/* inline flows: confirm \u00B7 saving \u00B7 saved \u00B7 failed */\n.flow { display:flex; align-items:center; gap:calc(6px * var(--s)); height:var(--h); padding:0 3px 0 calc(var(--h) * .42);\n white-space:nowrap; font-size:var(--fs); font-weight:600; line-height:1; color:var(--fg); }\n.pill[data-face=\"flow-rec\"] .flow { padding-left:2px; }\n.dock[data-col=\"r\"] .pill[data-face=\"flow-rec\"] .flow { padding-left:calc(var(--h) * .42); padding-right:0; }\n.flow .q { margin-right:calc(4px * var(--s)); }\n.flow .muted { color:var(--fg-3); font-weight:500; }\n.flow svg { font-size:var(--ic); }\n.fb { all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; gap:5px; height:calc(var(--h) - 6px);\n padding:0 calc(10px * var(--s)); border-radius:999px; font-size:calc(var(--fs) - .5px); font-weight:600; line-height:1; color:var(--fg);\n background:var(--ink-2); text-decoration:none;\n transition: background-color var(--duration-quick) var(--ease-out), color var(--duration-quick) var(--ease-out); }\n.fb.primary { background:var(--rec); color:#fff; }\n.fb.icon { width:calc(var(--h) - 6px); padding:0; justify-content:center; background:transparent; color:var(--fg-3); }\n.fb:focus-visible { outline:2px solid var(--rec); outline-offset:1px; }\n@media (hover: hover) {\n .fb:hover { background:var(--ink-3); }\n .fb.primary:hover { background:#ff5670; }\n .fb.icon:hover { color:var(--fg); background:var(--ink-2); }\n}\n.saving { position:relative; padding-right:calc(var(--h) * .42); }\n.saving .spinner { color:var(--fg-2); }\n.saving .spinner circle { stroke-dasharray:44 63; }\n.bar-track { position:absolute; left:calc(var(--h) * .42); right:calc(var(--h) * .42); bottom:3px; height:2px; border-radius:1px; background:var(--ink-2); overflow:hidden; }\n.bar-track > i { position:absolute; inset:0 auto 0 0; width:calc(var(--p, 0) * 100%); border-radius:1px; background:var(--fg-2);\n transition: width var(--duration-fast) var(--ease-smooth-out); }\n.bar-track[data-indeterminate] > i { width:35%; animation:slide 1.1s var(--ease-in-out) infinite; }\n@keyframes slide { from { transform:translateX(-100%); } to { transform:translateX(290%); } }\n.saved .ok { display:inline-flex; color:var(--ok); }\n.failed .warn { display:inline-flex; color:var(--warn); }\n.failed .msg { max-width:calc(220px * var(--s)); overflow:hidden; text-overflow:ellipsis; }\n\n/* the success check (transitions.dev 10, tuned to a 13px glyph) */\n.t-check { display:inline-block; transform-origin:center; opacity:0; will-change:transform, opacity, filter; }\n.t-check svg { display:block; overflow:visible; }\n.t-check svg path { stroke-dasharray:18; stroke-dashoffset:18; }\n.t-check[data-state=\"in\"] {\n animation: t-check-fade var(--duration-very-slow) var(--ease-smooth-out) forwards,\n t-check-rotate var(--duration-very-slow) var(--ease-smooth-out) forwards,\n t-check-blur var(--duration-very-slow) var(--ease-smooth-out) forwards,\n t-check-bob var(--duration-very-slow) cubic-bezier(0.34, 1.35, 0.64, 1) forwards; }\n.t-check[data-state=\"in\"] svg path { animation: t-check-draw var(--duration-very-slow) var(--ease-smooth-out) var(--duration-micro) forwards; }\n@keyframes t-check-fade { from { opacity:0; } to { opacity:1; } }\n@keyframes t-check-rotate { from { transform:rotate(80deg); } to { transform:rotate(0deg); } }\n@keyframes t-check-blur { from { filter:blur(8px); } to { filter:blur(0); } }\n@keyframes t-check-bob { from { translate:0 8px; } to { translate:0 0; } }\n@keyframes t-check-draw { to { stroke-dashoffset:0; } }\n\n/* the edge tab a tucked HUD becomes */\n.tab { all:unset; box-sizing:border-box; position:relative; display:block; width:22px; height:56px; cursor:pointer; touch-action:none; }\n.tab::before { content:\"\"; position:absolute; top:0; bottom:0; width:6px; background:var(--ink);\n -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);\n box-shadow: inset 0 0 0 1px var(--edge), 0 0 0 .5px var(--rim), 0 6px 18px -6px rgba(0,0,0,.5);\n transition: width var(--duration-quick) var(--ease-out); }\n.tab::after { content:\"\"; position:absolute; top:16px; bottom:16px; width:2px; border-radius:1px; background:var(--fg-3); }\n.dock[data-tuck=\"left\"] .tab::before { left:0; border-radius:0 7px 7px 0; }\n.dock[data-tuck=\"right\"] .tab::before { right:0; border-radius:7px 0 0 7px; }\n.dock[data-tuck=\"left\"] .tab::after { left:2px; }\n.dock[data-tuck=\"right\"] .tab::after { right:2px; }\n.tab[data-state=\"rec\"]::after { background:var(--rec); }\n.tab[data-state=\"bad\"]::after { background:var(--warn); }\n.tab:focus-visible::before { width:10px; outline:2px solid var(--rec); outline-offset:1px; }\n@media (hover: hover) { .tab:hover::before { width:9px; } }\n\n/* floats: fixed, placed in JS beside the dock (place.ts) */\n.float { position:fixed; left:0; top:0; z-index:5; pointer-events:auto; }\n\n/* the tooltip (transitions.dev 17): one bubble that travels between triggers */\n.tip { display:inline-flex; align-items:center; gap:7px; padding:calc(5px * var(--s)) calc(8px * var(--s)); border-radius:7px; white-space:nowrap;\n font-size:calc(var(--fs) - 1px); font-weight:600; line-height:1; color:var(--fg); pointer-events:none;\n opacity:0; scale:var(--scale-small); z-index:7;\n transition: opacity 50ms var(--ease-out), scale 50ms var(--ease-out), translate 160ms var(--ease-smooth-out); }\n.tip[data-show=\"true\"] { opacity:1; scale:1;\n transition: opacity var(--duration-quick) var(--ease-out) var(--duration-micro), scale var(--duration-quick) var(--ease-out) var(--duration-micro),\n translate 160ms var(--ease-smooth-out); }\n.tip.snap { transition:none !important; }\n.tip kbd { font:600 calc(var(--fs-s) - .5px)/1 ui-monospace, \"SF Mono\", Menlo, monospace; color:var(--fg-3); letter-spacing:.02em; }\n\n/* the \u22EF menu */\n.menu { width:calc(252px * var(--s)); max-height:calc(100vh - 16px); overflow:auto; overscroll-behavior:contain; scrollbar-width:thin;\n padding:calc(5px * var(--s)); border-radius:calc(13px * var(--s)); display:flex; flex-direction:column; gap:1px; font-size:var(--fs); }\n.m-head { display:flex; flex-direction:column; gap:3px; padding:calc(8px * var(--s)) calc(10px * var(--s)) calc(9px * var(--s)); }\n.m-who { display:flex; align-items:baseline; gap:5px; min-width:0; font-weight:600; color:var(--fg); line-height:1.2; }\n.m-who .email { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.m-who .ws { flex:none; color:var(--fg-2); font-weight:500; }\n.m-who.wraps .email { white-space:normal; overflow-wrap:anywhere; }\n.m-sub { font-size:var(--fs-s); color:var(--fg-3); line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.m-sub .live { color:var(--ok); }\n.m-rule { height:1px; margin:3px 4px; background:var(--edge); flex:none; }\n.m-label { padding:calc(7px * var(--s)) calc(10px * var(--s)) 3px; font-size:var(--fs-s); font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--fg-3); }\n.mi { all:unset; box-sizing:border-box; cursor:pointer; display:flex; align-items:center; gap:9px; min-height:calc(30px * var(--s));\n padding:calc(7px * var(--s)) calc(10px * var(--s)); border-radius:8px; color:var(--fg); line-height:1.2; text-decoration:none;\n transition: background-color var(--duration-quick) var(--ease-out), color var(--duration-quick) var(--ease-out); }\n.mi > svg { color:var(--fg-2); font-size:var(--ic); }\n.mi .end { margin-left:auto; color:var(--fg-3); font-size:var(--ic); }\n.mi:focus-visible { outline:2px solid var(--rec); outline-offset:-2px; }\n.mi.danger { color:var(--fg-2); }\n@media (hover: hover) {\n .mi:hover { background:var(--ink-2); }\n .mi.danger:hover, .mi.danger:hover svg { color:var(--rec); }\n}\n.recent { align-items:flex-start; }\n.recent .r-main { display:flex; flex-direction:column; gap:3px; min-width:0; flex:1; }\n.recent .r-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.recent .r-meta { display:flex; align-items:center; gap:5px; font-size:var(--fs-s); color:var(--fg-3); white-space:nowrap; }\n.recent .r-meta i { width:5px; height:5px; border-radius:50%; flex:none; background:var(--fg-3); }\n.recent .r-meta i[data-status=\"saved\"] { background:var(--ok); }\n.recent .r-meta i[data-status=\"recording\"] { background:var(--rec); }\n.recent .r-meta i[data-status=\"unsaved\"] { background:var(--warn); }\n.recent[aria-disabled=\"true\"] { cursor:default; }\n.recent .end { margin-top:1px; }\n.m-empty { padding:4px 10px 8px; font-size:var(--fs-s); color:var(--fg-3); }\n.m-row { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:calc(32px * var(--s)); padding:2px calc(6px * var(--s)) 2px calc(10px * var(--s)); color:var(--fg-2); }\n.m-row > span:first-child { color:var(--fg); }\n.m-row.toggle { cursor:pointer; border-radius:8px; }\n@media (hover: hover) { .m-row.toggle:hover { background:var(--ink-2); } }\n.m-row.toggle:focus-visible { outline:2px solid var(--rec); outline-offset:-2px; }\n.m-foot { padding:6px 10px 4px; font:500 calc(var(--fs-s) - .5px)/1.3 ui-monospace, \"SF Mono\", Menlo, monospace; color:var(--fg-3); }\n\n/* size: a segmented control with a sliding pill (transitions.dev 16) */\n.sizes { position:relative; display:inline-grid; grid-template-columns:repeat(3, calc(30px * var(--s))); padding:2px; border-radius:999px;\n background:rgba(0,0,0,.28); box-shadow:inset 0 0 0 1px var(--edge); --i:1; }\n.sizes::before { content:\"\"; position:absolute; top:2px; bottom:2px; left:2px; width:calc(30px * var(--s)); border-radius:999px; background:var(--ink-3);\n transform:translateX(calc(var(--i) * 100%)); transition: transform var(--duration-fast) var(--ease-smooth-out); }\n.sizes button { all:unset; box-sizing:border-box; position:relative; z-index:1; cursor:pointer; display:grid; place-items:center;\n height:calc(22px * var(--s)); border-radius:999px; font-size:var(--fs-s); font-weight:700; color:var(--fg-3);\n transition: color var(--duration-fast) var(--ease-smooth-out); }\n.sizes button[aria-checked=\"true\"] { color:var(--fg); }\n.sizes button:focus-visible { outline:2px solid var(--rec); outline-offset:-1px; }\n@media (hover: hover) { .sizes button:hover { color:var(--fg-2); } .sizes button[aria-checked=\"true\"]:hover { color:var(--fg); } }\n\n/* verbose: a switch (transitions.dev 27, travel only) */\n.switch { position:relative; width:calc(30px * var(--s)); height:calc(18px * var(--s)); flex:none; border-radius:999px; background:var(--ink-3);\n transition: background-color var(--duration-fast) var(--ease-smooth-out); }\n.switch::after { content:\"\"; position:absolute; top:2px; left:2px; width:calc(14px * var(--s)); height:calc(14px * var(--s)); border-radius:50%;\n background:var(--fg-2); box-shadow:0 1px 3px rgba(0,0,0,.35);\n transition: translate var(--duration-fast) var(--ease-bounce), background-color var(--duration-fast) var(--ease-smooth-out); }\n.switch[data-on=\"true\"] { background:var(--rec); }\n.switch[data-on=\"true\"]::after { translate:calc(12px * var(--s)) 0; background:#fff; }\n\n/* Move to: a miniature screen, eight spots (no centre); middle-row marks stand up like the pill does */\n.screen { position:relative; display:grid; grid-template-columns:repeat(3, calc(22px * var(--s))); grid-template-rows:repeat(3, calc(15px * var(--s)));\n padding:calc(3px * var(--s)); border-radius:7px; box-shadow:inset 0 0 0 1px var(--edge); background:rgba(0,0,0,.22); }\n.screen button { all:unset; box-sizing:border-box; position:relative; cursor:pointer; border-radius:4px; display:grid; place-items:center; }\n.screen button::before { content:\"\"; width:calc(11px * var(--s)); height:calc(4px * var(--s)); border-radius:2px; background:var(--fg-3); opacity:.55;\n transition: background-color var(--duration-quick) var(--ease-out), opacity var(--duration-quick) var(--ease-out), transform var(--duration-quick) var(--ease-out); }\n.screen button[data-v]::before { width:calc(4px * var(--s)); height:calc(10px * var(--s)); }\n.screen button[aria-checked=\"true\"]::before { background:var(--rec); opacity:1; }\n.screen button:focus-visible { outline:2px solid var(--rec); outline-offset:-1px; }\n.screen .mid { grid-column:2; grid-row:2; }\n@media (hover: hover) { .screen button:hover::before { opacity:1; background:var(--fg-2); transform:scale(1.12); } .screen button[aria-checked=\"true\"]:hover::before { background:var(--rec); } }\n\n/* the details card: the health line when something is wrong, the technical details in verbose mode */\n.detail { width:max-content; max-width:calc(260px * var(--s)); padding:calc(6px * var(--s)) calc(11px * var(--s)); border-radius:calc(10px * var(--s));\n color:var(--fg-2); font-size:calc(var(--fs) - 1px); line-height:1.4; pointer-events:none; }\n.detail.line { border-radius:999px; }\n/* the tooltip and the card open on the same side: the card steps back while a tooltip speaks */\n.hud .tip[data-show=\"true\"] ~ .detail.is-open { opacity:0; transition: opacity var(--duration-quick) var(--ease-out); }\n.detail.bad { color:var(--fg); box-shadow: inset 0 0 0 1px rgba(240,166,58,.55), 0 10px 28px -10px rgba(0,0,0,.5); }\n.detail dl { display:grid; grid-template-columns:auto auto; gap:2px 12px; margin:0; font:500 var(--fs-s)/1.35 ui-monospace, \"SF Mono\", Menlo, monospace; }\n.detail dt { color:var(--fg-3); }\n.detail dd { margin:0; color:var(--fg); font-variant-numeric:tabular-nums; }\n.detail .warnline { margin-top:5px; color:var(--warn); font-size:var(--fs-s); }\n\n/* presence: dropdown-style grow from the anchor on open, a softer shrink on close */\n.grow { transform:scale(var(--scale-medium)); opacity:0;\n transition: transform var(--duration-fast) var(--ease-smooth-out), opacity var(--duration-fast) var(--ease-smooth-out); }\n.grow.is-open { transform:scale(1); opacity:1; }\n.grow.is-closing { transform:scale(var(--scale-tiny)); opacity:0; pointer-events:none; transition-duration: var(--duration-quick); }\n/* phone: the sheet rises from the bottom edge (toast motion) */\n.rise { transform:translateY(var(--rise)) scale(var(--scale-medium)); opacity:0; filter:blur(var(--blur-small));\n transition: transform var(--duration-fast) var(--ease-smooth-out), opacity var(--duration-fast) var(--ease-smooth-out), filter var(--duration-fast) var(--ease-smooth-out); }\n.rise.is-open { transform:none; opacity:1; filter:none; transition-duration: var(--duration-medium); }\n.rise.is-closing { pointer-events:none; }\n\n/* pick chrome (annotate mode): dim, outline, hint \u2014 shadow-root children */\n.dim { position:fixed; inset:0; z-index:1; pointer-events:none; background:rgba(0,0,0,.18); }\n.outline { position:fixed; z-index:2; pointer-events:none; border:2px solid var(--rec); border-radius:6px;\n box-shadow:0 0 0 4px rgba(255,59,87,.15); }\n.hint { position:fixed; top:14px; left:50%; transform:translateX(-50%); z-index:3; padding:calc(8px * var(--s)) calc(14px * var(--s));\n border-radius:999px; font-size:var(--fs); font-weight:600; line-height:1; white-space:nowrap; display:flex; gap:8px; align-items:center; }\n.hint svg { color:var(--rec); }\n.hint .keys { color:var(--fg-3); font-weight:500; margin-left:-4px; }\n@media (pointer: coarse) { .hint .keys { display:none; } }\n.hud[data-spot=\"tc\"] .hint { top:auto; bottom:14px; }\n\n/* sheets: a popover anchored to the dock, or a phone bottom sheet */\n.anchor { position:fixed; z-index:6; pointer-events:none; }\n.anchor > * { pointer-events:auto; }\n.phone { position:fixed; z-index:6; display:flex; flex-direction:column; justify-content:flex-end;\n padding:0 8px calc(8px + env(safe-area-inset-bottom, 0px)); pointer-events:none; }\n.phone > * { pointer-events:auto; }\n.pop { width:min(calc(288px * var(--s)), calc(100vw - 24px)); padding:calc(12px * var(--s)); border-radius:calc(14px * var(--s)); font-size:var(--fs); }\n.phone .pop { width:100%; border-radius:18px; padding:14px; }\n.pop-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }\n.title { display:flex; align-items:center; gap:7px; font-size:calc(var(--fs) + .5px); font-weight:600; color:var(--fg); }\n.title i { width:3px; height:11px; border-radius:1px; background:var(--rec); }\n.closeb { all:unset; box-sizing:border-box; cursor:pointer; width:24px; height:24px; border-radius:7px; color:var(--fg-3);\n display:inline-grid; place-items:center; font-size:12px; }\n.closeb:focus-visible, .sendb:focus-visible, .retry:focus-visible, .dest button:focus-visible { outline:2px solid var(--rec); outline-offset:2px; }\n@media (hover: hover) { .closeb:hover { color:var(--fg); background:var(--ink-2); } }\ntextarea { width:100%; margin-top:10px; padding:9px 11px; min-height:calc(64px * var(--s)); resize:vertical; background:rgba(0,0,0,.28);\n border:0; box-shadow:inset 0 0 0 1px var(--edge); border-radius:9px; color:var(--fg);\n font:400 calc(14px * var(--s))/1.4 -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif; }\n@media (pointer: coarse) { textarea { font-size:16px; } .hints { display:none; } }\ntextarea::placeholder { color:var(--fg-3); }\ntextarea:focus { outline:none; box-shadow:inset 0 0 0 1px var(--fg-3); }\n.row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; margin-top:10px; }\n.row.nodest { grid-template-columns:minmax(0,1fr) auto; }\n.ctx { font-size:var(--fs-s); line-height:1.35; color:var(--fg-3); text-align:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.row.nodest .ctx { text-align:left; }\n.dest { display:inline-flex; padding:2px; border-radius:8px; background:rgba(0,0,0,.28); box-shadow:inset 0 0 0 1px var(--edge); }\n.dest button { all:unset; box-sizing:border-box; cursor:pointer; padding:5px 8px; min-height:24px; border-radius:6px; color:var(--fg-3);\n font-size:calc(var(--fs) - .5px); font-weight:600; line-height:14px; transition: background-color var(--duration-quick) var(--ease-out), color var(--duration-quick) var(--ease-out); }\n.dest button[aria-pressed=\"true\"] { background:var(--ink-2); color:var(--fg); }\n.sendb { all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; gap:6px; height:calc(28px * var(--s)); padding:0 12px;\n border-radius:8px; background:var(--rec); color:#fff; font-size:calc(var(--fs) + .5px); font-weight:600; line-height:1; text-decoration:none; }\n@media (hover: hover) { .sendb:hover { background:#ff5670; } }\n.hints { margin-top:9px; font-size:var(--fs-s); line-height:1; color:var(--fg-3); }\n";
|
|
19
|
+
export declare const HUD_CSS_BASE = "\n* { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif; }\nsvg { width:1em; height:1em; vertical-align:-.125em; flex:none; }\n.hud {\n --ink: rgba(26,22,23,.72); --ink-pop: rgba(26,22,23,.9); --ink-solid: #1d1a1b;\n --ink-2: rgba(255,255,255,.08); --ink-3: rgba(255,255,255,.14); --edge: rgba(255,255,255,.11); --rim: rgba(0,0,0,.30);\n --fg: #f4efea; --fg-2: rgba(244,239,234,.66); --fg-3: rgba(244,239,234,.44);\n --rec: #ff3b57; --rec-soft: rgba(255,59,87,.16); --warn: #f0a63a; --ok: #7fd6a4;\n --m: 16px;\n --s: 1; --h: 28px; --b: 24px; --vw: 36px; --fs: 12px; --fs-s: 10.5px; --ic: 13px;\n --duration-micro: 80ms; --duration-quick: 150ms; --duration-fast: 250ms; --duration-resize: 300ms;\n --duration-medium: 350ms; --duration-very-slow: 500ms; --duration-snap: 500ms;\n --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1); --ease-in-out: ease-in-out; --ease-out: ease-out; --ease-linear: linear;\n --ease-bounce: cubic-bezier(0.34, 1.36, 0.64, 1);\n --ease-spring: var(--ease-smooth-out);\n --distance-micro: 4px; --scale-medium: .97; --scale-small: .98; --scale-tiny: .99; --blur-small: 2px; --rise: 16px;\n color: var(--fg); font-size: var(--fs);\n user-select:none; -webkit-user-select:none;\n}\n.hud[data-size=\"sm\"] { --s: .88; --h: 24px; --b: 20px; --vw: 30px; --fs: 11px; --fs-s: 10px; --ic: 12px; }\n.hud[data-size=\"lg\"] { --s: 1.18; --h: 34px; --b: 30px; --vw: 44px; --fs: 13.5px; --fs-s: 11.5px; --ic: 15px; }\n@supports (transition-timing-function: linear(0, 1)) {\n /* a damped spring, ~4% overshoot over 500ms \u2014 the settle after a throw */\n .hud { --ease-spring: linear(0, 0.042, 0.143, 0.274, 0.414, 0.549, 0.67, 0.773, 0.856, 0.921, 0.968, 1.001, 1.021, 1.033, 1.038, 1.038, 1.035, 1.031, 1.025, 1.02, 1.015, 1.011, 1.007, 1.004, 1); }\n}\n@media (pointer: coarse) {\n .hud { --m: 12px; }\n .hud[data-size=\"sm\"] { --h: 28px; --b: 26px; --vw: 34px; }\n .hud[data-size=\"md\"] { --h: 32px; --b: 30px; --vw: 40px; }\n .hud[data-size=\"lg\"] { --h: 38px; --b: 34px; --vw: 46px; }\n}\n/* scoped under .hud so a control's own `all:unset` reset cannot wipe the surface */\n.hud .glass, .hud .menu, .hud .pop, .hud .detail, .hud .hint, .hud .tip {\n background: var(--ink);\n -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);\n box-shadow: inset 0 0 0 1px var(--edge), 0 0 0 .5px var(--rim), 0 10px 28px -10px rgba(0,0,0,.5), 0 2px 6px -2px rgba(0,0,0,.28);\n color: var(--fg);\n}\n.hud .menu, .hud .pop, .hud .tip { background: var(--ink-pop); }\n@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {\n .hud .glass, .hud .menu, .hud .pop, .hud .detail, .hud .hint, .hud .tip { background: var(--ink-solid); }\n}\n.sr { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }\ntextarea, .code { user-select:text; -webkit-user-select:text; }\n\n/* the dock: one of eight spots, or tucked into a side edge */\n.dock { position:fixed; z-index:4; display:flex; pointer-events:auto; }\n.dock[data-row=\"b\"] { bottom: calc(var(--m) + env(safe-area-inset-bottom, 0px)); }\n.dock[data-row=\"t\"] { top: calc(var(--m) + env(safe-area-inset-top, 0px)); }\n.dock[data-row=\"m\"] { top: calc(50% - var(--hh, 28px) / 2); }\n.dock[data-col=\"l\"] { left: calc(var(--m) + env(safe-area-inset-left, 0px)); }\n.dock[data-col=\"r\"] { right: calc(var(--m) + env(safe-area-inset-right, 0px)); }\n.dock[data-col=\"c\"] { left: calc(50% - var(--hw, 36px) / 2); }\n.dock[data-tuck] { top: clamp(8px, calc(var(--ty, .5) * 100% - 28px), calc(100% - 64px)); }\n.dock[data-tuck=\"left\"] { left:0; }\n.dock[data-tuck=\"right\"] { right:0; }\n.dock.settling { transition: transform var(--duration-snap) var(--ease-spring); }\n/* a throw carries the compact capsule: the tray folds at once, not on its tween */\n.dock.dragging .seg, .dock.dragging .seg-in { transition:none !important; }\n.dock.dragging .glass { box-shadow: inset 0 0 0 1px var(--edge), 0 0 0 .5px var(--rim), 0 18px 40px -12px rgba(0,0,0,.55), 0 4px 10px -4px rgba(0,0,0,.3); }\n\n/* the pill and its segments */\n.pill { position:relative; display:inline-flex; align-items:center; height:var(--h); border-radius:999px; }\n.dock[data-col=\"r\"] .pill[data-orient=\"h\"] { flex-direction:row-reverse; }\n.pill[data-orient=\"v\"] { flex-direction:column; height:auto; width:var(--vw); border-radius:calc(var(--vw) / 2); padding:2px 0 4px; }\n.pill.morphing, .pill.morphing * { transition:none !important; }\n.pill.morphing { overflow:hidden; }\n.seg { display:grid; grid-template-columns:0fr; visibility:hidden;\n transition: grid-template-columns var(--duration-resize) var(--ease-smooth-out), visibility 0s linear var(--duration-resize); }\n.seg-in { min-width:0; overflow:hidden; display:flex; align-items:center; padding:5px 0; margin:-5px 0;\n opacity:0; filter:blur(var(--blur-small));\n transition: opacity var(--duration-quick) var(--ease-in-out), filter var(--duration-quick) var(--ease-in-out); }\n.seg.on { grid-template-columns:1fr; visibility:visible;\n transition: grid-template-columns var(--duration-resize) var(--ease-smooth-out), visibility 0s; }\n.seg.on > .seg-in { opacity:1; filter:none; transition-duration: var(--duration-fast); transition-delay: var(--duration-micro); }\n.pill[data-orient=\"v\"] .seg { grid-template-columns:1fr; grid-template-rows:0fr;\n transition: grid-template-rows var(--duration-resize) var(--ease-smooth-out), visibility 0s linear var(--duration-resize); }\n.pill[data-orient=\"v\"] .seg.on { grid-template-rows:1fr; transition: grid-template-rows var(--duration-resize) var(--ease-smooth-out), visibility 0s; }\n.pill[data-orient=\"v\"] .seg-in { flex-direction:column; min-height:0; padding:0 5px; margin:0 -5px; }\n\n/* the recording dot: its ripple is a pseudo-element, outside layout */\n.dot { position:relative; width:8px; height:8px; flex:none; border-radius:50%; background:var(--rec); }\n.dot::after { content:\"\"; position:absolute; inset:0; border-radius:50%; background:var(--rec); opacity:0; pointer-events:none;\n animation:ripple 2s var(--ease-out) infinite; }\n@keyframes ripple { 0% { transform:scale(1); opacity:.45; } 70%, 100% { transform:scale(2.75); opacity:0; } }\n.pill[data-state=\"paused\"] .dot { background:var(--fg-3); }\n.pill[data-state=\"bad\"] .dot { background:var(--warn); }\n.pill[data-state=\"paused\"] .dot::after, .pill[data-state=\"bad\"] .dot::after { animation:none; }\n\n/* idle: the puck \u2014 ring = not linked, dot = ready; the label slides out on intent */\n.puck { all:unset; box-sizing:border-box; display:inline-flex; align-items:center; height:var(--h); min-width:var(--h);\n padding:0 calc((var(--h) - 10px) / 2); border-radius:999px; cursor:pointer; touch-action:none;\n font-weight:600; font-size:var(--fs); color:var(--fg); }\n.dock[data-col=\"r\"] .puck { flex-direction:row-reverse; }\n.ring { width:10px; height:10px; flex:none; border-radius:50%; box-shadow:inset 0 0 0 1.5px var(--fg-2);\n transition: background-color var(--duration-quick) var(--ease-out), box-shadow var(--duration-quick) var(--ease-out); }\n.puck[data-state=\"ready\"] .ring { background:var(--fg-2); box-shadow:none; }\n.puck[data-state=\"busy\"] .ring { background:var(--fg-3); box-shadow:none; animation:breathe 1.2s var(--ease-in-out) infinite; }\n@keyframes breathe { 50% { opacity:.35; } }\n.lab { display:grid; grid-template-columns:0fr; opacity:0;\n transition: grid-template-columns var(--duration-resize) var(--ease-smooth-out), opacity var(--duration-quick) var(--ease-out); }\n/* the gap to the ring is a clipped pseudo-element: padding would keep a folded label 10px wide */\n.lab > span { min-width:0; overflow:hidden; white-space:nowrap; }\n.lab > span::before, .lab > span::after { content:\"\"; display:inline-block; }\n.lab > span::before { width:8px; }\n.lab > span::after { width:2px; }\n.dock[data-col=\"r\"] .lab > span::before { width:2px; }\n.dock[data-col=\"r\"] .lab > span::after { width:8px; }\n.pill[data-open] .lab, .puck:focus-visible .lab { grid-template-columns:1fr; opacity:1; }\n.puck:focus-visible, .handle:focus-visible { outline:2px solid var(--rec); outline-offset:2px; }\n@media (hover: hover) {\n .puck[data-state=\"ready\"]:hover .ring { background:var(--rec); }\n .puck[data-state=\"unlinked\"]:hover .ring { box-shadow:inset 0 0 0 1.5px var(--fg); }\n}\n\n/* recording: the handle (dot + clock) \u2014 symmetric: the dot centres in the pill's round end */\n.handle { all:unset; box-sizing:border-box; display:inline-flex; align-items:center; gap:6px; height:var(--h);\n padding:0 calc((var(--h) - 8px) / 2); border-radius:999px; cursor:grab; touch-action:none; }\n.dock.dragging .handle { cursor:grabbing; }\n.pill[data-orient=\"v\"] .handle { flex-direction:column; height:auto; width:var(--vw); gap:5px; padding:calc((var(--vw) - 8px) / 2 - 2px) 0 6px; }\n.clock { display:inline-flex; align-items:center; }\n.clock .seg-in { padding:0; margin:0; }\n.time { font-weight:600; font-size:var(--fs); line-height:1; font-variant-numeric:tabular-nums; letter-spacing:.01em; white-space:nowrap; }\n.pill[data-orient=\"v\"] .time { font-size:var(--fs-s); letter-spacing:-.01em; }\n.pill[data-orient=\"v\"] .clock { flex-direction:column; }\n.flash { display:inline-flex; align-items:center; gap:4px; color:var(--ok); font-weight:600; font-size:var(--fs); line-height:1; white-space:nowrap; }\n.flash svg { font-size:var(--ic); }\n.pill[data-orient=\"v\"] .flash span { display:none; }\n\n/* the tool tray */\n.tools { display:flex; align-items:center; gap:calc(2px * var(--s)); padding-right:3px; }\n.dock[data-col=\"r\"] .pill[data-orient=\"h\"] .tools { flex-direction:row-reverse; padding-right:0; padding-left:3px; }\n.pill[data-orient=\"v\"] .tools { flex-direction:column; padding:0 0 2px; gap:calc(3px * var(--s)); }\n.sep { width:1px; height:14px; flex:none; margin:0 4px 0 0; background:var(--edge); }\n.dock[data-col=\"r\"] .pill[data-orient=\"h\"] .sep { margin:0 0 0 4px; }\n.pill[data-orient=\"v\"] .sep { width:14px; height:1px; margin:2px 0 4px; }\nbutton.tb { all:unset; pointer-events:auto; box-sizing:border-box; position:relative; flex:none; display:inline-grid; place-items:center;\n width:var(--b); height:var(--b); border-radius:999px; color:var(--fg-2); cursor:pointer; font-size:var(--ic);\n transition: background-color var(--duration-quick) var(--ease-out), color var(--duration-quick) var(--ease-out); }\nbutton.tb.b-annotate { color:var(--rec); }\nbutton.tb.on { background:var(--rec); color:#fff; }\nbutton.tb.b-stop svg { fill:currentColor; stroke:none; font-size:calc(var(--ic) * .82); }\nbutton.tb:focus-visible { outline:2px solid var(--rec); outline-offset:-2px; }\n@media (hover: hover) {\n button.tb:hover { background:var(--ink-2); color:var(--fg); }\n button.tb.on:hover { background:var(--rec); color:#fff; }\n button.tb.b-stop:hover { background:var(--rec-soft); color:var(--rec); }\n}\n\n/* the sync chip: legible at a glance \u2014 icon + word, colour by state */\n.sync { display:inline-flex; align-items:center; gap:4px; height:var(--b); padding:0 7px 0 5px; margin-right:2px; border-radius:999px;\n font-size:var(--fs-s); font-weight:600; line-height:1; white-space:nowrap; color:var(--fg-3); background:transparent;\n transition: color var(--duration-quick) var(--ease-out), background-color var(--duration-quick) var(--ease-out); }\n.sync svg { font-size:calc(var(--ic) * .95); }\n.sync[data-kind=\"synced\"] svg { color:var(--ok); }\n.sync[data-kind=\"sending\"] { color:var(--fg-2); }\n.sync[data-kind=\"offline\"] { color:var(--warn); background:rgba(240,166,58,.12); }\n.sync[data-kind=\"error\"] { color:var(--rec); background:var(--rec-soft); }\n.sync .swap { display:inline-flex; animation:swap-in var(--duration-quick) var(--ease-in-out) both; }\n.pill[data-orient=\"v\"] .sync { width:var(--b); padding:0; margin:0 0 2px; justify-content:center; }\n.pill[data-orient=\"v\"] .sync .word { display:none; }\n.dock[data-col=\"r\"] .pill[data-orient=\"h\"] .sync { margin:0 0 0 2px; }\n@keyframes swap-in { from { opacity:0; transform:translateY(var(--distance-micro)); filter:blur(var(--blur-small)); } }\n.spin { animation:spin .9s var(--ease-linear) infinite; transform-origin:50% 50%; }\n@keyframes spin { to { transform:rotate(360deg); } }\n\n/* inline flows: confirm \u00B7 saving \u00B7 saved \u00B7 failed */\n.flow { display:flex; align-items:center; gap:calc(6px * var(--s)); height:var(--h); padding:0 3px 0 calc(var(--h) * .42);\n white-space:nowrap; font-size:var(--fs); font-weight:600; line-height:1; color:var(--fg); }\n.pill[data-face=\"flow-rec\"] .flow { padding-left:2px; }\n.dock[data-col=\"r\"] .pill[data-face=\"flow-rec\"] .flow { padding-left:calc(var(--h) * .42); padding-right:0; }\n.flow .q { margin-right:calc(4px * var(--s)); }\n.flow .muted { color:var(--fg-3); font-weight:500; }\n.flow svg { font-size:var(--ic); }\n.fb { all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; gap:5px; height:calc(var(--h) - 6px);\n padding:0 calc(10px * var(--s)); border-radius:999px; font-size:calc(var(--fs) - .5px); font-weight:600; line-height:1; color:var(--fg);\n background:var(--ink-2); text-decoration:none;\n transition: background-color var(--duration-quick) var(--ease-out), color var(--duration-quick) var(--ease-out); }\n.fb.primary { background:var(--rec); color:#fff; }\n.fb.icon { width:calc(var(--h) - 6px); padding:0; justify-content:center; background:transparent; color:var(--fg-3); }\n.fb:focus-visible { outline:2px solid var(--rec); outline-offset:1px; }\n@media (hover: hover) {\n .fb:hover { background:var(--ink-3); }\n .fb.primary:hover { background:#ff5670; }\n .fb.icon:hover { color:var(--fg); background:var(--ink-2); }\n}\n.saving { position:relative; padding-right:calc(var(--h) * .42); }\n.saving .spinner { color:var(--fg-2); }\n.saving .spinner circle { stroke-dasharray:44 63; }\n.bar-track { position:absolute; left:calc(var(--h) * .42); right:calc(var(--h) * .42); bottom:3px; height:2px; border-radius:1px; background:var(--ink-2); overflow:hidden; }\n.bar-track > i { position:absolute; inset:0 auto 0 0; width:calc(var(--p, 0) * 100%); border-radius:1px; background:var(--fg-2);\n transition: width var(--duration-fast) var(--ease-smooth-out); }\n.bar-track[data-indeterminate] > i { width:35%; animation:slide 1.1s var(--ease-in-out) infinite; }\n@keyframes slide { from { transform:translateX(-100%); } to { transform:translateX(290%); } }\n.saved .ok { display:inline-flex; color:var(--ok); }\n.failed .warn { display:inline-flex; color:var(--warn); }\n.failed .msg { max-width:calc(220px * var(--s)); overflow:hidden; text-overflow:ellipsis; }\n\n/* the success check (transitions.dev 10, tuned to a 13px glyph) */\n.t-check { display:inline-block; transform-origin:center; opacity:0; will-change:transform, opacity, filter; }\n.t-check svg { display:block; overflow:visible; }\n.t-check svg path { stroke-dasharray:18; stroke-dashoffset:18; }\n.t-check[data-state=\"in\"] {\n animation: t-check-fade var(--duration-very-slow) var(--ease-smooth-out) forwards,\n t-check-rotate var(--duration-very-slow) var(--ease-smooth-out) forwards,\n t-check-blur var(--duration-very-slow) var(--ease-smooth-out) forwards,\n t-check-bob var(--duration-very-slow) cubic-bezier(0.34, 1.35, 0.64, 1) forwards; }\n.t-check[data-state=\"in\"] svg path { animation: t-check-draw var(--duration-very-slow) var(--ease-smooth-out) var(--duration-micro) forwards; }\n@keyframes t-check-fade { from { opacity:0; } to { opacity:1; } }\n@keyframes t-check-rotate { from { transform:rotate(80deg); } to { transform:rotate(0deg); } }\n@keyframes t-check-blur { from { filter:blur(8px); } to { filter:blur(0); } }\n@keyframes t-check-bob { from { translate:0 8px; } to { translate:0 0; } }\n@keyframes t-check-draw { to { stroke-dashoffset:0; } }\n\n/* the edge tab a tucked HUD becomes */\n.tab { all:unset; box-sizing:border-box; position:relative; display:block; width:22px; height:56px; cursor:pointer; touch-action:none; }\n.tab::before { content:\"\"; position:absolute; top:0; bottom:0; width:6px; background:var(--ink);\n -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);\n box-shadow: inset 0 0 0 1px var(--edge), 0 0 0 .5px var(--rim), 0 6px 18px -6px rgba(0,0,0,.5);\n transition: width var(--duration-quick) var(--ease-out); }\n.tab::after { content:\"\"; position:absolute; top:16px; bottom:16px; width:2px; border-radius:1px; background:var(--fg-3); }\n.dock[data-tuck=\"left\"] .tab::before { left:0; border-radius:0 7px 7px 0; }\n.dock[data-tuck=\"right\"] .tab::before { right:0; border-radius:7px 0 0 7px; }\n.dock[data-tuck=\"left\"] .tab::after { left:2px; }\n.dock[data-tuck=\"right\"] .tab::after { right:2px; }\n.tab[data-state=\"rec\"]::after { background:var(--rec); }\n.tab[data-state=\"bad\"]::after { background:var(--warn); }\n.tab:focus-visible::before { width:10px; outline:2px solid var(--rec); outline-offset:1px; }\n@media (hover: hover) { .tab:hover::before { width:9px; } }\n\n/* floats: fixed, placed in JS beside the dock (place.ts) */\n.float { position:fixed; left:0; top:0; z-index:5; pointer-events:auto; }\n\n/* the tooltip (transitions.dev 17): one bubble that travels between triggers */\n.tip { display:inline-flex; align-items:center; gap:7px; padding:calc(5px * var(--s)) calc(8px * var(--s)); border-radius:7px; white-space:nowrap;\n font-size:calc(var(--fs) - 1px); font-weight:600; line-height:1; color:var(--fg); pointer-events:none;\n opacity:0; scale:var(--scale-small); z-index:7;\n transition: opacity 50ms var(--ease-out), scale 50ms var(--ease-out), translate 160ms var(--ease-smooth-out); }\n.tip[data-show=\"true\"] { opacity:1; scale:1;\n transition: opacity var(--duration-quick) var(--ease-out) var(--duration-micro), scale var(--duration-quick) var(--ease-out) var(--duration-micro),\n translate 160ms var(--ease-smooth-out); }\n.tip.snap { transition:none !important; }\n.tip kbd { font:600 calc(var(--fs-s) - .5px)/1 ui-monospace, \"SF Mono\", Menlo, monospace; color:var(--fg-3); letter-spacing:.02em; }\n\n/* the \u22EF menu */\n.menu { width:calc(252px * var(--s)); max-height:calc(100vh - 16px); overflow:auto; overscroll-behavior:contain; scrollbar-width:thin;\n padding:calc(5px * var(--s)); border-radius:calc(13px * var(--s)); display:flex; flex-direction:column; gap:1px; font-size:var(--fs); }\n.m-head { display:flex; flex-direction:column; gap:3px; padding:calc(8px * var(--s)) calc(10px * var(--s)) calc(9px * var(--s)); }\n.m-who { display:flex; align-items:baseline; gap:5px; min-width:0; font-weight:600; color:var(--fg); line-height:1.2; }\n.m-who .email { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.m-who .ws { flex:none; color:var(--fg-2); font-weight:500; }\n.m-who.wraps .email { white-space:normal; overflow-wrap:anywhere; }\n.m-sub { font-size:var(--fs-s); color:var(--fg-3); line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.m-sub .live { color:var(--ok); }\n.m-rule { height:1px; margin:3px 4px; background:var(--edge); flex:none; }\n.m-label { padding:calc(7px * var(--s)) calc(10px * var(--s)) 3px; font-size:var(--fs-s); font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--fg-3); }\n.mi { all:unset; box-sizing:border-box; cursor:pointer; display:flex; align-items:center; gap:9px; min-height:calc(30px * var(--s));\n padding:calc(7px * var(--s)) calc(10px * var(--s)); border-radius:8px; color:var(--fg); line-height:1.2; text-decoration:none;\n transition: background-color var(--duration-quick) var(--ease-out), color var(--duration-quick) var(--ease-out); }\n.mi > svg { color:var(--fg-2); font-size:var(--ic); }\n.mi .end { margin-left:auto; color:var(--fg-3); font-size:var(--ic); }\n.mi:focus-visible { outline:2px solid var(--rec); outline-offset:-2px; }\n.mi.danger { color:var(--fg-2); }\n@media (hover: hover) {\n .mi:hover { background:var(--ink-2); }\n .mi.danger:hover, .mi.danger:hover svg { color:var(--rec); }\n}\n.recent { align-items:flex-start; }\n.recent .r-main { display:flex; flex-direction:column; gap:3px; min-width:0; flex:1; }\n.recent .r-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.recent .r-meta { display:flex; align-items:center; gap:5px; font-size:var(--fs-s); color:var(--fg-3); white-space:nowrap; }\n.recent .r-meta i { width:5px; height:5px; border-radius:50%; flex:none; background:var(--fg-3); }\n.recent .r-meta i[data-status=\"saved\"] { background:var(--ok); }\n.recent .r-meta i[data-status=\"recording\"] { background:var(--rec); }\n.recent .r-meta i[data-status=\"unsaved\"] { background:var(--warn); }\n.recent[aria-disabled=\"true\"] { cursor:default; }\n.recent .end { margin-top:1px; }\n.m-empty { padding:4px 10px 8px; font-size:var(--fs-s); color:var(--fg-3); }\n.m-row { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:calc(32px * var(--s)); padding:2px calc(6px * var(--s)) 2px calc(10px * var(--s)); color:var(--fg-2); }\n.m-row > span:first-child { color:var(--fg); }\n.m-row.toggle { cursor:pointer; border-radius:8px; }\n@media (hover: hover) { .m-row.toggle:hover { background:var(--ink-2); } }\n.m-row.toggle:focus-visible { outline:2px solid var(--rec); outline-offset:-2px; }\n.m-foot { padding:6px 10px 4px; font:500 calc(var(--fs-s) - .5px)/1.3 ui-monospace, \"SF Mono\", Menlo, monospace; color:var(--fg-3); }\n\n/* size: a segmented control with a sliding pill (transitions.dev 16) */\n.sizes { position:relative; display:inline-grid; grid-template-columns:repeat(3, calc(30px * var(--s))); padding:2px; border-radius:999px;\n background:rgba(0,0,0,.28); box-shadow:inset 0 0 0 1px var(--edge); --i:1; }\n.sizes::before { content:\"\"; position:absolute; top:2px; bottom:2px; left:2px; width:calc(30px * var(--s)); border-radius:999px; background:var(--ink-3);\n transform:translateX(calc(var(--i) * 100%)); transition: transform var(--duration-fast) var(--ease-smooth-out); }\n.sizes button { all:unset; box-sizing:border-box; position:relative; z-index:1; cursor:pointer; display:grid; place-items:center;\n height:calc(22px * var(--s)); border-radius:999px; font-size:var(--fs-s); font-weight:700; color:var(--fg-3);\n transition: color var(--duration-fast) var(--ease-smooth-out); }\n.sizes button[aria-checked=\"true\"] { color:var(--fg); }\n.sizes button:focus-visible { outline:2px solid var(--rec); outline-offset:-1px; }\n@media (hover: hover) { .sizes button:hover { color:var(--fg-2); } .sizes button[aria-checked=\"true\"]:hover { color:var(--fg); } }\n\n/* verbose: a switch (transitions.dev 27, travel only) */\n.switch { position:relative; width:calc(30px * var(--s)); height:calc(18px * var(--s)); flex:none; border-radius:999px; background:var(--ink-3);\n transition: background-color var(--duration-fast) var(--ease-smooth-out); }\n.switch::after { content:\"\"; position:absolute; top:2px; left:2px; width:calc(14px * var(--s)); height:calc(14px * var(--s)); border-radius:50%;\n background:var(--fg-2); box-shadow:0 1px 3px rgba(0,0,0,.35);\n transition: translate var(--duration-fast) var(--ease-bounce), background-color var(--duration-fast) var(--ease-smooth-out); }\n.switch[data-on=\"true\"] { background:var(--rec); }\n.switch[data-on=\"true\"]::after { translate:calc(12px * var(--s)) 0; background:#fff; }\n\n/* Move to: a miniature screen, eight spots (no centre); middle-row marks stand up like the pill does */\n.screen { position:relative; display:grid; grid-template-columns:repeat(3, calc(22px * var(--s))); grid-template-rows:repeat(3, calc(15px * var(--s)));\n padding:calc(3px * var(--s)); border-radius:7px; box-shadow:inset 0 0 0 1px var(--edge); background:rgba(0,0,0,.22); }\n.screen button { all:unset; box-sizing:border-box; position:relative; cursor:pointer; border-radius:4px; display:grid; place-items:center; }\n.screen button::before { content:\"\"; width:calc(11px * var(--s)); height:calc(4px * var(--s)); border-radius:2px; background:var(--fg-3); opacity:.55;\n transition: background-color var(--duration-quick) var(--ease-out), opacity var(--duration-quick) var(--ease-out), transform var(--duration-quick) var(--ease-out); }\n.screen button[data-v]::before { width:calc(4px * var(--s)); height:calc(10px * var(--s)); }\n.screen button[aria-checked=\"true\"]::before { background:var(--rec); opacity:1; }\n.screen button:focus-visible { outline:2px solid var(--rec); outline-offset:-1px; }\n.screen .mid { grid-column:2; grid-row:2; }\n@media (hover: hover) { .screen button:hover::before { opacity:1; background:var(--fg-2); transform:scale(1.12); } .screen button[aria-checked=\"true\"]:hover::before { background:var(--rec); } }\n\n/* the details card: the health line when something is wrong, the technical details in verbose mode */\n.detail { width:max-content; max-width:calc(260px * var(--s)); padding:calc(6px * var(--s)) calc(11px * var(--s)); border-radius:calc(10px * var(--s));\n color:var(--fg-2); font-size:calc(var(--fs) - 1px); line-height:1.4; pointer-events:none; }\n.detail.line { border-radius:999px; }\n/* the tooltip and the card open on the same side: the card steps back while a tooltip speaks */\n.hud .tip[data-show=\"true\"] ~ .detail.is-open { opacity:0; transition: opacity var(--duration-quick) var(--ease-out); }\n.detail.bad { color:var(--fg); box-shadow: inset 0 0 0 1px rgba(240,166,58,.55), 0 10px 28px -10px rgba(0,0,0,.5); }\n.detail dl { display:grid; grid-template-columns:auto auto; gap:2px 12px; margin:0; font:500 var(--fs-s)/1.35 ui-monospace, \"SF Mono\", Menlo, monospace; }\n.detail dt { color:var(--fg-3); }\n.detail dd { margin:0; color:var(--fg); font-variant-numeric:tabular-nums; }\n.detail .warnline { margin-top:5px; color:var(--warn); font-size:var(--fs-s); }\n\n/* presence: dropdown-style grow from the anchor on open, a softer shrink on close */\n.grow { transform:scale(var(--scale-medium)); opacity:0;\n transition: transform var(--duration-fast) var(--ease-smooth-out), opacity var(--duration-fast) var(--ease-smooth-out); }\n.grow.is-open { transform:scale(1); opacity:1; }\n.grow.is-closing { transform:scale(var(--scale-tiny)); opacity:0; pointer-events:none; transition-duration: var(--duration-quick); }\n/* phone: the sheet rises from the bottom edge (toast motion) */\n.rise { transform:translateY(var(--rise)) scale(var(--scale-medium)); opacity:0; filter:blur(var(--blur-small));\n transition: transform var(--duration-fast) var(--ease-smooth-out), opacity var(--duration-fast) var(--ease-smooth-out), filter var(--duration-fast) var(--ease-smooth-out); }\n.rise.is-open { transform:none; opacity:1; filter:none; transition-duration: var(--duration-medium); }\n.rise.is-closing { pointer-events:none; }\n\n/* pick chrome (annotate mode): dim, outline, hint \u2014 shadow-root children */\n.dim { position:fixed; inset:0; z-index:1; pointer-events:none; background:rgba(0,0,0,.18); }\n.outline { position:fixed; z-index:2; pointer-events:none; border:2px solid var(--rec); border-radius:6px;\n box-shadow:0 0 0 4px rgba(255,59,87,.15); }\n.hint { position:fixed; top:14px; left:50%; transform:translateX(-50%); z-index:3; padding:calc(8px * var(--s)) calc(14px * var(--s));\n border-radius:999px; font-size:var(--fs); font-weight:600; line-height:1; white-space:nowrap; display:flex; gap:8px; align-items:center; }\n.hint svg { color:var(--rec); }\n.hint .keys { color:var(--fg-3); font-weight:500; margin-left:-4px; }\n@media (pointer: coarse) { .hint .keys { display:none; } }\n.hud[data-spot=\"tc\"] .hint { top:auto; bottom:14px; }\n\n/* sheets: a popover anchored to the dock, or a phone bottom sheet */\n.anchor { position:fixed; z-index:6; pointer-events:none; }\n.anchor > * { pointer-events:auto; }\n.phone { position:fixed; z-index:6; display:flex; flex-direction:column; justify-content:flex-end;\n padding:0 8px calc(8px + env(safe-area-inset-bottom, 0px)); pointer-events:none; }\n.phone > * { pointer-events:auto; }\n.pop { width:min(calc(288px * var(--s)), calc(100vw - 24px)); padding:calc(12px * var(--s)); border-radius:calc(14px * var(--s)); font-size:var(--fs); }\n.phone .pop { width:100%; border-radius:18px; padding:14px; }\n.pop-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }\n.title { display:flex; align-items:center; gap:7px; font-size:calc(var(--fs) + .5px); font-weight:600; color:var(--fg); }\n.title i { width:3px; height:11px; border-radius:1px; background:var(--rec); }\n.closeb { all:unset; box-sizing:border-box; cursor:pointer; width:24px; height:24px; border-radius:7px; color:var(--fg-3);\n display:inline-grid; place-items:center; font-size:12px; }\n.closeb:focus-visible, .sendb:focus-visible, .retry:focus-visible, .dest button:focus-visible { outline:2px solid var(--rec); outline-offset:2px; }\n@media (hover: hover) { .closeb:hover { color:var(--fg); background:var(--ink-2); } }\ntextarea { width:100%; margin-top:10px; padding:9px 11px; min-height:calc(64px * var(--s)); resize:vertical; background:rgba(0,0,0,.28);\n border:0; box-shadow:inset 0 0 0 1px var(--edge); border-radius:9px; color:var(--fg);\n font:400 calc(14px * var(--s))/1.4 -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif; }\n@media (pointer: coarse) { textarea { font-size:16px; } .hints { display:none; } }\ntextarea::placeholder { color:var(--fg-3); }\ntextarea:focus { outline:none; box-shadow:inset 0 0 0 1px var(--fg-3); }\n.row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; margin-top:10px; }\n.row.nodest { grid-template-columns:minmax(0,1fr) auto; }\n.ctx { font-size:var(--fs-s); line-height:1.35; color:var(--fg-3); text-align:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.row.nodest .ctx { text-align:left; }\n.dest { display:inline-flex; padding:2px; border-radius:8px; background:rgba(0,0,0,.28); box-shadow:inset 0 0 0 1px var(--edge); }\n.dest button { all:unset; box-sizing:border-box; cursor:pointer; padding:5px 8px; min-height:24px; border-radius:6px; color:var(--fg-3);\n font-size:calc(var(--fs) - .5px); font-weight:600; line-height:14px; transition: background-color var(--duration-quick) var(--ease-out), color var(--duration-quick) var(--ease-out); }\n.dest button[aria-pressed=\"true\"] { background:var(--ink-2); color:var(--fg); }\n.sendb { all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; gap:6px; height:calc(28px * var(--s)); padding:0 12px;\n border-radius:8px; background:var(--rec); color:#fff; font-size:calc(var(--fs) + .5px); font-weight:600; line-height:1; text-decoration:none; }\n@media (hover: hover) { .sendb:hover { background:#ff5670; } }\n.sendb[aria-disabled=\"true\"] { opacity:.45; cursor:default; background:var(--rec); }\n.hints { margin-top:9px; font-size:var(--fs-s); line-height:1; color:var(--fg-3); }\n";
|
|
20
20
|
/**
|
|
21
21
|
* Inline style of the HUD host: a 0×0 fixed box at the viewport origin (the
|
|
22
22
|
* dock and sheets are fixed children of its shadow root). Zero-size keeps
|
|
@@ -400,6 +400,7 @@ textarea:focus { outline:none; box-shadow:inset 0 0 0 1px var(--fg-3); }
|
|
|
400
400
|
.sendb { all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; gap:6px; height:calc(28px * var(--s)); padding:0 12px;
|
|
401
401
|
border-radius:8px; background:var(--rec); color:#fff; font-size:calc(var(--fs) + .5px); font-weight:600; line-height:1; text-decoration:none; }
|
|
402
402
|
@media (hover: hover) { .sendb:hover { background:#ff5670; } }
|
|
403
|
+
.sendb[aria-disabled="true"] { opacity:.45; cursor:default; background:var(--rec); }
|
|
403
404
|
.hints { margin-top:9px; font-size:var(--fs-s); line-height:1; color:var(--fg-3); }
|
|
404
405
|
`;
|
|
405
406
|
/**
|
|
@@ -30,6 +30,11 @@ export interface VitrinkaRecorderRootProps {
|
|
|
30
30
|
environment?: string;
|
|
31
31
|
/** Explicit project; omitted = the host's project rule decides. */
|
|
32
32
|
project?: string;
|
|
33
|
+
/**
|
|
34
|
+
* `false` turns off the flight recorder: the idle pill keeps no in-memory
|
|
35
|
+
* last minute, so "Report a bug" is offered only while recording.
|
|
36
|
+
*/
|
|
37
|
+
flightRecorder?: boolean;
|
|
33
38
|
/** A router's pathname, when the History wrap is not enough. */
|
|
34
39
|
route?: string | null;
|
|
35
40
|
children?: ReactNode;
|
package/build/recorder/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { envConfig, vitrinkaConfigured } from './config';
|
|
|
13
13
|
import { mountRecorderHud } from './hud/mount';
|
|
14
14
|
import { createPageController } from './page-controller';
|
|
15
15
|
import { RecorderProvider, useRecorderRoute } from './RecorderProvider';
|
|
16
|
+
import { wantFlight } from './report';
|
|
16
17
|
import { getRecorderStorage } from './storage';
|
|
17
18
|
export { useRecorderRoute };
|
|
18
19
|
export { configureRecorderStorage } from './storage';
|
|
@@ -32,6 +33,7 @@ export function VitrinkaRecorderRoot(props) {
|
|
|
32
33
|
environment: props.environment,
|
|
33
34
|
project: props.project,
|
|
34
35
|
label: props.label,
|
|
36
|
+
flightRecorder: props.flightRecorder,
|
|
35
37
|
},
|
|
36
38
|
}, createElement(RouteFeed, { route: props.route }), props.children);
|
|
37
39
|
}
|
|
@@ -50,10 +52,16 @@ export function VitrinkaRecorderPill(props) {
|
|
|
50
52
|
useEffect(() => {
|
|
51
53
|
if (!vitrinkaConfigured())
|
|
52
54
|
return;
|
|
53
|
-
|
|
55
|
+
// The idle pill keeps the last minute for "Report a bug" (report.ts gates it).
|
|
56
|
+
const releaseFlight = wantFlight();
|
|
57
|
+
const unmount = mountRecorderHud(createPageController(), {
|
|
54
58
|
title: () => titleRef.current ?? document.title,
|
|
55
59
|
storage: getRecorderStorage(),
|
|
56
60
|
});
|
|
61
|
+
return () => {
|
|
62
|
+
unmount();
|
|
63
|
+
releaseFlight();
|
|
64
|
+
};
|
|
57
65
|
}, []);
|
|
58
66
|
return null;
|
|
59
67
|
}
|
|
@@ -3,6 +3,7 @@ import { forgetLink, linkDevice } from './link';
|
|
|
3
3
|
import { cachedAccount, cachedPrefs, fetchMe, savePrefs } from './me';
|
|
4
4
|
import { getState, health } from './queue';
|
|
5
5
|
import { readRecents, refreshRecents } from './recents';
|
|
6
|
+
import { canReport, holdReport, sendReport } from './report';
|
|
6
7
|
import { addAnnotation, addNote, RECORDER_ID, startSession, stopSession, togglePause } from './session';
|
|
7
8
|
import { annotateState, setAnnotating, subscribe } from './state';
|
|
8
9
|
function build() {
|
|
@@ -45,6 +46,7 @@ function build() {
|
|
|
45
46
|
recents: readRecents().map((r) => r.status === 'recording' && r.sessionId !== rec?.sessionId ? { ...r, status: 'unsaved' } : r),
|
|
46
47
|
workspaceUrl: cfg.url,
|
|
47
48
|
version: RECORDER_ID,
|
|
49
|
+
canReport: canReport(),
|
|
48
50
|
};
|
|
49
51
|
}
|
|
50
52
|
export function createPageController() {
|
|
@@ -96,5 +98,7 @@ export function createPageController() {
|
|
|
96
98
|
await savePrefs(patch);
|
|
97
99
|
},
|
|
98
100
|
refreshRecents: () => refreshRecents(getState()?.sessionId ?? null),
|
|
101
|
+
holdReport,
|
|
102
|
+
report: (r) => sendReport(r),
|
|
99
103
|
};
|
|
100
104
|
}
|
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
*/
|
|
29
29
|
import type { RedactionPolicy } from '@vitrinka/redact';
|
|
30
30
|
import type { RecorderEvent } from '../protocol';
|
|
31
|
+
export declare const MAX_BATCH_BYTES: number;
|
|
32
|
+
/** The server's per-POST event cap. */
|
|
33
|
+
export declare const EVENTS_PER_POST = 500;
|
|
34
|
+
/** UTF-8 byte length of a string — the unit the server's body limit counts. */
|
|
35
|
+
export declare function utf8Bytes(s: string): number;
|
|
31
36
|
/** How often a live session reconciles against the server (extension D5). */
|
|
32
37
|
export declare const RECONCILE_MS = 10000;
|
|
33
38
|
export interface SessionState {
|
|
@@ -110,10 +115,12 @@ export declare function capturesSettled(deadlineMs?: number): Promise<boolean>;
|
|
|
110
115
|
/** Is `id` the session currently in state AND still accepting capture? */
|
|
111
116
|
export declare function isSessionLive(id: string): boolean;
|
|
112
117
|
/**
|
|
113
|
-
* Append an event to the durable buffer (drops
|
|
114
|
-
*
|
|
115
|
-
* kind+payload plus the route they observed.
|
|
116
|
-
* when
|
|
118
|
+
* Append an event to the durable buffer (drops while paused or dead).
|
|
119
|
+
* `tabId`/`tabHost`/`ts`/`seq` are filled here; capture layers pass
|
|
120
|
+
* kind+payload plus the route they observed. With no session the event goes
|
|
121
|
+
* to the flight recorder when the idle pill keeps one (memory only — never
|
|
122
|
+
* storage, never the network), else it is dropped. Returns the stamped ts
|
|
123
|
+
* (null when dropped).
|
|
117
124
|
*/
|
|
118
125
|
export declare function pushEvent(kind: string, payload: Record<string, unknown> | undefined, route: {
|
|
119
126
|
tabId: string;
|