@vitrinka/web 0.1.5 → 0.2.1
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 +63 -0
- package/README.md +73 -21
- package/build/hud.d.ts +9 -0
- package/build/hud.iife.js +411 -0
- package/build/hud.js +8 -0
- package/build/recorder/api.d.ts +2 -0
- package/build/recorder/block.d.ts +7 -0
- package/build/recorder/block.js +7 -0
- package/build/recorder/capture/click.d.ts +2 -4
- package/build/recorder/capture/click.js +2 -31
- package/build/recorder/capture/rrweb.d.ts +2 -2
- package/build/recorder/capture/rrweb.js +2 -2
- package/build/recorder/capture/selector.d.ts +8 -0
- package/build/recorder/capture/selector.js +35 -0
- package/build/recorder/hud/AnnotateOverlay.d.ts +7 -1
- package/build/recorder/hud/AnnotateOverlay.js +58 -28
- package/build/recorder/hud/Hud.d.ts +16 -1
- package/build/recorder/hud/Hud.js +255 -87
- package/build/recorder/hud/LinkSheet.d.ts +3 -3
- package/build/recorder/hud/LinkSheet.js +1 -1
- package/build/recorder/hud/Menu.d.ts +30 -0
- package/build/recorder/hud/Menu.js +73 -0
- package/build/recorder/hud/RecorderPill.d.ts +36 -27
- package/build/recorder/hud/RecorderPill.js +212 -123
- package/build/recorder/hud/Sheet.d.ts +1 -1
- package/build/recorder/hud/Sheet.js +1 -1
- package/build/recorder/hud/Tooltip.d.ts +19 -0
- package/build/recorder/hud/Tooltip.js +94 -0
- package/build/recorder/hud/controller.d.ts +148 -0
- package/build/recorder/hud/controller.js +17 -0
- package/build/recorder/hud/flow.d.ts +54 -0
- package/build/recorder/hud/flow.js +39 -0
- package/build/recorder/hud/host.js +1 -1
- package/build/recorder/hud/icons.d.ts +7 -0
- package/build/recorder/hud/icons.js +19 -0
- package/build/recorder/hud/iife.d.ts +13 -0
- package/build/recorder/hud/iife.js +11 -0
- package/build/recorder/hud/layer.d.ts +29 -6
- package/build/recorder/hud/layer.js +67 -33
- package/build/recorder/hud/listen.d.ts +24 -0
- package/build/recorder/hud/listen.js +27 -0
- package/build/recorder/hud/mount.d.ts +13 -0
- package/build/recorder/hud/mount.js +27 -0
- package/build/recorder/hud/place.d.ts +43 -0
- package/build/recorder/hud/place.js +63 -0
- package/build/recorder/hud/spots.d.ts +45 -0
- package/build/recorder/hud/spots.js +107 -0
- package/build/recorder/hud/status.d.ts +31 -0
- package/build/recorder/hud/status.js +67 -0
- package/build/recorder/hud/styles.d.ts +28 -18
- package/build/recorder/hud/styles.js +295 -122
- package/build/recorder/hud/useDock.d.ts +9 -8
- package/build/recorder/hud/useDock.js +43 -22
- package/build/recorder/index.d.ts +2 -2
- package/build/recorder/index.js +9 -18
- package/build/recorder/link.d.ts +1 -1
- package/build/recorder/link.js +9 -3
- package/build/recorder/me.d.ts +34 -0
- package/build/recorder/me.js +172 -0
- package/build/recorder/page-controller.d.ts +12 -0
- package/build/recorder/page-controller.js +100 -0
- package/build/recorder/queue.d.ts +4 -0
- package/build/recorder/queue.js +2 -0
- package/build/recorder/recents.d.ts +23 -0
- package/build/recorder/recents.js +80 -0
- package/build/recorder/session.d.ts +2 -2
- package/build/recorder/session.js +15 -1
- package/build/recorder/storage/index.js +2 -1
- package/package.json +10 -4
|
@@ -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
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
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,.
|
|
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;
|
|
21
|
-
--
|
|
22
|
-
--
|
|
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-
|
|
25
|
-
color: var(--fg); font-size:
|
|
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) {
|
|
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
|
|
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
|
|
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%;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
.
|
|
64
|
-
.
|
|
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;
|
|
69
|
-
font-weight:600; font-size:
|
|
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
|
|
94
|
-
.
|
|
95
|
-
|
|
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
|
-
.
|
|
100
|
-
.
|
|
101
|
-
.
|
|
102
|
-
.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
.
|
|
106
|
-
.
|
|
107
|
-
.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
.
|
|
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:
|
|
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) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
|
127
|
-
.
|
|
128
|
-
|
|
129
|
-
transition:
|
|
130
|
-
.
|
|
131
|
-
.
|
|
132
|
-
.
|
|
133
|
-
.
|
|
134
|
-
.
|
|
135
|
-
.
|
|
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
|
-
/*
|
|
154
|
-
.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
.
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
.
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
.
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
.
|
|
169
|
-
|
|
170
|
-
.
|
|
171
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
240
|
-
*
|
|
241
|
-
*
|
|
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
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
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-
|
|
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:
|
|
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:
|
|
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
|
|
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
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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;
|