()
| 240 | } |
| 241 | |
| 242 | function disablePickMode(): void { |
| 243 | if (!pickModeActive) return; |
| 244 | pickModeActive = false; |
| 245 | if (pickModeHighlightEl) { |
| 246 | pickModeHighlightEl.classList.remove("__hf-pick-highlight"); |
| 247 | pickModeHighlightEl = null; |
| 248 | } |
| 249 | if (pickModeStyleEl) { |
| 250 | pickModeStyleEl.remove(); |
| 251 | pickModeStyleEl = null; |
| 252 | } |
| 253 | document.body.classList.remove("__hf-pick-active"); |
| 254 | document.removeEventListener("mousemove", onPickMouseMove, true); |
| 255 | document.removeEventListener("click", onPickClick, true); |
| 256 | document.removeEventListener("keydown", onPickKeyDown, true); |
| 257 | emitPickerRuntimeEvent("hyperframe:picker:mode", { isPickMode: false, timestamp: Date.now() }); |
| 258 | } |
| 259 | |
| 260 | function installPickerApi(): void { |
| 261 | window.__HF_PICKER_API = { |
no test coverage detected