@impakers/debug 1.3.13 → 1.4.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/dist/react.js CHANGED
@@ -2400,13 +2400,11 @@ function CommentThread({
2400
2400
  },
2401
2401
  [handleClose, handleSend]
2402
2402
  );
2403
- const handleCameraClick = (0, import_react3.useCallback)(() => {
2403
+ const startDomCapture = (0, import_react3.useCallback)(() => {
2404
2404
  setCapturingDom(true);
2405
- const threadEl = document.querySelector(`.${styles_module_default3.thread}`);
2406
- if (threadEl) threadEl.style.visibility = "hidden";
2407
- document.documentElement.style.cursor = "crosshair";
2408
- const allEls = document.querySelectorAll("*");
2409
- allEls.forEach((el) => el.style.cursor = "crosshair");
2405
+ const debugEls = document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");
2406
+ debugEls.forEach((el) => el.style.visibility = "hidden");
2407
+ document.documentElement.classList.add("impakers-selecting");
2410
2408
  let hoverBox = null;
2411
2409
  const showHover = (rect) => {
2412
2410
  if (!hoverBox) {
@@ -2419,25 +2417,32 @@ function CommentThread({
2419
2417
  hoverBox.style.width = `${rect.width}px`;
2420
2418
  hoverBox.style.height = `${rect.height}px`;
2421
2419
  };
2420
+ const cleanup = () => {
2421
+ document.removeEventListener("mousemove", handleMove);
2422
+ document.removeEventListener("click", handleClick, true);
2423
+ document.removeEventListener("keydown", handleEsc);
2424
+ document.documentElement.classList.remove("impakers-selecting");
2425
+ hoverBox?.remove();
2426
+ debugEls.forEach((el) => el.style.visibility = "");
2427
+ setCapturingDom(false);
2428
+ };
2422
2429
  const handleMove = (e) => {
2423
2430
  const el = document.elementFromPoint(e.clientX, e.clientY);
2424
2431
  if (!el || el === hoverBox) return;
2425
2432
  showHover(el.getBoundingClientRect());
2426
2433
  };
2434
+ const handleEsc = (e) => {
2435
+ if (e.key === "Escape") {
2436
+ cleanup();
2437
+ }
2438
+ };
2427
2439
  const handleClick = async (e) => {
2428
2440
  e.preventDefault();
2429
2441
  e.stopPropagation();
2430
- document.removeEventListener("mousemove", handleMove);
2431
- document.removeEventListener("click", handleClick, true);
2432
- document.documentElement.style.cursor = "";
2433
- allEls.forEach((el) => el.style.cursor = "");
2434
- hoverBox?.remove();
2442
+ e.stopImmediatePropagation();
2435
2443
  const targetEl = document.elementFromPoint(e.clientX, e.clientY);
2436
- if (!targetEl) {
2437
- if (threadEl) threadEl.style.visibility = "";
2438
- setCapturingDom(false);
2439
- return;
2440
- }
2444
+ cleanup();
2445
+ if (!targetEl) return;
2441
2446
  try {
2442
2447
  const html2canvas = (await import("html2canvas")).default;
2443
2448
  const canvas = await html2canvas(targetEl, {
@@ -2451,13 +2456,15 @@ function CommentThread({
2451
2456
  } catch (err) {
2452
2457
  console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:", err);
2453
2458
  }
2454
- if (threadEl) threadEl.style.visibility = "";
2455
- setCapturingDom(false);
2456
2459
  textareaRef.current?.focus();
2457
2460
  };
2458
2461
  document.addEventListener("mousemove", handleMove);
2459
2462
  document.addEventListener("click", handleClick, true);
2463
+ document.addEventListener("keydown", handleEsc);
2460
2464
  }, []);
2465
+ const handleCameraClick = (0, import_react3.useCallback)(() => {
2466
+ startDomCapture();
2467
+ }, [startDomCapture]);
2461
2468
  const handleAttachClick = (0, import_react3.useCallback)(() => {
2462
2469
  fileInputRef.current?.click();
2463
2470
  }, []);
@@ -3319,8 +3326,8 @@ function SettingsPanel({ settings, onChange, onClose }) {
3319
3326
  }
3320
3327
 
3321
3328
  // src/components/debug-widget/styles.module.scss
3322
- var css7 = '.styles-module__markersLayer___VR1cD svg[fill=none],\n.styles-module__fixedMarkersLayer___wBuxm svg[fill=none] {\n fill: none !important;\n}\n.styles-module__markersLayer___VR1cD svg[fill=none] :not([fill]),\n.styles-module__fixedMarkersLayer___wBuxm svg[fill=none] :not([fill]) {\n fill: none !important;\n}\n\n@keyframes styles-module__fadeIn___PpRqy {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes styles-module__fadeOut___tZb9S {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes styles-module__hoverHighlightIn___ljC4F {\n from {\n opacity: 0;\n transform: scale(0.98);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes styles-module__hoverTooltipIn___tncNM {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@keyframes styles-module__fabEnter___9koyT {\n from {\n opacity: 0;\n transform: scale(0.5);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n.styles-module__fab___6FrCF {\n position: fixed;\n bottom: 24px;\n right: 24px;\n width: 44px;\n height: 44px;\n border-radius: 50%;\n background: #18181b;\n color: white;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n z-index: 99999;\n animation: styles-module__fabEnter___9koyT 0.3s cubic-bezier(0.22, 1, 0.36, 1);\n touch-action: none;\n}\n.styles-module__fab___6FrCF svg {\n width: 20px;\n height: 20px;\n}\n.styles-module__fab___6FrCF:hover {\n transform: scale(1.08);\n box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);\n}\n.styles-module__fab___6FrCF:active {\n transform: scale(0.96);\n}\n.styles-module__fab___6FrCF.styles-module__active___X5PRD {\n background: #dc2626;\n}\n\n.styles-module__hoverHighlight___9kGLL {\n position: fixed;\n border: 2px solid rgba(0, 136, 255, 0.5);\n border-radius: 4px;\n background-color: rgba(0, 136, 255, 0.04);\n pointer-events: none !important;\n box-sizing: border-box;\n will-change: opacity;\n z-index: 99997;\n}\n.styles-module__hoverHighlight___9kGLL.styles-module__enter___jAi-c {\n animation: styles-module__hoverHighlightIn___ljC4F 0.12s ease-out forwards;\n}\n\n.styles-module__singleSelectOutline___2meUm {\n position: fixed;\n border: 2px solid rgba(0, 136, 255, 0.6);\n border-radius: 4px;\n pointer-events: none !important;\n background-color: rgba(0, 136, 255, 0.05);\n box-sizing: border-box;\n will-change: opacity;\n z-index: 99997;\n}\n.styles-module__singleSelectOutline___2meUm.styles-module__enter___jAi-c {\n animation: styles-module__fadeIn___PpRqy 0.15s ease-out forwards;\n}\n\n.styles-module__hoverTooltip___JE1Bs {\n position: fixed;\n font-size: 0.6875rem;\n font-weight: 500;\n color: #fff;\n background: rgba(0, 0, 0, 0.85);\n padding: 0.35rem 0.6rem;\n border-radius: 0.375rem;\n pointer-events: none !important;\n white-space: nowrap;\n max-width: 280px;\n overflow: hidden;\n text-overflow: ellipsis;\n z-index: 99999;\n}\n.styles-module__hoverTooltip___JE1Bs.styles-module__enter___jAi-c {\n animation: styles-module__hoverTooltipIn___tncNM 0.1s ease-out forwards;\n}\n\n.styles-module__hoverReactPath___wPGYi {\n font-size: 0.625rem;\n color: rgba(255, 255, 255, 0.6);\n margin-bottom: 0.15rem;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.styles-module__hoverElementName___lNqTP {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.styles-module__markersLayer___VR1cD {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 0;\n z-index: 99998;\n pointer-events: none;\n}\n.styles-module__markersLayer___VR1cD > * {\n pointer-events: auto;\n}\n\n.styles-module__fixedMarkersLayer___wBuxm {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 99998;\n pointer-events: none;\n}\n.styles-module__fixedMarkersLayer___wBuxm > * {\n pointer-events: auto;\n}\n\n.styles-module__contextMenu___nDXft {\n position: fixed;\n z-index: 2147483647;\n background: white;\n border-radius: 8px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16), 0 1px 4px rgba(0, 0, 0, 0.08);\n padding: 4px;\n min-width: 140px;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;\n animation: styles-module__fadeIn___PpRqy 0.1s ease-out;\n}\n\n.styles-module__contextMenuItem___69GKu {\n display: block;\n width: 100%;\n padding: 8px 12px;\n border: none;\n background: none;\n font-size: 13px;\n color: #18181b;\n text-align: left;\n cursor: pointer;\n border-radius: 6px;\n font-family: inherit;\n}\n.styles-module__contextMenuItem___69GKu:hover {\n background: #f4f4f5;\n}\n\n@keyframes styles-module__toastIn___V382h {\n from {\n opacity: 0;\n transform: translateY(8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@keyframes styles-module__toastOut___zlqxG {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n.styles-module__toast___gV3Sa {\n position: fixed;\n bottom: 80px;\n right: 24px;\n display: flex;\n align-items: center;\n gap: 8px;\n background: white;\n border: 1px solid #e5e5e5;\n border-radius: 8px;\n padding: 10px 16px;\n font-size: 13px;\n font-weight: 500;\n color: #18181b;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);\n z-index: 100000;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;\n animation: styles-module__toastIn___V382h 0.2s ease-out, styles-module__toastOut___zlqxG 0.3s ease-in 2.7s forwards;\n max-width: 320px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.styles-module__toast___gV3Sa span {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n@keyframes styles-module__countdownPulse___ngZrL {\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.15);\n }\n}\n.styles-module__countdownOverlay___GruQJ {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n z-index: 100002;\n pointer-events: auto;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;\n animation: styles-module__fadeIn___PpRqy 0.2s ease-out;\n}\n\n.styles-module__countdownNumber___VAmkI {\n width: 72px;\n height: 72px;\n border-radius: 50%;\n background: rgba(24, 24, 27, 0.9);\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 28px;\n font-weight: 700;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);\n animation: styles-module__countdownPulse___ngZrL 1s ease-in-out infinite;\n}\n\n.styles-module__countdownLabel___px-ao {\n font-size: 13px;\n font-weight: 500;\n color: #18181b;\n background: rgba(255, 255, 255, 0.95);\n padding: 6px 14px;\n border-radius: 8px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.styles-module__countdownCancel___8cRgZ {\n font-size: 12px;\n color: #6b7280;\n background: rgba(255, 255, 255, 0.9);\n border: 1px solid #d1d5db;\n border-radius: 6px;\n padding: 4px 12px;\n cursor: pointer;\n font-family: inherit;\n transition: background 0.12s;\n}\n.styles-module__countdownCancel___8cRgZ:hover {\n background: #f3f4f6;\n}\n\nhtml.impakers-selecting {\n cursor: crosshair !important;\n}\nhtml.impakers-selecting * {\n cursor: crosshair !important;\n}';
3323
- var classNames7 = { "markersLayer": "styles-module__markersLayer___VR1cD", "fixedMarkersLayer": "styles-module__fixedMarkersLayer___wBuxm", "fab": "styles-module__fab___6FrCF", "fabEnter": "styles-module__fabEnter___9koyT", "active": "styles-module__active___X5PRD", "hoverHighlight": "styles-module__hoverHighlight___9kGLL", "enter": "styles-module__enter___jAi-c", "hoverHighlightIn": "styles-module__hoverHighlightIn___ljC4F", "singleSelectOutline": "styles-module__singleSelectOutline___2meUm", "fadeIn": "styles-module__fadeIn___PpRqy", "hoverTooltip": "styles-module__hoverTooltip___JE1Bs", "hoverTooltipIn": "styles-module__hoverTooltipIn___tncNM", "hoverReactPath": "styles-module__hoverReactPath___wPGYi", "hoverElementName": "styles-module__hoverElementName___lNqTP", "contextMenu": "styles-module__contextMenu___nDXft", "contextMenuItem": "styles-module__contextMenuItem___69GKu", "toast": "styles-module__toast___gV3Sa", "toastIn": "styles-module__toastIn___V382h", "toastOut": "styles-module__toastOut___zlqxG", "countdownOverlay": "styles-module__countdownOverlay___GruQJ", "countdownNumber": "styles-module__countdownNumber___VAmkI", "countdownPulse": "styles-module__countdownPulse___ngZrL", "countdownLabel": "styles-module__countdownLabel___px-ao", "countdownCancel": "styles-module__countdownCancel___8cRgZ", "fadeOut": "styles-module__fadeOut___tZb9S" };
3329
+ var css7 = '.styles-module__markersLayer___VR1cD svg[fill=none],\n.styles-module__fixedMarkersLayer___wBuxm svg[fill=none] {\n fill: none !important;\n}\n.styles-module__markersLayer___VR1cD svg[fill=none] :not([fill]),\n.styles-module__fixedMarkersLayer___wBuxm svg[fill=none] :not([fill]) {\n fill: none !important;\n}\n\n@keyframes styles-module__fadeIn___PpRqy {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes styles-module__fadeOut___tZb9S {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes styles-module__hoverHighlightIn___ljC4F {\n from {\n opacity: 0;\n transform: scale(0.98);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes styles-module__hoverTooltipIn___tncNM {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@keyframes styles-module__fabEnter___9koyT {\n from {\n opacity: 0;\n transform: scale(0.5);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n.styles-module__fab___6FrCF {\n position: fixed;\n bottom: 24px;\n right: 24px;\n width: 44px;\n height: 44px;\n border-radius: 50%;\n background: #18181b;\n color: white;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n z-index: 99999;\n animation: styles-module__fabEnter___9koyT 0.3s cubic-bezier(0.22, 1, 0.36, 1);\n touch-action: none;\n}\n.styles-module__fab___6FrCF svg {\n width: 20px;\n height: 20px;\n}\n.styles-module__fab___6FrCF:hover {\n transform: scale(1.08);\n box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);\n}\n.styles-module__fab___6FrCF:active {\n transform: scale(0.96);\n}\n.styles-module__fab___6FrCF.styles-module__active___X5PRD {\n background: #dc2626;\n}\n\n.styles-module__hoverHighlight___9kGLL {\n position: fixed;\n border: 2px solid rgba(0, 136, 255, 0.5);\n border-radius: 4px;\n background-color: rgba(0, 136, 255, 0.04);\n pointer-events: none !important;\n box-sizing: border-box;\n will-change: opacity;\n z-index: 99997;\n}\n.styles-module__hoverHighlight___9kGLL.styles-module__enter___jAi-c {\n animation: styles-module__hoverHighlightIn___ljC4F 0.12s ease-out forwards;\n}\n\n.styles-module__singleSelectOutline___2meUm {\n position: fixed;\n border: 2px solid rgba(0, 136, 255, 0.6);\n border-radius: 4px;\n pointer-events: none !important;\n background-color: rgba(0, 136, 255, 0.05);\n box-sizing: border-box;\n will-change: opacity;\n z-index: 99997;\n}\n.styles-module__singleSelectOutline___2meUm.styles-module__enter___jAi-c {\n animation: styles-module__fadeIn___PpRqy 0.15s ease-out forwards;\n}\n\n.styles-module__hoverTooltip___JE1Bs {\n position: fixed;\n font-size: 0.6875rem;\n font-weight: 500;\n color: #fff;\n background: rgba(0, 0, 0, 0.85);\n padding: 0.35rem 0.6rem;\n border-radius: 0.375rem;\n pointer-events: none !important;\n white-space: nowrap;\n max-width: 280px;\n overflow: hidden;\n text-overflow: ellipsis;\n z-index: 99999;\n}\n.styles-module__hoverTooltip___JE1Bs.styles-module__enter___jAi-c {\n animation: styles-module__hoverTooltipIn___tncNM 0.1s ease-out forwards;\n}\n\n.styles-module__hoverReactPath___wPGYi {\n font-size: 0.625rem;\n color: rgba(255, 255, 255, 0.6);\n margin-bottom: 0.15rem;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.styles-module__hoverElementName___lNqTP {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.styles-module__markersLayer___VR1cD {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 0;\n z-index: 99998;\n pointer-events: none;\n}\n.styles-module__markersLayer___VR1cD > * {\n pointer-events: auto;\n}\n\n.styles-module__fixedMarkersLayer___wBuxm {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 99998;\n pointer-events: none;\n}\n.styles-module__fixedMarkersLayer___wBuxm > * {\n pointer-events: auto;\n}\n\n.styles-module__contextMenu___nDXft {\n position: fixed;\n z-index: 2147483647;\n background: white;\n border-radius: 8px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16), 0 1px 4px rgba(0, 0, 0, 0.08);\n padding: 4px;\n min-width: 140px;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;\n animation: styles-module__fadeIn___PpRqy 0.1s ease-out;\n}\n\n.styles-module__contextMenuItem___69GKu {\n display: block;\n width: 100%;\n padding: 8px 12px;\n border: none;\n background: none;\n font-size: 13px;\n color: #18181b;\n text-align: left;\n cursor: pointer;\n border-radius: 6px;\n font-family: inherit;\n}\n.styles-module__contextMenuItem___69GKu:hover {\n background: #f4f4f5;\n}\n\n@keyframes styles-module__toastIn___V382h {\n from {\n opacity: 0;\n transform: translateY(8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@keyframes styles-module__toastOut___zlqxG {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n.styles-module__toast___gV3Sa {\n position: fixed;\n bottom: 80px;\n right: 24px;\n display: flex;\n align-items: center;\n gap: 8px;\n background: white;\n border: 1px solid #e5e5e5;\n border-radius: 8px;\n padding: 10px 16px;\n font-size: 13px;\n font-weight: 500;\n color: #18181b;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);\n z-index: 100000;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;\n animation: styles-module__toastIn___V382h 0.2s ease-out, styles-module__toastOut___zlqxG 0.3s ease-in 2.7s forwards;\n max-width: 320px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.styles-module__toast___gV3Sa span {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.styles-module__toast___gV3Sa.styles-module__toastError___Q-8dn {\n border-color: #fecaca;\n background: #fef2f2;\n color: #991b1b;\n animation: styles-module__toastIn___V382h 0.2s ease-out, styles-module__toastOut___zlqxG 0.3s ease-in 3.7s forwards;\n}\n\n@keyframes styles-module__countdownPulse___ngZrL {\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.15);\n }\n}\n.styles-module__countdownOverlay___GruQJ {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n z-index: 100002;\n pointer-events: auto;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;\n animation: styles-module__fadeIn___PpRqy 0.2s ease-out;\n}\n\n.styles-module__countdownNumber___VAmkI {\n width: 72px;\n height: 72px;\n border-radius: 50%;\n background: rgba(24, 24, 27, 0.9);\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 28px;\n font-weight: 700;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);\n animation: styles-module__countdownPulse___ngZrL 1s ease-in-out infinite;\n}\n\n.styles-module__countdownLabel___px-ao {\n font-size: 13px;\n font-weight: 500;\n color: #18181b;\n background: rgba(255, 255, 255, 0.95);\n padding: 6px 14px;\n border-radius: 8px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.styles-module__countdownCancel___8cRgZ {\n font-size: 12px;\n color: #6b7280;\n background: rgba(255, 255, 255, 0.9);\n border: 1px solid #d1d5db;\n border-radius: 6px;\n padding: 4px 12px;\n cursor: pointer;\n font-family: inherit;\n transition: background 0.12s;\n}\n.styles-module__countdownCancel___8cRgZ:hover {\n background: #f3f4f6;\n}\n\nhtml.impakers-selecting {\n cursor: crosshair !important;\n}\nhtml.impakers-selecting * {\n cursor: crosshair !important;\n}';
3330
+ var classNames7 = { "markersLayer": "styles-module__markersLayer___VR1cD", "fixedMarkersLayer": "styles-module__fixedMarkersLayer___wBuxm", "fab": "styles-module__fab___6FrCF", "fabEnter": "styles-module__fabEnter___9koyT", "active": "styles-module__active___X5PRD", "hoverHighlight": "styles-module__hoverHighlight___9kGLL", "enter": "styles-module__enter___jAi-c", "hoverHighlightIn": "styles-module__hoverHighlightIn___ljC4F", "singleSelectOutline": "styles-module__singleSelectOutline___2meUm", "fadeIn": "styles-module__fadeIn___PpRqy", "hoverTooltip": "styles-module__hoverTooltip___JE1Bs", "hoverTooltipIn": "styles-module__hoverTooltipIn___tncNM", "hoverReactPath": "styles-module__hoverReactPath___wPGYi", "hoverElementName": "styles-module__hoverElementName___lNqTP", "contextMenu": "styles-module__contextMenu___nDXft", "contextMenuItem": "styles-module__contextMenuItem___69GKu", "toast": "styles-module__toast___gV3Sa", "toastIn": "styles-module__toastIn___V382h", "toastOut": "styles-module__toastOut___zlqxG", "toastError": "styles-module__toastError___Q-8dn", "countdownOverlay": "styles-module__countdownOverlay___GruQJ", "countdownNumber": "styles-module__countdownNumber___VAmkI", "countdownPulse": "styles-module__countdownPulse___ngZrL", "countdownLabel": "styles-module__countdownLabel___px-ao", "countdownCancel": "styles-module__countdownCancel___8cRgZ", "fadeOut": "styles-module__fadeOut___tZb9S" };
3324
3331
  if (typeof document !== "undefined") {
3325
3332
  let style = document.getElementById("impakers-debug-styles-debug-widget-styles");
3326
3333
  if (!style) {
@@ -3421,6 +3428,7 @@ function DebugWidget({ endpoint, getUser, onHide }) {
3421
3428
  const [hoveredMarkerId, setHoveredMarkerId] = (0, import_react7.useState)(null);
3422
3429
  const [hoveredTargetElement, setHoveredTargetElement] = (0, import_react7.useState)(null);
3423
3430
  const [showToast, setShowToast] = (0, import_react7.useState)(false);
3431
+ const [toastError, setToastError] = (0, import_react7.useState)(null);
3424
3432
  const [activeThread, setActiveThread] = (0, import_react7.useState)(null);
3425
3433
  const [threadComments, setThreadComments] = (0, import_react7.useState)({});
3426
3434
  const [serverTasks, setServerTasks] = (0, import_react7.useState)([]);
@@ -3644,7 +3652,13 @@ function DebugWidget({ endpoint, getUser, onHide }) {
3644
3652
  setHoverInfo(null);
3645
3653
  const rawSource = detectSourceFile(elementUnder);
3646
3654
  if (rawSource?.includes("/chunks/")) {
3655
+ if (window.__IMPAKERS_DEBUG_LOG) {
3656
+ console.log("[impakers-debug] async resolve start:", rawSource);
3657
+ }
3647
3658
  resolveSourceString(rawSource).then((resolved) => {
3659
+ if (window.__IMPAKERS_DEBUG_LOG) {
3660
+ console.log("[impakers-debug] async resolve result:", resolved);
3661
+ }
3648
3662
  if (resolved) {
3649
3663
  setPendingAnnotation(
3650
3664
  (prev) => prev ? {
@@ -3654,7 +3668,10 @@ function DebugWidget({ endpoint, getUser, onHide }) {
3654
3668
  } : prev
3655
3669
  );
3656
3670
  }
3657
- }).catch(() => {
3671
+ }).catch((err) => {
3672
+ if (window.__IMPAKERS_DEBUG_LOG) {
3673
+ console.log("[impakers-debug] async resolve error:", err);
3674
+ }
3658
3675
  });
3659
3676
  }
3660
3677
  };
@@ -3784,12 +3801,14 @@ ${elementInfo.join("\n")}`);
3784
3801
  }, 150);
3785
3802
  window.getSelection()?.removeAllRanges();
3786
3803
  } catch (err) {
3804
+ const msg = err?.message || "\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";
3805
+ showErrorToast(msg);
3787
3806
  console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:", err);
3788
3807
  } finally {
3789
3808
  setSubmitting(false);
3790
3809
  }
3791
3810
  },
3792
- [pendingAnnotation, submitting, endpoint, getUser]
3811
+ [pendingAnnotation, submitting, endpoint, getUser, showErrorToast]
3793
3812
  );
3794
3813
  const cancelAnnotation = (0, import_react7.useCallback)(() => {
3795
3814
  setPendingExiting(true);
@@ -3825,19 +3844,31 @@ ${elementInfo.join("\n")}`);
3825
3844
  });
3826
3845
  return unsubscribe;
3827
3846
  }, [activeThread, endpoint]);
3847
+ const showErrorToast = (0, import_react7.useCallback)((msg) => {
3848
+ setToastError(msg);
3849
+ originalSetTimeout(() => setToastError(null), 4e3);
3850
+ }, []);
3828
3851
  const handleThreadReply = (0, import_react7.useCallback)(async (taskId, content, screenshot, file) => {
3829
3852
  const authorName = getUser?.()?.name ? String(getUser().name) : "\uC775\uBA85";
3830
3853
  const authorId = getUser?.()?.id ? String(getUser().id) : void 0;
3831
3854
  try {
3832
3855
  let fileResult;
3833
3856
  if (file) {
3834
- fileResult = await uploadFile(endpoint, file, "comment", taskId);
3857
+ try {
3858
+ fileResult = await uploadFile(endpoint, file, "comment", taskId);
3859
+ } catch (uploadErr) {
3860
+ const msg = uploadErr?.message || "\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";
3861
+ showErrorToast(msg);
3862
+ console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:", uploadErr);
3863
+ }
3835
3864
  }
3836
3865
  await postComment(endpoint, taskId, content, authorName, authorId, screenshot, fileResult);
3837
3866
  } catch (err) {
3867
+ const msg = err?.message || "\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";
3868
+ showErrorToast(msg);
3838
3869
  console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:", err);
3839
3870
  }
3840
- }, [getUser, endpoint]);
3871
+ }, [getUser, endpoint, showErrorToast]);
3841
3872
  const handleThreadClose = (0, import_react7.useCallback)(() => {
3842
3873
  setActiveThread(null);
3843
3874
  }, []);
@@ -4150,6 +4181,14 @@ ${elementInfo.join("\n")}`);
4150
4181
  showToast && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: styles_module_default7.toast, "data-impakers-debug": "", children: [
4151
4182
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#16a34a", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("polyline", { points: "20 6 9 17 4 12" }) }),
4152
4183
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4" })
4184
+ ] }),
4185
+ toastError && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: `${styles_module_default7.toast} ${styles_module_default7.toastError}`, "data-impakers-debug": "", children: [
4186
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#ef4444", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
4187
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
4188
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
4189
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
4190
+ ] }),
4191
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: toastError })
4153
4192
  ] })
4154
4193
  ] }),
4155
4194
  document.body