()
| 224 | } |
| 225 | |
| 226 | function enablePickMode(): void { |
| 227 | if (pickModeActive) return; |
| 228 | pickModeActive = true; |
| 229 | pickModeStyleEl = document.createElement("style"); |
| 230 | pickModeStyleEl.textContent = [ |
| 231 | ".__hf-pick-highlight { outline: 2px solid #4f8cf7 !important; outline-offset: 2px; cursor: crosshair !important; }", |
| 232 | ".__hf-pick-active * { cursor: crosshair !important; }", |
| 233 | ].join("\n"); |
| 234 | document.head.appendChild(pickModeStyleEl); |
| 235 | document.body.classList.add("__hf-pick-active"); |
| 236 | document.addEventListener("mousemove", onPickMouseMove, true); |
| 237 | document.addEventListener("click", onPickClick, true); |
| 238 | document.addEventListener("keydown", onPickKeyDown, true); |
| 239 | emitPickerRuntimeEvent("hyperframe:picker:mode", { isPickMode: true, timestamp: Date.now() }); |
| 240 | } |
| 241 | |
| 242 | function disablePickMode(): void { |
| 243 | if (!pickModeActive) return; |
nothing calls this directly
no test coverage detected