@vitrinka/web 0.1.5 → 0.2.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +73 -21
  3. package/build/hud.d.ts +9 -0
  4. package/build/hud.iife.js +411 -0
  5. package/build/hud.js +8 -0
  6. package/build/recorder/api.d.ts +2 -0
  7. package/build/recorder/block.d.ts +7 -0
  8. package/build/recorder/block.js +7 -0
  9. package/build/recorder/capture/click.d.ts +2 -4
  10. package/build/recorder/capture/click.js +2 -31
  11. package/build/recorder/capture/rrweb.d.ts +2 -2
  12. package/build/recorder/capture/rrweb.js +2 -2
  13. package/build/recorder/capture/selector.d.ts +8 -0
  14. package/build/recorder/capture/selector.js +35 -0
  15. package/build/recorder/hud/AnnotateOverlay.d.ts +7 -1
  16. package/build/recorder/hud/AnnotateOverlay.js +51 -17
  17. package/build/recorder/hud/Hud.d.ts +16 -1
  18. package/build/recorder/hud/Hud.js +251 -83
  19. package/build/recorder/hud/LinkSheet.d.ts +3 -3
  20. package/build/recorder/hud/LinkSheet.js +1 -1
  21. package/build/recorder/hud/Menu.d.ts +30 -0
  22. package/build/recorder/hud/Menu.js +73 -0
  23. package/build/recorder/hud/RecorderPill.d.ts +36 -27
  24. package/build/recorder/hud/RecorderPill.js +212 -123
  25. package/build/recorder/hud/Sheet.d.ts +1 -1
  26. package/build/recorder/hud/Sheet.js +1 -1
  27. package/build/recorder/hud/Tooltip.d.ts +19 -0
  28. package/build/recorder/hud/Tooltip.js +94 -0
  29. package/build/recorder/hud/controller.d.ts +148 -0
  30. package/build/recorder/hud/controller.js +17 -0
  31. package/build/recorder/hud/flow.d.ts +54 -0
  32. package/build/recorder/hud/flow.js +39 -0
  33. package/build/recorder/hud/host.js +1 -1
  34. package/build/recorder/hud/icons.d.ts +7 -0
  35. package/build/recorder/hud/icons.js +19 -0
  36. package/build/recorder/hud/iife.d.ts +13 -0
  37. package/build/recorder/hud/iife.js +11 -0
  38. package/build/recorder/hud/layer.d.ts +29 -6
  39. package/build/recorder/hud/layer.js +67 -33
  40. package/build/recorder/hud/mount.d.ts +13 -0
  41. package/build/recorder/hud/mount.js +27 -0
  42. package/build/recorder/hud/place.d.ts +43 -0
  43. package/build/recorder/hud/place.js +63 -0
  44. package/build/recorder/hud/spots.d.ts +45 -0
  45. package/build/recorder/hud/spots.js +107 -0
  46. package/build/recorder/hud/status.d.ts +31 -0
  47. package/build/recorder/hud/status.js +67 -0
  48. package/build/recorder/hud/styles.d.ts +28 -18
  49. package/build/recorder/hud/styles.js +295 -122
  50. package/build/recorder/hud/useDock.d.ts +9 -8
  51. package/build/recorder/hud/useDock.js +41 -20
  52. package/build/recorder/index.d.ts +2 -2
  53. package/build/recorder/index.js +9 -18
  54. package/build/recorder/link.d.ts +1 -1
  55. package/build/recorder/link.js +8 -2
  56. package/build/recorder/me.d.ts +34 -0
  57. package/build/recorder/me.js +172 -0
  58. package/build/recorder/page-controller.d.ts +12 -0
  59. package/build/recorder/page-controller.js +100 -0
  60. package/build/recorder/queue.d.ts +4 -0
  61. package/build/recorder/queue.js +2 -0
  62. package/build/recorder/recents.d.ts +23 -0
  63. package/build/recorder/recents.js +80 -0
  64. package/build/recorder/session.d.ts +2 -2
  65. package/build/recorder/session.js +15 -1
  66. package/build/recorder/storage/index.js +2 -1
  67. package/package.json +9 -3
@@ -2,50 +2,70 @@
2
2
  * The HUD's stylesheet. Lives inside the shadow root (a `<style>` element),
3
3
  * so it never touches host CSS and host CSS never touches it.
4
4
  *
5
- * Shapes (recorder-hud-subtle): the 28px glass PUCK at idle, the dot+timer
6
- * CAPSULE while recording that unfolds into the TRAY on intent, the 6px edge
7
- * TAB when tucked. The `.dock` rests on one of six spots (`data-row` t|b ×
8
- * `data-col` l|c|r) by viewport insets, so an unfolding tray always grows
9
- * toward the centre; a drag moves it by `transform` only. Motion follows
10
- * the transitions.dev token scale.
5
+ * Shapes: ONE glass PILL whose faces are collapsible SEGMENTS — the idle puck
6
+ * (+ ⋯), the recording handle (dot + clock), the tool tray, and the inline
7
+ * flows (confirm · saving · saved · failed). A face change opens one segment
8
+ * while another closes, so the pill's width tweens by itself; an orientation
9
+ * change (the middle row stands the recording pill up) is a measured morph
10
+ * (see useMorph). The 6px edge TAB when tucked. The `.dock` rests on one of
11
+ * eight spots (`data-row` t|m|b × `data-col` l|c|r, no centre) by viewport
12
+ * insets; a drag moves it by `transform` only. Tooltip, menu and details card
13
+ * are fixed floats placed in JS (place.ts) so they never clip.
14
+ *
15
+ * Sizes: `data-size` sm|md|lg on `.hud` rescales every dimension through the
16
+ * size tokens (`--h`, `--b`, `--fs`, … and `--s` for the rest).
17
+ * Motion: the transitions.dev token scale; reduced motion stills it all.
11
18
  */
