()
| 442 | |
| 443 | // Close tutorial |
| 444 | export function closeTutorial() { |
| 445 | CarrotDebug.ui('Closing tutorial'); |
| 446 | |
| 447 | // Remove highlight |
| 448 | document.querySelectorAll('.carrot-tutorial-highlight').forEach(el => { |
| 449 | el.classList.remove('carrot-tutorial-highlight'); |
| 450 | }); |
| 451 | |
| 452 | // Remove overlay |
| 453 | const overlay = document.getElementById('carrot-tutorial-overlay'); |
| 454 | if (overlay) { |
| 455 | overlay.remove(); |
| 456 | } |
| 457 | |
| 458 | // Remove resize handler |
| 459 | if (resizeHandler) { |
| 460 | window.removeEventListener('resize', resizeHandler); |
| 461 | resizeHandler = null; |
| 462 | } |
| 463 | |
| 464 | // Reset state |
| 465 | currentTutorial = null; |
| 466 | currentStep = 0; |
| 467 | tutorialSteps = []; |
| 468 | } |
| 469 | |
| 470 | // Export navigation functions to window for onclick handlers |
| 471 | if (typeof window !== 'undefined') { |
no test coverage detected