@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.mjs CHANGED
@@ -2366,13 +2366,11 @@ function CommentThread({
2366
2366
  },
2367
2367
  [handleClose, handleSend]
2368
2368
  );
2369
- const handleCameraClick = useCallback2(() => {
2369
+ const startDomCapture = useCallback2(() => {
2370
2370
  setCapturingDom(true);
2371
- const threadEl = document.querySelector(`.${styles_module_default3.thread}`);
2372
- if (threadEl) threadEl.style.visibility = "hidden";
2373
- document.documentElement.style.cursor = "crosshair";
2374
- const allEls = document.querySelectorAll("*");
2375
- allEls.forEach((el) => el.style.cursor = "crosshair");
2371
+ const debugEls = document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");
2372
+ debugEls.forEach((el) => el.style.visibility = "hidden");
2373
+ document.documentElement.classList.add("impakers-selecting");
2376
2374
  let hoverBox = null;
2377
2375
  const showHover = (rect) => {
2378
2376
  if (!hoverBox) {
@@ -2385,25 +2383,32 @@ function CommentThread({
2385
2383
  hoverBox.style.width = `${rect.width}px`;
2386
2384
  hoverBox.style.height = `${rect.height}px`;
2387
2385
  };
2386
+ const cleanup = () => {
2387
+ document.removeEventListener("mousemove", handleMove);
2388
+ document.removeEventListener("click", handleClick, true);
2389
+ document.removeEventListener("keydown", handleEsc);
2390
+ document.documentElement.classList.remove("impakers-selecting");
2391
+ hoverBox?.remove();
2392
+ debugEls.forEach((el) => el.style.visibility = "");
2393
+ setCapturingDom(false);
2394
+ };
2388
2395
  const handleMove = (e) => {
2389
2396
  const el = document.elementFromPoint(e.clientX, e.clientY);
2390
2397
  if (!el || el === hoverBox) return;
2391
2398
  showHover(el.getBoundingClientRect());
2392
2399
  };
2400
+ const handleEsc = (e) => {
2401
+ if (e.key === "Escape") {
2402
+ cleanup();
2403
+ }
2404
+ };
2393
2405
  const handleClick = async (e) => {
2394
2406
  e.preventDefault();
2395
2407
  e.stopPropagation();
2396
- document.removeEventListener("mousemove", handleMove);
2397
- document.removeEventListener("click", handleClick, true);
2398
- document.documentElement.style.cursor = "";
2399
- allEls.forEach((el) => el.style.cursor = "");
2400
- hoverBox?.remove();
2408
+ e.stopImmediatePropagation();
2401
2409
  const targetEl = document.elementFromPoint(e.clientX, e.clientY);
2402
- if (!targetEl) {
2403
- if (threadEl) threadEl.style.visibility = "";
2404
- setCapturingDom(false);
2405
- return;
2406
- }
2410
+ cleanup();
2411
+ if (!targetEl) return;
2407
2412
  try {
2408
2413
  const html2canvas = (await import("html2canvas")).default;
2409
2414
  const canvas = await html2canvas(targetEl, {
@@ -2417,13 +2422,15 @@ function CommentThread({
2417
2422
  } catch (err) {
2418
2423
  console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:", err);
2419
2424
  }
2420
- if (threadEl) threadEl.style.visibility = "";
2421
- setCapturingDom(false);
2422
2425
  textareaRef.current?.focus();
2423
2426
  };
2424
2427
  document.addEventListener("mousemove", handleMove);
2425
2428
  document.addEventListener("click", handleClick, true);
2429
+ document.addEventListener("keydown", handleEsc);
2426
2430
  }, []);
2431
+ const handleCameraClick = useCallback2(() => {
2432
+ startDomCapture();
2433
+ }, [startDomCapture]);
2427
2434
  const handleAttachClick = useCallback2(() => {
2428
2435
  fileInputRef.current?.click();
2429
2436
  }, []);
@@ -3285,8 +3292,8 @@ function SettingsPanel({ settings, onChange, onClose }) {
3285
3292
  }
3286
3293
 
3287
3294
  // src/components/debug-widget/styles.module.scss
3288
- 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}';
3289
- 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" };
3295
+ 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}';
3296
+ 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" };
3290
3297
  if (typeof document !== "undefined") {
3291
3298
  let style = document.getElementById("impakers-debug-styles-debug-widget-styles");
3292
3299
  if (!style) {
@@ -3387,6 +3394,7 @@ function DebugWidget({ endpoint, getUser, onHide }) {
3387
3394
  const [hoveredMarkerId, setHoveredMarkerId] = useState5(null);
3388
3395
  const [hoveredTargetElement, setHoveredTargetElement] = useState5(null);
3389
3396
  const [showToast, setShowToast] = useState5(false);
3397
+ const [toastError, setToastError] = useState5(null);
3390
3398
  const [activeThread, setActiveThread] = useState5(null);
3391
3399
  const [threadComments, setThreadComments] = useState5({});
3392
3400
  const [serverTasks, setServerTasks] = useState5([]);
@@ -3610,7 +3618,13 @@ function DebugWidget({ endpoint, getUser, onHide }) {
3610
3618
  setHoverInfo(null);
3611
3619
  const rawSource = detectSourceFile(elementUnder);
3612
3620
  if (rawSource?.includes("/chunks/")) {
3621
+ if (window.__IMPAKERS_DEBUG_LOG) {
3622
+ console.log("[impakers-debug] async resolve start:", rawSource);
3623
+ }
3613
3624
  resolveSourceString(rawSource).then((resolved) => {
3625
+ if (window.__IMPAKERS_DEBUG_LOG) {
3626
+ console.log("[impakers-debug] async resolve result:", resolved);
3627
+ }
3614
3628
  if (resolved) {
3615
3629
  setPendingAnnotation(
3616
3630
  (prev) => prev ? {
@@ -3620,7 +3634,10 @@ function DebugWidget({ endpoint, getUser, onHide }) {
3620
3634
  } : prev
3621
3635
  );
3622
3636
  }
3623
- }).catch(() => {
3637
+ }).catch((err) => {
3638
+ if (window.__IMPAKERS_DEBUG_LOG) {
3639
+ console.log("[impakers-debug] async resolve error:", err);
3640
+ }
3624
3641
  });
3625
3642
  }
3626
3643
  };
@@ -3750,12 +3767,14 @@ ${elementInfo.join("\n")}`);
3750
3767
  }, 150);
3751
3768
  window.getSelection()?.removeAllRanges();
3752
3769
  } catch (err) {
3770
+ const msg = err?.message || "\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";
3771
+ showErrorToast(msg);
3753
3772
  console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:", err);
3754
3773
  } finally {
3755
3774
  setSubmitting(false);
3756
3775
  }
3757
3776
  },
3758
- [pendingAnnotation, submitting, endpoint, getUser]
3777
+ [pendingAnnotation, submitting, endpoint, getUser, showErrorToast]
3759
3778
  );
3760
3779
  const cancelAnnotation = useCallback6(() => {
3761
3780
  setPendingExiting(true);
@@ -3791,19 +3810,31 @@ ${elementInfo.join("\n")}`);
3791
3810
  });
3792
3811
  return unsubscribe;
3793
3812
  }, [activeThread, endpoint]);
3813
+ const showErrorToast = useCallback6((msg) => {
3814
+ setToastError(msg);
3815
+ originalSetTimeout(() => setToastError(null), 4e3);
3816
+ }, []);
3794
3817
  const handleThreadReply = useCallback6(async (taskId, content, screenshot, file) => {
3795
3818
  const authorName = getUser?.()?.name ? String(getUser().name) : "\uC775\uBA85";
3796
3819
  const authorId = getUser?.()?.id ? String(getUser().id) : void 0;
3797
3820
  try {
3798
3821
  let fileResult;
3799
3822
  if (file) {
3800
- fileResult = await uploadFile(endpoint, file, "comment", taskId);
3823
+ try {
3824
+ fileResult = await uploadFile(endpoint, file, "comment", taskId);
3825
+ } catch (uploadErr) {
3826
+ const msg = uploadErr?.message || "\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";
3827
+ showErrorToast(msg);
3828
+ console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:", uploadErr);
3829
+ }
3801
3830
  }
3802
3831
  await postComment(endpoint, taskId, content, authorName, authorId, screenshot, fileResult);
3803
3832
  } catch (err) {
3833
+ const msg = err?.message || "\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";
3834
+ showErrorToast(msg);
3804
3835
  console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:", err);
3805
3836
  }
3806
- }, [getUser, endpoint]);
3837
+ }, [getUser, endpoint, showErrorToast]);
3807
3838
  const handleThreadClose = useCallback6(() => {
3808
3839
  setActiveThread(null);
3809
3840
  }, []);
@@ -4116,6 +4147,14 @@ ${elementInfo.join("\n")}`);
4116
4147
  showToast && /* @__PURE__ */ jsxs8("div", { className: styles_module_default7.toast, "data-impakers-debug": "", children: [
4117
4148
  /* @__PURE__ */ jsx8("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#16a34a", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx8("polyline", { points: "20 6 9 17 4 12" }) }),
4118
4149
  /* @__PURE__ */ jsx8("span", { children: "\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4" })
4150
+ ] }),
4151
+ toastError && /* @__PURE__ */ jsxs8("div", { className: `${styles_module_default7.toast} ${styles_module_default7.toastError}`, "data-impakers-debug": "", children: [
4152
+ /* @__PURE__ */ jsxs8("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#ef4444", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
4153
+ /* @__PURE__ */ jsx8("circle", { cx: "12", cy: "12", r: "10" }),
4154
+ /* @__PURE__ */ jsx8("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
4155
+ /* @__PURE__ */ jsx8("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
4156
+ ] }),
4157
+ /* @__PURE__ */ jsx8("span", { children: toastError })
4119
4158
  ] })
4120
4159
  ] }),
4121
4160
  document.body