12
19
  export const HUD_CSS_BASE = `
13
20
  * { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
14
- svg { width:1em; height:1em; vertical-align:-.125em; }
21
+ svg { width:1em; height:1em; vertical-align:-.125em; flex:none; }
15
22
  .hud {
16
- --ink: rgba(26,22,23,.72); --ink-pop: rgba(26,22,23,.88); --ink-solid: #1d1a1b;
17
- --ink-2: rgba(255,255,255,.08); --edge: rgba(255,255,255,.11); --rim: rgba(0,0,0,.30);
23
+ --ink: rgba(26,22,23,.72); --ink-pop: rgba(26,22,23,.9); --ink-solid: #1d1a1b;
24
+ --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);
18
25
  --fg: #f4efea; --fg-2: rgba(244,239,234,.66); --fg-3: rgba(244,239,234,.44);
19
- --rec: #ff3b57; --warn: #f0a63a;
20
- --m: 16px; --h: 28px; --b: 24px;
21
- --duration-quick: 150ms; --duration-fast: 250ms; --duration-resize: 300ms; --duration-medium: 350ms; --duration-snap: 500ms;
22
- --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1); --ease-in-out: ease-in-out; --ease-out: ease-out;
26
+ --rec: #ff3b57; --rec-soft: rgba(255,59,87,.16); --warn: #f0a63a; --ok: #7fd6a4;
27
+ --m: 16px;
28
+ --s: 1; --h: 28px; --b: 24px; --vw: 36px; --fs: 12px; --fs-s: 10.5px; --ic: 13px;
29
+ --duration-micro: 80ms; --duration-quick: 150ms; --duration-fast: 250ms; --duration-resize: 300ms;
30
+ --duration-medium: 350ms; --duration-very-slow: 500ms; --duration-snap: 500ms;
31
+ --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1); --ease-in-out: ease-in-out; --ease-out: ease-out; --ease-linear: linear;
32
+ --ease-bounce: cubic-bezier(0.34, 1.36, 0.64, 1);
23
33
  --ease-spring: var(--ease-smooth-out);
24
- --scale-open: .97; --scale-closing: .99; --blur-small: 2px; --rise: 16px;
25
- color: var(--fg); font-size: 12px;
34
+ --distance-micro: 4px; --scale-medium: .97; --scale-small: .98; --scale-tiny: .99; --blur-small: 2px; --rise: 16px;
35
+ color: var(--fg); font-size: var(--fs);
36
+ user-select:none; -webkit-user-select:none;
26
37
  }
38
+ .hud[data-size="sm"] { --s: .88; --h: 24px; --b: 20px; --vw: 30px; --fs: 11px; --fs-s: 10px; --ic: 12px; }
39
+ .hud[data-size="lg"] { --s: 1.18; --h: 34px; --b: 30px; --vw: 44px; --fs: 13.5px; --fs-s: 11.5px; --ic: 15px; }
27
40
  @supports (transition-timing-function: linear(0, 1)) {
28
41
  /* a damped spring, ~4% overshoot over 500ms — the settle after a throw */
29
42
  .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); }
30
43
  }
31
- @media (pointer: coarse) { .hud { --m: 12px; --h: 32px; --b: 30px; } }
44
+ @media (pointer: coarse) {
45
+ .hud { --m: 12px; }
46
+ .hud[data-size="sm"] { --h: 28px; --b: 26px; --vw: 34px; }
47
+ .hud[data-size="md"] { --h: 32px; --b: 30px; --vw: 40px; }
48
+ .hud[data-size="lg"] { --h: 38px; --b: 34px; --vw: 46px; }
49
+ }
32
50
  /* scoped under .hud so a control's own \`all:unset\` reset cannot wipe the surface */
33
- .hud .glass, .hud .menu, .hud .pop, .hud .detail, .hud .hint {
51
+ .hud .glass, .hud .menu, .hud .pop, .hud .detail, .hud .hint, .hud .tip {
34
52
  background: var(--ink);
35
53
  -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
36
54
  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);
37
55
  color: var(--fg);
38
56
  }
39
- .hud .menu, .hud .pop { background: var(--ink-pop); }
57
+ .hud .menu, .hud .pop, .hud .tip { background: var(--ink-pop); }
40
58
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
41
- .hud .glass, .hud .menu, .hud .pop, .hud .detail, .hud .hint { background: var(--ink-solid); }
59
+ .hud .glass, .hud .menu, .hud .pop, .hud .detail, .hud .hint, .hud .tip { background: var(--ink-solid); }
42
60
  }
43
61
  .sr { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
62
+ textarea, .code { user-select:text; -webkit-user-select:text; }
44
63
 
45
- /* the dock: one of six spots, or tucked into a side edge */
64
+ /* the dock: one of eight spots, or tucked into a side edge */
46
65
  .dock { position:fixed; z-index:4; display:flex; pointer-events:auto; }
47
66
  .dock[data-row="b"] { bottom: calc(var(--m) + env(safe-area-inset-bottom, 0px)); }
48
67
  .dock[data-row="t"] { top: calc(var(--m) + env(safe-area-inset-top, 0px)); }
68
+ .dock[data-row="m"] { top: calc(50% - var(--hh, 28px) / 2); }
49
69
  .dock[data-col="l"] { left: calc(var(--m) + env(safe-area-inset-left, 0px)); }
50
70
  .dock[data-col="r"] { right: calc(var(--m) + env(safe-area-inset-right, 0px)); }
51
71
  .dock[data-col="c"] { left: calc(50% - var(--hw, 36px) / 2); }
@@ -53,20 +73,42 @@ svg { width:1em; height:1em; vertical-align:-.125em; }
53
73
  .dock[data-tuck="left"] { left:0; }
54
74
  .dock[data-tuck="right"] { right:0; }
55
75
  .dock.settling { transition: transform var(--duration-snap) var(--ease-spring); }
76
+ /* a throw carries the compact capsule: the tray folds at once, not on its tween */
77
+ .dock.dragging .seg, .dock.dragging .seg-in { transition:none !important; }
56
78
  .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); }
57
79
 
58
- /* the recording dot: a soft ripple while recording, still otherwise */
80
+ /* the pill and its segments */
81
+ .pill { position:relative; display:inline-flex; align-items:center; height:var(--h); border-radius:999px; }
82
+ .dock[data-col="r"] .pill[data-orient="h"] { flex-direction:row-reverse; }
83
+ .pill[data-orient="v"] { flex-direction:column; height:auto; width:var(--vw); border-radius:calc(var(--vw) / 2); padding:2px 0 4px; }
84
+ .pill.morphing, .pill.morphing * { transition:none !important; }
85
+ .pill.morphing { overflow:hidden; }
86
+ .seg { display:grid; grid-template-columns:0fr; visibility:hidden;
87
+ transition: grid-template-columns var(--duration-resize) var(--ease-smooth-out), visibility 0s linear var(--duration-resize); }
88
+ .seg-in { min-width:0; overflow:hidden; display:flex; align-items:center; padding:5px 0; margin:-5px 0;
89
+ opacity:0; filter:blur(var(--blur-small));
90
+ transition: opacity var(--duration-quick) var(--ease-in-out), filter var(--duration-quick) var(--ease-in-out); }
91
+ .seg.on { grid-template-columns:1fr; visibility:visible;
92
+ transition: grid-template-columns var(--duration-resize) var(--ease-smooth-out), visibility 0s; }
93
+ .seg.on > .seg-in { opacity:1; filter:none; transition-duration: var(--duration-fast); transition-delay: var(--duration-micro); }
94
+ .pill[data-orient="v"] .seg { grid-template-columns:1fr; grid-template-rows:0fr;
95
+ transition: grid-template-rows var(--duration-resize) var(--ease-smooth-out), visibility 0s linear var(--duration-resize); }
96
+ .pill[data-orient="v"] .seg.on { grid-template-rows:1fr; transition: grid-template-rows var(--duration-resize) var(--ease-smooth-out), visibility 0s; }
97
+ .pill[data-orient="v"] .seg-in { flex-direction:column; min-height:0; padding:0 5px; margin:0 -5px; }
98
+
99
+ /* the recording dot: its ripple is a pseudo-element, outside layout */
59
100
  .dot { position:relative; width:8px; height:8px; flex:none; border-radius:50%; background:var(--rec); }
60
- .dot::after { content:""; position:absolute; inset:0; border-radius:50%; box-shadow:0 0 0 0 rgba(255,59,87,.5); animation:ripple 2s var(--ease-out) infinite; }
61
- @keyframes ripple { 0% { box-shadow:0 0 0 0 rgba(255,59,87,.45); } 70%, 100% { box-shadow:0 0 0 7px rgba(255,59,87,0); } }
62
- .bar[data-state="paused"] .dot { background:var(--fg-3); }
63
- .bar[data-state="bad"] .dot { background:var(--warn); }
64
- .bar[data-state="paused"] .dot::after, .bar[data-state="bad"] .dot::after { animation:none; }
101
+ .dot::after { content:""; position:absolute; inset:0; border-radius:50%; background:var(--rec); opacity:0; pointer-events:none;
102
+ animation:ripple 2s var(--ease-out) infinite; }
103
+ @keyframes ripple { 0% { transform:scale(1); opacity:.45; } 70%, 100% { transform:scale(2.75); opacity:0; } }
104
+ .pill[data-state="paused"] .dot { background:var(--fg-3); }
105
+ .pill[data-state="bad"] .dot { background:var(--warn); }
106
+ .pill[data-state="paused"] .dot::after, .pill[data-state="bad"] .dot::after { animation:none; }
65
107
 
66
108
  /* idle: the puck — ring = not linked, dot = ready; the label slides out on intent */
67
109
  .puck { all:unset; box-sizing:border-box; display:inline-flex; align-items:center; height:var(--h); min-width:var(--h);
68
- padding:0 calc((var(--h) - 10px) / 2); border-radius:999px; cursor:pointer; touch-action:none; user-select:none; -webkit-user-select:none;
69
- font-weight:600; font-size:12px; color:var(--fg); }
110
+ padding:0 calc((var(--h) - 10px) / 2); border-radius:999px; cursor:pointer; touch-action:none;
111
+ font-weight:600; font-size:var(--fs); color:var(--fg); }
70
112
  .dock[data-col="r"] .puck { flex-direction:row-reverse; }
71
113
  .ring { width:10px; height:10px; flex:none; border-radius:50%; box-shadow:inset 0 0 0 1.5px var(--fg-2);
72
114
  transition: background-color var(--duration-quick) var(--ease-out), box-shadow var(--duration-quick) var(--ease-out); }
@@ -82,57 +124,111 @@ svg { width:1em; height:1em; vertical-align:-.125em; }
82
124
  .lab > span::after { width:2px; }
83
125
  .dock[data-col="r"] .lab > span::before { width:2px; }
84
126
  .dock[data-col="r"] .lab > span::after { width:8px; }
85
- .puck:focus-visible .lab { grid-template-columns:1fr; opacity:1; }
86
- .puck:focus-visible { outline:2px solid var(--rec); outline-offset:2px; }
127
+ .pill[data-open] .lab, .puck:focus-visible .lab { grid-template-columns:1fr; opacity:1; }
128
+ .puck:focus-visible, .handle:focus-visible { outline:2px solid var(--rec); outline-offset:2px; }
87
129
  @media (hover: hover) {
88
- .puck:hover .lab { grid-template-columns:1fr; opacity:1; }
89
130
  .puck[data-state="ready"]:hover .ring { background:var(--rec); }
90
131
  .puck[data-state="unlinked"]:hover .ring { box-shadow:inset 0 0 0 1.5px var(--fg); }
91
132
  }
92
133
 
93
- /* recording: the capsule (handle) + the tray it unfolds */
94
- .bar { position:relative; display:inline-flex; align-items:center; height:var(--h); border-radius:999px; }
95
- .dock[data-col="r"] .bar, .dock[data-col="r"] .tray-in { flex-direction:row-reverse; }
96
- .handle { all:unset; box-sizing:border-box; display:inline-flex; align-items:center; gap:7px; height:var(--h);
97
- padding:0 11px 0 10px; border-radius:999px; cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none; }
134
+ /* recording: the handle (dot + clock) — symmetric: the dot centres in the pill's round end */
135
+ .handle { all:unset; box-sizing:border-box; display:inline-flex; align-items:center; gap:6px; height:var(--h);
136
+ padding:0 calc((var(--h) - 8px) / 2); border-radius:999px; cursor:grab; touch-action:none; }
98
137
  .dock.dragging .handle { cursor:grabbing; }
99
- .handle:focus-visible { outline:2px solid var(--rec); outline-offset:2px; }
100
- .time { font-weight:600; font-size:12px; line-height:1; font-variant-numeric:tabular-nums; letter-spacing:.01em; min-width:34px; }
101
- .tray { display:grid; grid-template-columns:0fr; transition: grid-template-columns var(--duration-resize) var(--ease-smooth-out); }
102
- .tray-in { min-width:0; overflow:hidden; display:flex; align-items:center; gap:1px; padding:34px 3px; margin:-34px 0;
103
- pointer-events:none; opacity:0; filter:blur(var(--blur-small));
104
- transition: opacity var(--duration-quick) var(--ease-in-out), filter var(--duration-quick) var(--ease-in-out); }
105
- .tray-in > * { pointer-events:auto; }
106
- .bar[data-open] .tray { grid-template-columns:1fr; }
107
- .bar[data-open] .tray-in { opacity:1; filter:none; transition-duration: var(--duration-fast); transition-delay: 60ms; }
108
- .sep { width:1px; height:14px; flex:none; margin:0 5px; background:var(--edge); }
109
- .sync { display:inline-grid; place-items:center; width:18px; flex:none; font-size:11px; color:var(--fg-3); }
110
- .sync.warn, .sync.bad { color:var(--warn); }
138
+ .pill[data-orient="v"] .handle { flex-direction:column; height:auto; width:var(--vw); gap:5px; padding:calc((var(--vw) - 8px) / 2 - 2px) 0 6px; }
139
+ .clock { display:inline-flex; align-items:center; }
140
+ .clock .seg-in { padding:0; margin:0; }
141
+ .time { font-weight:600; font-size:var(--fs); line-height:1; font-variant-numeric:tabular-nums; letter-spacing:.01em; white-space:nowrap; }
142
+ .pill[data-orient="v"] .time { font-size:var(--fs-s); letter-spacing:-.01em; }
143
+ .pill[data-orient="v"] .clock { flex-direction:column; }
144
+ .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; }
145
+ .flash svg { font-size:var(--ic); }
146
+ .pill[data-orient="v"] .flash span { display:none; }
147
+
148
+ /* the tool tray */
149
+ .tools { display:flex; align-items:center; gap:calc(2px * var(--s)); padding-right:3px; }
150
+ .dock[data-col="r"] .pill[data-orient="h"] .tools { flex-direction:row-reverse; padding-right:0; padding-left:3px; }
151
+ .pill[data-orient="v"] .tools { flex-direction:column; padding:0 0 2px; gap:calc(3px * var(--s)); }
152
+ .sep { width:1px; height:14px; flex:none; margin:0 4px 0 0; background:var(--edge); }
153
+ .dock[data-col="r"] .pill[data-orient="h"] .sep { margin:0 0 0 4px; }
154
+ .pill[data-orient="v"] .sep { width:14px; height:1px; margin:2px 0 4px; }
111
155
  button.tb { all:unset; pointer-events:auto; box-sizing:border-box; position:relative; flex:none; display:inline-grid; place-items:center;
112
- width:var(--b); height:var(--b); border-radius:999px; color:var(--fg-2); cursor:pointer; font-size:13px;
156
+ width:var(--b); height:var(--b); border-radius:999px; color:var(--fg-2); cursor:pointer; font-size:var(--ic);
113
157
  transition: background-color var(--duration-quick) var(--ease-out), color var(--duration-quick) var(--ease-out); }
114
158
  button.tb.b-annotate { color:var(--rec); }
115
159
  button.tb.on { background:var(--rec); color:#fff; }
160
+ button.tb.b-stop svg { fill:currentColor; stroke:none; font-size:calc(var(--ic) * .82); }
116
161
  button.tb:focus-visible { outline:2px solid var(--rec); outline-offset:-2px; }
117
- @media (hover: hover) { button.tb:hover { background:var(--ink-2); color:var(--fg); } button.tb.on:hover { background:var(--rec); color:#fff; } }
118
- kbd { position:absolute; left:50%; bottom:calc(100% + 8px); transform:translateX(-50%); padding:4px 6px; border-radius:6px;
119
- background:var(--ink-pop); box-shadow:inset 0 0 0 1px var(--edge); color:var(--fg-2); font:600 10px/1 -apple-system, BlinkMacSystemFont, sans-serif;
120
- letter-spacing:.02em; white-space:nowrap; opacity:0; pointer-events:none; transition:opacity var(--duration-quick) var(--ease-out); }
121
- .dock[data-row="t"] kbd { bottom:auto; top:calc(100% + 8px); }
122
- @media (hover: hover) { button.tb:hover kbd { opacity:1; transition-delay:400ms; } }
123
- button.tb:focus-visible kbd { opacity:1; }
124
- .bar.composing kbd { opacity:0 !important; }
162
+ @media (hover: hover) {
163
+ button.tb:hover { background:var(--ink-2); color:var(--fg); }
164
+ button.tb.on:hover { background:var(--rec); color:#fff; }
165
+ button.tb.b-stop:hover { background:var(--rec-soft); color:var(--rec); }
166
+ }
125
167
 
126
- /* the health line: only when something needs saying */
127
- .detail { position:absolute; width:max-content; max-width:260px; padding:6px 11px; border-radius:999px; color:var(--fg-2); font-size:11px; line-height:1.35;
128
- opacity:0; transform:translateY(4px); pointer-events:none;
129
- transition: opacity var(--duration-fast) var(--ease-smooth-out), transform var(--duration-fast) var(--ease-smooth-out); }
130
- .dock[data-row="b"] .detail { bottom:calc(100% + 6px); }
131
- .dock[data-row="t"] .detail { top:calc(100% + 6px); transform:translateY(-4px); }
132
- .dock[data-col="r"] .detail { right:0; }
133
- .dock[data-col="l"] .detail, .dock[data-col="c"] .detail { left:0; }
134
- .detail.show { opacity:1; transform:none; }
135
- .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); }
168
+ /* the sync chip: legible at a glance — icon + word, colour by state */
169
+ .sync { display:inline-flex; align-items:center; gap:4px; height:var(--b); padding:0 7px 0 5px; margin-right:2px; border-radius:999px;
170
+ font-size:var(--fs-s); font-weight:600; line-height:1; white-space:nowrap; color:var(--fg-3); background:transparent;
171
+ transition: color var(--duration-quick) var(--ease-out), background-color var(--duration-quick) var(--ease-out); }
172
+ .sync svg { font-size:calc(var(--ic) * .95); }
173
+ .sync[data-kind="synced"] svg { color:var(--ok); }
174
+ .sync[data-kind="sending"] { color:var(--fg-2); }
175
+ .sync[data-kind="offline"] { color:var(--warn); background:rgba(240,166,58,.12); }
176
+ .sync[data-kind="error"] { color:var(--rec); background:var(--rec-soft); }
177
+ .sync .swap { display:inline-flex; animation:swap-in var(--duration-quick) var(--ease-in-out) both; }
178
+ .pill[data-orient="v"] .sync { width:var(--b); padding:0; margin:0 0 2px; justify-content:center; }
179
+ .pill[data-orient="v"] .sync .word { display:none; }
180
+ .dock[data-col="r"] .pill[data-orient="h"] .sync { margin:0 0 0 2px; }
181
+ @keyframes swap-in { from { opacity:0; transform:translateY(var(--distance-micro)); filter:blur(var(--blur-small)); } }
182
+ .spin { animation:spin .9s var(--ease-linear) infinite; transform-origin:50% 50%; }
183
+ @keyframes spin { to { transform:rotate(360deg); } }
184
+
185
+ /* inline flows: confirm · saving · saved · failed */
186
+ .flow { display:flex; align-items:center; gap:calc(6px * var(--s)); height:var(--h); padding:0 3px 0 calc(var(--h) * .42);
187
+ white-space:nowrap; font-size:var(--fs); font-weight:600; line-height:1; color:var(--fg); }
188
+ .pill[data-face="flow-rec"] .flow { padding-left:2px; }
189
+ .dock[data-col="r"] .pill[data-face="flow-rec"] .flow { padding-left:calc(var(--h) * .42); padding-right:0; }
190
+ .flow .q { margin-right:calc(4px * var(--s)); }
191
+ .flow .muted { color:var(--fg-3); font-weight:500; }
192
+ .flow svg { font-size:var(--ic); }
193
+ .fb { all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; gap:5px; height:calc(var(--h) - 6px);
194
+ padding:0 calc(10px * var(--s)); border-radius:999px; font-size:calc(var(--fs) - .5px); font-weight:600; line-height:1; color:var(--fg);
195
+ background:var(--ink-2); text-decoration:none;
196
+ transition: background-color var(--duration-quick) var(--ease-out), color var(--duration-quick) var(--ease-out); }
197
+ .fb.primary { background:var(--rec); color:#fff; }
198
+ .fb.icon { width:calc(var(--h) - 6px); padding:0; justify-content:center; background:transparent; color:var(--fg-3); }
199
+ .fb:focus-visible { outline:2px solid var(--rec); outline-offset:1px; }
200
+ @media (hover: hover) {
201
+ .fb:hover { background:var(--ink-3); }
202
+ .fb.primary:hover { background:#ff5670; }
203
+ .fb.icon:hover { color:var(--fg); background:var(--ink-2); }
204
+ }
205
+ .saving { position:relative; padding-right:calc(var(--h) * .42); }
206
+ .saving .spinner { color:var(--fg-2); }
207
+ .saving .spinner circle { stroke-dasharray:44 63; }
208
+ .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; }
209
+ .bar-track > i { position:absolute; inset:0 auto 0 0; width:calc(var(--p, 0) * 100%); border-radius:1px; background:var(--fg-2);
210
+ transition: width var(--duration-fast) var(--ease-smooth-out); }
211
+ .bar-track[data-indeterminate] > i { width:35%; animation:slide 1.1s var(--ease-in-out) infinite; }
212
+ @keyframes slide { from { transform:translateX(-100%); } to { transform:translateX(290%); } }
213
+ .saved .ok { display:inline-flex; color:var(--ok); }
214
+ .failed .warn { display:inline-flex; color:var(--warn); }
215
+ .failed .msg { max-width:calc(220px * var(--s)); overflow:hidden; text-overflow:ellipsis; }
216
+
217
+ /* the success check (transitions.dev 10, tuned to a 13px glyph) */
218
+ .t-check { display:inline-block; transform-origin:center; opacity:0; will-change:transform, opacity, filter; }
219
+ .t-check svg { display:block; overflow:visible; }
220
+ .t-check svg path { stroke-dasharray:18; stroke-dashoffset:18; }
221
+ .t-check[data-state="in"] {
222
+ animation: t-check-fade var(--duration-very-slow) var(--ease-smooth-out) forwards,
223
+ t-check-rotate var(--duration-very-slow) var(--ease-smooth-out) forwards,
224
+ t-check-blur var(--duration-very-slow) var(--ease-smooth-out) forwards,
225
+ t-check-bob var(--duration-very-slow) cubic-bezier(0.34, 1.35, 0.64, 1) forwards; }
226
+ .t-check[data-state="in"] svg path { animation: t-check-draw var(--duration-very-slow) var(--ease-smooth-out) var(--duration-micro) forwards; }
227
+ @keyframes t-check-fade { from { opacity:0; } to { opacity:1; } }
228
+ @keyframes t-check-rotate { from { transform:rotate(80deg); } to { transform:rotate(0deg); } }
229
+ @keyframes t-check-blur { from { filter:blur(8px); } to { filter:blur(0); } }
230
+ @keyframes t-check-bob { from { translate:0 8px; } to { translate:0 0; } }
231
+ @keyframes t-check-draw { to { stroke-dashoffset:0; } }
136
232
 
137
233
  /* the edge tab a tucked HUD becomes */
138
234
  .tab { all:unset; box-sizing:border-box; position:relative; display:block; width:22px; height:56px; cursor:pointer; touch-action:none; }
@@ -150,40 +246,113 @@ button.tb:focus-visible kbd { opacity:1; }
150
246
  .tab:focus-visible::before { width:10px; outline:2px solid var(--rec); outline-offset:1px; }
151
247
  @media (hover: hover) { .tab:hover::before { width:9px; } }
152
248
 
153
- /* the ⋯ menu — grows from the bar toward the viewport centre */
154
- .menu { position:absolute; min-width:188px; padding:5px; border-radius:12px; display:flex; flex-direction:column; gap:1px; z-index:5; }
155
- .dock[data-row="b"] .menu { bottom:calc(100% + 8px); }
156
- .dock[data-row="t"] .menu { top:calc(100% + 8px); }
157
- .dock[data-col="r"] .menu { right:0; }
158
- .dock[data-col="l"] .menu, .dock[data-col="c"] .menu { left:0; }
159
- .menu > button { all:unset; box-sizing:border-box; cursor:pointer; padding:8px 10px; border-radius:7px; color:var(--fg);
160
- font-size:12.5px; line-height:1; display:flex; gap:9px; align-items:center; }
161
- .menu > button svg { color:var(--fg-2); }
162
- .menu > button:focus-visible { outline:2px solid var(--rec); outline-offset:-2px; }
163
- @media (hover: hover) { .menu > button:hover { background:var(--ink-2); } .menu > button.danger:hover, .menu > button.danger:hover svg { color:var(--rec); } }
164
- .moveto { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:6px 6px 6px 10px; margin-top:3px;
165
- border-top:1px solid var(--edge); color:var(--fg-2); font-size:12px; }
166
- .spots { display:grid; grid-template-columns:repeat(3, 24px); grid-template-rows:repeat(2, 24px); gap:0 2px; }
167
- .spots button { all:unset; box-sizing:border-box; position:relative; cursor:pointer; border-radius:5px; }
168
- .spots button::before { content:""; position:absolute; inset:7px 5px; border-radius:3px; background:var(--ink-2); box-shadow:inset 0 0 0 1px var(--edge); }
169
- .spots button[aria-checked="true"]::before { background:var(--rec); box-shadow:none; }
170
- .spots button:focus-visible { outline:2px solid var(--rec); outline-offset:-2px; }
171
- @media (hover: hover) { .spots button:hover::before { background:var(--fg-3); } .spots button[aria-checked="true"]:hover::before { background:var(--rec); } }
249
+ /* floats: fixed, placed in JS beside the dock (place.ts) */
250
+ .float { position:fixed; left:0; top:0; z-index:5; pointer-events:auto; }
251
+
252
+ /* the tooltip (transitions.dev 17): one bubble that travels between triggers */
253
+ .tip { display:inline-flex; align-items:center; gap:7px; padding:calc(5px * var(--s)) calc(8px * var(--s)); border-radius:7px; white-space:nowrap;
254
+ font-size:calc(var(--fs) - 1px); font-weight:600; line-height:1; color:var(--fg); pointer-events:none;
255
+ opacity:0; scale:var(--scale-small); z-index:7;
256
+ transition: opacity 50ms var(--ease-out), scale 50ms var(--ease-out), translate 160ms var(--ease-smooth-out); }
257
+ .tip[data-show="true"] { opacity:1; scale:1;
258
+ transition: opacity var(--duration-quick) var(--ease-out) var(--duration-micro), scale var(--duration-quick) var(--ease-out) var(--duration-micro),
259
+ translate 160ms var(--ease-smooth-out); }
260
+ .tip.snap { transition:none !important; }
261
+ .tip kbd { font:600 calc(var(--fs-s) - .5px)/1 ui-monospace, "SF Mono", Menlo, monospace; color:var(--fg-3); letter-spacing:.02em; }
262
+
263
+ /* the ⋯ menu */
264
+ .menu { width:calc(252px * var(--s)); max-height:calc(100vh - 16px); overflow:auto; overscroll-behavior:contain; scrollbar-width:thin;
265
+ padding:calc(5px * var(--s)); border-radius:calc(13px * var(--s)); display:flex; flex-direction:column; gap:1px; font-size:var(--fs); }
266
+ .m-head { display:flex; flex-direction:column; gap:3px; padding:calc(8px * var(--s)) calc(10px * var(--s)) calc(9px * var(--s)); }
267
+ .m-who { display:flex; align-items:baseline; gap:5px; min-width:0; font-weight:600; color:var(--fg); line-height:1.2; }
268
+ .m-who .email { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
269
+ .m-who .ws { flex:none; color:var(--fg-2); font-weight:500; }
270
+ .m-who.wraps .email { white-space:normal; overflow-wrap:anywhere; }
271
+ .m-sub { font-size:var(--fs-s); color:var(--fg-3); line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
272
+ .m-sub .live { color:var(--ok); }
273
+ .m-rule { height:1px; margin:3px 4px; background:var(--edge); flex:none; }
274
+ .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); }
275
+ .mi { all:unset; box-sizing:border-box; cursor:pointer; display:flex; align-items:center; gap:9px; min-height:calc(30px * var(--s));
276
+ padding:calc(7px * var(--s)) calc(10px * var(--s)); border-radius:8px; color:var(--fg); line-height:1.2; text-decoration:none;
277
+ transition: background-color var(--duration-quick) var(--ease-out), color var(--duration-quick) var(--ease-out); }
278
+ .mi > svg { color:var(--fg-2); font-size:var(--ic); }
279
+ .mi .end { margin-left:auto; color:var(--fg-3); font-size:var(--ic); }
280
+ .mi:focus-visible { outline:2px solid var(--rec); outline-offset:-2px; }
281
+ .mi.danger { color:var(--fg-2); }
282
+ @media (hover: hover) {
283
+ .mi:hover { background:var(--ink-2); }
284
+ .mi.danger:hover, .mi.danger:hover svg { color:var(--rec); }
285
+ }
286
+ .recent { align-items:flex-start; }
287
+ .recent .r-main { display:flex; flex-direction:column; gap:3px; min-width:0; flex:1; }
288
+ .recent .r-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
289
+ .recent .r-meta { display:flex; align-items:center; gap:5px; font-size:var(--fs-s); color:var(--fg-3); white-space:nowrap; }
290
+ .recent .r-meta i { width:5px; height:5px; border-radius:50%; flex:none; background:var(--fg-3); }
291
+ .recent .r-meta i[data-status="saved"] { background:var(--ok); }
292
+ .recent .r-meta i[data-status="recording"] { background:var(--rec); }
293
+ .recent .r-meta i[data-status="unsaved"] { background:var(--warn); }
294
+ .recent[aria-disabled="true"] { cursor:default; }
295
+ .recent .end { margin-top:1px; }
296
+ .m-empty { padding:4px 10px 8px; font-size:var(--fs-s); color:var(--fg-3); }
297
+ .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); }
298
+ .m-row > span:first-child { color:var(--fg); }
299
+ .m-row.toggle { cursor:pointer; border-radius:8px; }
300
+ @media (hover: hover) { .m-row.toggle:hover { background:var(--ink-2); } }
301
+ .m-row.toggle:focus-visible { outline:2px solid var(--rec); outline-offset:-2px; }
302
+ .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); }
303
+
304
+ /* size: a segmented control with a sliding pill (transitions.dev 16) */
305
+ .sizes { position:relative; display:inline-grid; grid-template-columns:repeat(3, calc(30px * var(--s))); padding:2px; border-radius:999px;
306
+ background:rgba(0,0,0,.28); box-shadow:inset 0 0 0 1px var(--edge); --i:1; }
307
+ .sizes::before { content:""; position:absolute; top:2px; bottom:2px; left:2px; width:calc(30px * var(--s)); border-radius:999px; background:var(--ink-3);
308
+ transform:translateX(calc(var(--i) * 100%)); transition: transform var(--duration-fast) var(--ease-smooth-out); }
309
+ .sizes button { all:unset; box-sizing:border-box; position:relative; z-index:1; cursor:pointer; display:grid; place-items:center;
310
+ height:calc(22px * var(--s)); border-radius:999px; font-size:var(--fs-s); font-weight:700; color:var(--fg-3);
311
+ transition: color var(--duration-fast) var(--ease-smooth-out); }
312
+ .sizes button[aria-checked="true"] { color:var(--fg); }
313
+ .sizes button:focus-visible { outline:2px solid var(--rec); outline-offset:-1px; }
314
+ @media (hover: hover) { .sizes button:hover { color:var(--fg-2); } .sizes button[aria-checked="true"]:hover { color:var(--fg); } }
315
+
316
+ /* verbose: a switch (transitions.dev 27, travel only) */
317
+ .switch { position:relative; width:calc(30px * var(--s)); height:calc(18px * var(--s)); flex:none; border-radius:999px; background:var(--ink-3);
318
+ transition: background-color var(--duration-fast) var(--ease-smooth-out); }
319
+ .switch::after { content:""; position:absolute; top:2px; left:2px; width:calc(14px * var(--s)); height:calc(14px * var(--s)); border-radius:50%;
320
+ background:var(--fg-2); box-shadow:0 1px 3px rgba(0,0,0,.35);
321
+ transition: translate var(--duration-fast) var(--ease-bounce), background-color var(--duration-fast) var(--ease-smooth-out); }
322
+ .switch[data-on="true"] { background:var(--rec); }
323
+ .switch[data-on="true"]::after { translate:calc(12px * var(--s)) 0; background:#fff; }
324
+
325
+ /* Move to: a miniature screen, eight spots (no centre); middle-row marks stand up like the pill does */
326
+ .screen { position:relative; display:grid; grid-template-columns:repeat(3, calc(22px * var(--s))); grid-template-rows:repeat(3, calc(15px * var(--s)));
327
+ padding:calc(3px * var(--s)); border-radius:7px; box-shadow:inset 0 0 0 1px var(--edge); background:rgba(0,0,0,.22); }
328
+ .screen button { all:unset; box-sizing:border-box; position:relative; cursor:pointer; border-radius:4px; display:grid; place-items:center; }
329
+ .screen button::before { content:""; width:calc(11px * var(--s)); height:calc(4px * var(--s)); border-radius:2px; background:var(--fg-3); opacity:.55;
330
+ transition: background-color var(--duration-quick) var(--ease-out), opacity var(--duration-quick) var(--ease-out), transform var(--duration-quick) var(--ease-out); }
331
+ .screen button[data-v]::before { width:calc(4px * var(--s)); height:calc(10px * var(--s)); }
332
+ .screen button[aria-checked="true"]::before { background:var(--rec); opacity:1; }
333
+ .screen button:focus-visible { outline:2px solid var(--rec); outline-offset:-1px; }
334
+ .screen .mid { grid-column:2; grid-row:2; }
335
+ @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); } }
336
+
337
+ /* the details card: the health line when something is wrong, the technical details in verbose mode */
338
+ .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));
339
+ color:var(--fg-2); font-size:calc(var(--fs) - 1px); line-height:1.4; pointer-events:none; }
340
+ .detail.line { border-radius:999px; }
341
+ /* the tooltip and the card open on the same side: the card steps back while a tooltip speaks */
342
+ .hud .tip[data-show="true"] ~ .detail.is-open { opacity:0; transition: opacity var(--duration-quick) var(--ease-out); }
343
+ .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); }
344
+ .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; }
345
+ .detail dt { color:var(--fg-3); }
346
+ .detail dd { margin:0; color:var(--fg); font-variant-numeric:tabular-nums; }
347
+ .detail .warnline { margin-top:5px; color:var(--warn); font-size:var(--fs-s); }
172
348
 
173
349
  /* presence: dropdown-style grow from the anchor on open, a softer shrink on close */
174
- .grow { transform:scale(var(--scale-open)); opacity:0;
350
+ .grow { transform:scale(var(--scale-medium)); opacity:0;
175
351
  transition: transform var(--duration-fast) var(--ease-smooth-out), opacity var(--duration-fast) var(--ease-smooth-out); }
176
- .grow[data-origin="bottom-right"] { transform-origin:bottom right; }
177
- .grow[data-origin="bottom-left"] { transform-origin:bottom left; }
178
- .grow[data-origin="bottom-center"] { transform-origin:bottom center; }
179
- .grow[data-origin="top-right"] { transform-origin:top right; }
180
- .grow[data-origin="top-left"] { transform-origin:top left; }
181
- .grow[data-origin="top-center"] { transform-origin:top center; }
182
352
  .grow.is-open { transform:scale(1); opacity:1; }
183
- .grow.is-closing { transform:scale(var(--scale-closing)); opacity:0; pointer-events:none;
184
- transition-duration: var(--duration-quick); }
353
+ .grow.is-closing { transform:scale(var(--scale-tiny)); opacity:0; pointer-events:none; transition-duration: var(--duration-quick); }
185
354
  /* phone: the sheet rises from the bottom edge (toast motion) */
186
- .rise { transform:translateY(var(--rise)) scale(var(--scale-open)); opacity:0; filter:blur(var(--blur-small));
355
+ .rise { transform:translateY(var(--rise)) scale(var(--scale-medium)); opacity:0; filter:blur(var(--blur-small));
187
356
  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); }
188
357
  .rise.is-open { transform:none; opacity:1; filter:none; transition-duration: var(--duration-medium); }
189
358
  .rise.is-closing { pointer-events:none; }
@@ -192,8 +361,8 @@ button.tb:focus-visible kbd { opacity:1; }
192
361
  .dim { position:fixed; inset:0; z-index:1; pointer-events:none; background:rgba(0,0,0,.18); }
193
362
  .outline { position:fixed; z-index:2; pointer-events:none; border:2px solid var(--rec); border-radius:6px;
194
363
  box-shadow:0 0 0 4px rgba(255,59,87,.15); }
195
- .hint { position:fixed; top:14px; left:50%; transform:translateX(-50%); z-index:3; padding:8px 14px;
196
- border-radius:999px; font-size:12px; font-weight:600; line-height:1; white-space:nowrap; display:flex; gap:8px; align-items:center; }
364
+ .hint { position:fixed; top:14px; left:50%; transform:translateX(-50%); z-index:3; padding:calc(8px * var(--s)) calc(14px * var(--s));
365
+ border-radius:999px; font-size:var(--fs); font-weight:600; line-height:1; white-space:nowrap; display:flex; gap:8px; align-items:center; }
197
366
  .hint svg { color:var(--rec); }
198
367
  .hint .keys { color:var(--fg-3); font-weight:500; margin-left:-4px; }
199
368
  @media (pointer: coarse) { .hint .keys { display:none; } }
@@ -205,40 +374,41 @@ button.tb:focus-visible kbd { opacity:1; }
205
374
  .phone { position:fixed; z-index:6; display:flex; flex-direction:column; justify-content:flex-end;
206
375
  padding:0 8px calc(8px + env(safe-area-inset-bottom, 0px)); pointer-events:none; }
207
376
  .phone > * { pointer-events:auto; }
208
- .pop { width:min(288px, calc(100vw - 24px)); padding:12px; border-radius:14px; }
377
+ .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); }
209
378
  .phone .pop { width:100%; border-radius:18px; padding:14px; }
210
379
  .pop-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
211
- .title { display:flex; align-items:center; gap:7px; font-size:12.5px; font-weight:600; color:var(--fg); }
380
+ .title { display:flex; align-items:center; gap:7px; font-size:calc(var(--fs) + .5px); font-weight:600; color:var(--fg); }
212
381
  .title i { width:3px; height:11px; border-radius:1px; background:var(--rec); }
213
382
  .closeb { all:unset; box-sizing:border-box; cursor:pointer; width:24px; height:24px; border-radius:7px; color:var(--fg-3);
214
383
  display:inline-grid; place-items:center; font-size:12px; }
215
384
  .closeb:focus-visible, .sendb:focus-visible, .retry:focus-visible, .dest button:focus-visible { outline:2px solid var(--rec); outline-offset:2px; }
216
385
  @media (hover: hover) { .closeb:hover { color:var(--fg); background:var(--ink-2); } }
217
- textarea { width:100%; margin-top:10px; padding:9px 11px; min-height:64px; resize:vertical; background:rgba(0,0,0,.28);
386
+ textarea { width:100%; margin-top:10px; padding:9px 11px; min-height:calc(64px * var(--s)); resize:vertical; background:rgba(0,0,0,.28);
218
387
  border:0; box-shadow:inset 0 0 0 1px var(--edge); border-radius:9px; color:var(--fg);
219
- font:400 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
388
+ font:400 calc(14px * var(--s))/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
220
389
  @media (pointer: coarse) { textarea { font-size:16px; } .hints { display:none; } }
221
390
  textarea::placeholder { color:var(--fg-3); }
222
391
  textarea:focus { outline:none; box-shadow:inset 0 0 0 1px var(--fg-3); }
223
392
  .row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; margin-top:10px; }
224
393
  .row.nodest { grid-template-columns:minmax(0,1fr) auto; }
225
- .ctx { font-size:11px; line-height:1.35; color:var(--fg-3); text-align:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
394
+ .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; }
226
395
  .row.nodest .ctx { text-align:left; }
227
396
  .dest { display:inline-flex; padding:2px; border-radius:8px; background:rgba(0,0,0,.28); box-shadow:inset 0 0 0 1px var(--edge); }
228
397
  .dest button { all:unset; box-sizing:border-box; cursor:pointer; padding:5px 8px; min-height:24px; border-radius:6px; color:var(--fg-3);
229
- font-size:11.5px; font-weight:600; line-height:14px; transition: background-color var(--duration-quick) var(--ease-out), color var(--duration-quick) var(--ease-out); }
398
+ 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); }
230
399
  .dest button[aria-pressed="true"] { background:var(--ink-2); color:var(--fg); }
231
- .sendb { all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 12px;
232
- border-radius:8px; background:var(--rec); color:#fff; font-size:12.5px; font-weight:600; line-height:1; text-decoration:none; }
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
+ border-radius:8px; background:var(--rec); color:#fff; font-size:calc(var(--fs) + .5px); font-weight:600; line-height:1; text-decoration:none; }
233
402
  @media (hover: hover) { .sendb:hover { background:#ff5670; } }
234
- .hints { margin-top:9px; font-size:11px; line-height:1; color:var(--fg-3); }
403
+ .hints { margin-top:9px; font-size:var(--fs-s); line-height:1; color:var(--fg-3); }
235
404
  `;
