@impakers/debug 1.3.13 → 1.4.2

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
@@ -1412,9 +1412,6 @@ function probeComponentSource(fiber) {
1412
1412
  }
1413
1413
  const dispatcher = getReactDispatcher();
1414
1414
  if (!dispatcher) {
1415
- if (typeof window !== "undefined" && window.__IMPAKERS_DEBUG_LOG) {
1416
- console.log("[impakers-debug] dispatcher not found, skipping probe");
1417
- }
1418
1415
  sourceProbeCache.set(fn, null);
1419
1416
  return null;
1420
1417
  }
@@ -1434,13 +1431,7 @@ function probeComponentSource(fiber) {
1434
1431
  fn({});
1435
1432
  } catch (e) {
1436
1433
  if (e instanceof Error && e.stack) {
1437
- if (typeof window !== "undefined" && window.__IMPAKERS_DEBUG_LOG) {
1438
- console.log("[impakers-debug] probe stack:", e.stack);
1439
- }
1440
1434
  const frame = parseComponentFrame(e.stack);
1441
- if (typeof window !== "undefined" && window.__IMPAKERS_DEBUG_LOG) {
1442
- console.log("[impakers-debug] parsed frame:", frame);
1443
- }
1444
1435
  if (frame) {
1445
1436
  const cleaned = cleanSourcePath(frame.fileName);
1446
1437
  result = {
@@ -1497,9 +1488,6 @@ function getSourceLocation(element) {
1497
1488
  };
1498
1489
  }
1499
1490
  const probed = probeSourceWalk(fiber);
1500
- if (typeof window !== "undefined" && window.__IMPAKERS_DEBUG_LOG) {
1501
- console.log("[impakers-debug] probe result:", probed);
1502
- }
1503
1491
  if (probed) {
1504
1492
  return { found: true, source: probed, isReactApp: true, isProduction: false };
1505
1493
  }
@@ -2105,35 +2093,28 @@ async function getSourceMapUrlFromBundle(bundleUrl) {
2105
2093
  async function loadSourceMap(bundleUrl) {
2106
2094
  if (cache2.has(bundleUrl)) return cache2.get(bundleUrl) ?? null;
2107
2095
  if (failedUrls.has(bundleUrl)) return null;
2108
- const debugLog = typeof window !== "undefined" && window.__IMPAKERS_DEBUG_LOG;
2109
2096
  const directMapUrl = bundleUrl.endsWith(".map") ? bundleUrl : `${bundleUrl}.map`;
2110
2097
  try {
2111
2098
  const res = await fetch(directMapUrl, { cache: "force-cache" });
2112
- if (debugLog) console.log("[impakers-debug] 1\uCC28 .map fetch:", res.status, directMapUrl);
2113
2099
  if (res.ok) {
2114
2100
  const rawMap = await res.json();
2115
2101
  const traceMap = new AnyMap(rawMap);
2116
2102
  cache2.set(bundleUrl, traceMap);
2117
2103
  return traceMap;
2118
2104
  }
2119
- } catch (e) {
2120
- if (debugLog) console.log("[impakers-debug] 1\uCC28 .map fetch exception:", e);
2105
+ } catch {
2121
2106
  }
2122
- if (debugLog) console.log("[impakers-debug] 2\uCC28 \uC2DC\uB3C4: JS\uC5D0\uC11C sourceMappingURL \uCD94\uCD9C...");
2123
2107
  const actualMapUrl = await getSourceMapUrlFromBundle(bundleUrl);
2124
- if (debugLog) console.log("[impakers-debug] 2\uCC28 actualMapUrl:", actualMapUrl);
2125
2108
  if (actualMapUrl) {
2126
2109
  try {
2127
2110
  const res = await fetch(actualMapUrl, { cache: "force-cache" });
2128
- if (debugLog) console.log("[impakers-debug] 2\uCC28 .map fetch:", res.status, actualMapUrl);
2129
2111
  if (res.ok) {
2130
2112
  const rawMap = await res.json();
2131
2113
  const traceMap = new AnyMap(rawMap);
2132
2114
  cache2.set(bundleUrl, traceMap);
2133
2115
  return traceMap;
2134
2116
  }
2135
- } catch (e) {
2136
- if (debugLog) console.log("[impakers-debug] 2\uCC28 .map fetch exception:", e);
2117
+ } catch {
2137
2118
  }
2138
2119
  }
2139
2120
  failedUrls.add(bundleUrl);
@@ -2366,13 +2347,11 @@ function CommentThread({
2366
2347
  },
2367
2348
  [handleClose, handleSend]
2368
2349
  );
2369
- const handleCameraClick = useCallback2(() => {
2350
+ const startDomCapture = useCallback2(() => {
2370
2351
  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");
2352
+ const debugEls = document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");
2353
+ debugEls.forEach((el) => el.style.visibility = "hidden");
2354
+ document.documentElement.classList.add("impakers-selecting");
2376
2355
  let hoverBox = null;
2377
2356
  const showHover = (rect) => {
2378
2357
  if (!hoverBox) {
@@ -2385,25 +2364,32 @@ function CommentThread({
2385
2364
  hoverBox.style.width = `${rect.width}px`;
2386
2365
  hoverBox.style.height = `${rect.height}px`;
2387
2366
  };
2367
+ const cleanup = () => {
2368
+ document.removeEventListener("mousemove", handleMove);
2369
+ document.removeEventListener("click", handleClick, true);
2370
+ document.removeEventListener("keydown", handleEsc);
2371
+ document.documentElement.classList.remove("impakers-selecting");
2372
+ hoverBox?.remove();
2373
+ debugEls.forEach((el) => el.style.visibility = "");
2374
+ setCapturingDom(false);
2375
+ };
2388
2376
  const handleMove = (e) => {
2389
2377
  const el = document.elementFromPoint(e.clientX, e.clientY);
2390
2378
  if (!el || el === hoverBox) return;
2391
2379
  showHover(el.getBoundingClientRect());
2392
2380
  };
2381
+ const handleEsc = (e) => {
2382
+ if (e.key === "Escape") {
2383
+ cleanup();
2384
+ }
2385
+ };
2393
2386
  const handleClick = async (e) => {
2394
2387
  e.preventDefault();
2395
2388
  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();
2389
+ e.stopImmediatePropagation();
2401
2390
  const targetEl = document.elementFromPoint(e.clientX, e.clientY);
2402
- if (!targetEl) {
2403
- if (threadEl) threadEl.style.visibility = "";
2404
- setCapturingDom(false);
2405
- return;
2406
- }
2391
+ cleanup();
2392
+ if (!targetEl) return;
2407
2393
  try {
2408
2394
  const html2canvas = (await import("html2canvas")).default;
2409
2395
  const canvas = await html2canvas(targetEl, {
@@ -2417,13 +2403,15 @@ function CommentThread({
2417
2403
  } catch (err) {
2418
2404
  console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:", err);
2419
2405
  }
2420
- if (threadEl) threadEl.style.visibility = "";
2421
- setCapturingDom(false);
2422
2406
  textareaRef.current?.focus();
2423
2407
  };
2424
2408
  document.addEventListener("mousemove", handleMove);
2425
2409
  document.addEventListener("click", handleClick, true);
2410
+ document.addEventListener("keydown", handleEsc);
2426
2411
  }, []);
2412
+ const handleCameraClick = useCallback2(() => {
2413
+ startDomCapture();
2414
+ }, [startDomCapture]);
2427
2415
  const handleAttachClick = useCallback2(() => {
2428
2416
  fileInputRef.current?.click();
2429
2417
  }, []);
@@ -3285,8 +3273,8 @@ function SettingsPanel({ settings, onChange, onClose }) {
3285
3273
  }
3286
3274
 
3287
3275
  // 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" };
3276
+ 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}';
3277
+ 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
3278
  if (typeof document !== "undefined") {
3291
3279
  let style = document.getElementById("impakers-debug-styles-debug-widget-styles");
3292
3280
  if (!style) {
@@ -3387,6 +3375,7 @@ function DebugWidget({ endpoint, getUser, onHide }) {
3387
3375
  const [hoveredMarkerId, setHoveredMarkerId] = useState5(null);
3388
3376
  const [hoveredTargetElement, setHoveredTargetElement] = useState5(null);
3389
3377
  const [showToast, setShowToast] = useState5(false);
3378
+ const [toastError, setToastError] = useState5(null);
3390
3379
  const [activeThread, setActiveThread] = useState5(null);
3391
3380
  const [threadComments, setThreadComments] = useState5({});
3392
3381
  const [serverTasks, setServerTasks] = useState5([]);
@@ -3750,12 +3739,14 @@ ${elementInfo.join("\n")}`);
3750
3739
  }, 150);
3751
3740
  window.getSelection()?.removeAllRanges();
3752
3741
  } catch (err) {
3742
+ const msg = err?.message || "\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";
3743
+ showErrorToast(msg);
3753
3744
  console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:", err);
3754
3745
  } finally {
3755
3746
  setSubmitting(false);
3756
3747
  }
3757
3748
  },
3758
- [pendingAnnotation, submitting, endpoint, getUser]
3749
+ [pendingAnnotation, submitting, endpoint, getUser, showErrorToast]
3759
3750
  );
3760
3751
  const cancelAnnotation = useCallback6(() => {
3761
3752
  setPendingExiting(true);
@@ -3791,19 +3782,31 @@ ${elementInfo.join("\n")}`);
3791
3782
  });
3792
3783
  return unsubscribe;
3793
3784
  }, [activeThread, endpoint]);
3785
+ const showErrorToast = useCallback6((msg) => {
3786
+ setToastError(msg);
3787
+ originalSetTimeout(() => setToastError(null), 4e3);
3788
+ }, []);
3794
3789
  const handleThreadReply = useCallback6(async (taskId, content, screenshot, file) => {
3795
3790
  const authorName = getUser?.()?.name ? String(getUser().name) : "\uC775\uBA85";
3796
3791
  const authorId = getUser?.()?.id ? String(getUser().id) : void 0;
3797
3792
  try {
3798
3793
  let fileResult;
3799
3794
  if (file) {
3800
- fileResult = await uploadFile(endpoint, file, "comment", taskId);
3795
+ try {
3796
+ fileResult = await uploadFile(endpoint, file, "comment", taskId);
3797
+ } catch (uploadErr) {
3798
+ const msg = uploadErr?.message || "\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";
3799
+ showErrorToast(msg);
3800
+ console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:", uploadErr);
3801
+ }
3801
3802
  }
3802
3803
  await postComment(endpoint, taskId, content, authorName, authorId, screenshot, fileResult);
3803
3804
  } catch (err) {
3805
+ const msg = err?.message || "\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";
3806
+ showErrorToast(msg);
3804
3807
  console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:", err);
3805
3808
  }
3806
- }, [getUser, endpoint]);
3809
+ }, [getUser, endpoint, showErrorToast]);
3807
3810
  const handleThreadClose = useCallback6(() => {
3808
3811
  setActiveThread(null);
3809
3812
  }, []);
@@ -4116,6 +4119,14 @@ ${elementInfo.join("\n")}`);
4116
4119
  showToast && /* @__PURE__ */ jsxs8("div", { className: styles_module_default7.toast, "data-impakers-debug": "", children: [
4117
4120
  /* @__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
4121
  /* @__PURE__ */ jsx8("span", { children: "\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4" })
4122
+ ] }),
4123
+ toastError && /* @__PURE__ */ jsxs8("div", { className: `${styles_module_default7.toast} ${styles_module_default7.toastError}`, "data-impakers-debug": "", children: [
4124
+ /* @__PURE__ */ jsxs8("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#ef4444", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
4125
+ /* @__PURE__ */ jsx8("circle", { cx: "12", cy: "12", r: "10" }),
4126
+ /* @__PURE__ */ jsx8("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
4127
+ /* @__PURE__ */ jsx8("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
4128
+ ] }),
4129
+ /* @__PURE__ */ jsx8("span", { children: toastError })
4119
4130
  ] })
4120
4131
  ] }),
4121
4132
  document.body