236
405
  /**
237
406
  * Inline style of the HUD host: a 0×0 fixed box at the viewport origin (the
238
407
  * dock and sheets are fixed children of its shadow root). Zero-size keeps
239
- * rrweb's placeholder for this blocked node empty in every replay, and
240
- * `pointer-events:none` lets the page under the HUD's gaps take every
241
- * click. Overrides the [popover] UA sheet.
408
+ * rrweb's placeholder for this blocked node empty in every replay — rrweb 2
409
+ * has no "omit entirely" mode, a blocked node always leaves a sized
410
+ * placeholder — and `pointer-events:none` lets the page under the HUD's gaps
411
+ * take every click. Overrides the [popover] UA sheet.
242
412
  */
243
413
  export const HOST_STYLE = 'all:initial;position:fixed;z-index:2147483647;inset:0 auto auto 0;margin:0;padding:0;border:0;' +
244
414
  'background:transparent;overflow:visible;width:0;height:0;pointer-events:none;color-scheme:normal;';
@@ -246,33 +416,36 @@ export const HOST_STYLE = 'all:initial;position:fixed;z-index:2147483647;inset:0
246
416
  export const SHEET_HOST_STYLE = HOST_STYLE;
247
417
  /**
248
418
  * The PAGE (light-DOM) sheet while annotate mode owns the pointer — one
249
- * <style> in the page head, removed on exit. `touch-action:none` on every
250
- * element, not just the root: Chromium re-enables panning inside each inner
251
- * scroller, and it keeps a finger's drag a marquee even where a touchstart
252
- * cannot be cancelled (a tap that stops a fling). The rest (callout,
253
- * selection, tap flash) only matters to a finger, so a mouse-only desktop
254
- * renders exactly as before.
419
+ * <style> in the page head, removed on exit (it carries the rrweb block
420
+ * attribute, so the replay never sees it). The crosshair and no text
421
+ * selection apply to every pointer: a mouse drag over text must draw the
422
+ * marquee, never select the page. `touch-action:none` on every element, not
423
+ * just the root: Chromium re-enables panning inside each inner scroller, and
424
+ * it keeps a finger's drag a marquee even where a touchstart cannot be
425
+ * cancelled (a tap that stops a fling). The callout and tap flash only
426
+ * matter to a finger.
255
427
  */
256
- export const ANNOTATE_PAGE_CSS = '*{touch-action:none!important}' +
257
- '@media (any-pointer:coarse){*{-webkit-touch-callout:none!important;-webkit-user-select:none!important;' +
258
- 'user-select:none!important;-webkit-tap-highlight-color:transparent!important}}';
428
+ export const ANNOTATE_PAGE_CSS = '*{touch-action:none!important;cursor:crosshair!important;-webkit-user-select:none!important;user-select:none!important}' +
429
+ '@media (any-pointer:coarse){*{-webkit-touch-callout:none!important;-webkit-tap-highlight-color:transparent!important}}';
259
430
  /** Link-sheet additions (appended to HUD_CSS). */
260
431
  export const LINK_CSS = `
261
432
  .linkgrid { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; align-items:center; margin-top:10px; }
262
433
  .linkgrid.noqr { grid-template-columns:minmax(0,1fr); }
263
- .code { font-size:22px; font-weight:700; line-height:1.2; letter-spacing:.08em; font-variant-numeric:tabular-nums; color:var(--fg); }
434
+ .code { font-size:calc(22px * var(--s)); font-weight:700; line-height:1.2; letter-spacing:.08em; font-variant-numeric:tabular-nums; color:var(--fg); }
264
435
  .linkgrid .sendb { justify-self:start; margin-top:6px; }
265
436
  .qr { grid-column:2; grid-row:1 / span 3; width:76px; height:76px; border-radius:8px; background:#fff; padding:4px; }
266
- .linkline { margin-top:8px; font-size:11px; line-height:1.4; color:var(--fg-2); display:flex; gap:10px; align-items:center; }
437
+ .linkline { margin-top:8px; font-size:var(--fs-s); line-height:1.4; color:var(--fg-2); display:flex; gap:10px; align-items:center; }
267
438
  .linkline.bad { color:var(--warn); }
268
439
  .retry { all:unset; box-sizing:border-box; cursor:pointer; min-height:24px; padding:4px 9px; border-radius:7px; box-shadow:inset 0 0 0 1px var(--edge);
269
- color:var(--fg); font-size:11.5px; font-weight:600; line-height:1; }
440
+ color:var(--fg); font-size:calc(var(--fs) - .5px); font-weight:600; line-height:1; }
270
441
  @media (hover: hover) { .retry:hover { background:var(--ink-2); } }
271
442
  `;
272
443
  /** Reduced motion: no ripple, no springs, no slides — every state change is instant. */
273
444
  export const MOTION_CSS = `
274
445
  @media (prefers-reduced-motion: reduce) {
275
446
  .hud *, .hud *::before, .hud *::after { transition-duration:0ms !important; transition-delay:0ms !important; animation:none !important; }
447
+ .t-check { opacity:1; }
448
+ .t-check svg path { stroke-dashoffset:0; }
276
449
  }
277
450
  `;
278
451
  export const HUD_CSS = HUD_CSS_BASE + LINK_CSS + MOTION_CSS;
@@ -1,15 +1,16 @@
1
1
  /**
2
2
  * Where the HUD rests and how it moves (recorder-hud-subtle D2). The dock
3
- * sits on one of six spots by CSS insets (see `.dock` in styles.ts), so a
3
+ * sits on one of eight spots by CSS insets (see `.dock` in styles.ts), so a
4
4
  * resize or rotation needs no JS; a drag moves it by `transform` only and a
5
- * release settles through `@vitrinka/link/dock` — a flick lands where it is
6
- * aimed, a push past a side edge tucks it into a tab. The move to the new
7
- * spot is a FLIP: the dock re-anchors, then springs from where it was let
8
- * go. Arrow keys on a focused handle are the non-drag alternative.
9
- * The place is remembered per origin in the recorder's storage.
5
+ * release settles through `./spots` — a flick lands where it is aimed, a
6
+ * push past a side edge tucks it into a tab. The move to the new spot is a
7
+ * FLIP: the dock re-anchors, then springs from where it was let go. Arrow
8
+ * keys on a focused handle are the non-drag alternative. The place is
9
+ * remembered per origin in the HUD's storage.
10
10
  */
11
- import { type Place, type Spot } from '@vitrinka/link/dock';
12
11
  import { type KeyboardEvent, type MouseEvent, type PointerEvent, type RefObject } from 'react';
12
+ import type { RecorderStorage } from '../storage';
13
+ import { type Place, type Spot } from './spots';
13
14
  export interface DockHandle {
14
15
  onPointerDown: (e: PointerEvent<HTMLElement>) => void;
15
16
  onPointerMove: (e: PointerEvent<HTMLElement>) => void;
@@ -29,4 +30,4 @@ export interface Dock {
29
30
  onClickCapture: (e: MouseEvent) => void;
30
31
  moveTo: (next: Place) => void;
31
32
  }
32
- export declare function useDock(onMoveStart: () => void): Dock;
33
+ export declare function useDock(onMoveStart: () => void, storage: RecorderStorage): Dock;