@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.js CHANGED
@@ -1446,9 +1446,6 @@ function probeComponentSource(fiber) {
1446
1446
  }
1447
1447
  const dispatcher = getReactDispatcher();
1448
1448
  if (!dispatcher) {
1449
- if (typeof window !== "undefined" && window.__IMPAKERS_DEBUG_LOG) {
1450
- console.log("[impakers-debug] dispatcher not found, skipping probe");
1451
- }
1452
1449
  sourceProbeCache.set(fn, null);
1453
1450
  return null;
1454
1451
  }
@@ -1468,13 +1465,7 @@ function probeComponentSource(fiber) {
1468
1465
  fn({});
1469
1466
  } catch (e) {
1470
1467
  if (e instanceof Error && e.stack) {
1471
- if (typeof window !== "undefined" && window.__IMPAKERS_DEBUG_LOG) {
1472
- console.log("[impakers-debug] probe stack:", e.stack);
1473
- }
1474
1468
  const frame = parseComponentFrame(e.stack);
1475
- if (typeof window !== "undefined" && window.__IMPAKERS_DEBUG_LOG) {
1476
- console.log("[impakers-debug] parsed frame:", frame);
1477
- }
1478
1469
  if (frame) {
1479
1470
  const cleaned = cleanSourcePath(frame.fileName);
1480
1471
  result = {
@@ -1531,9 +1522,6 @@ function getSourceLocation(element) {
1531
1522
  };
1532
1523
  }
1533
1524
  const probed = probeSourceWalk(fiber);
1534
- if (typeof window !== "undefined" && window.__IMPAKERS_DEBUG_LOG) {
1535
- console.log("[impakers-debug] probe result:", probed);
1536
- }
1537
1525
  if (probed) {
1538
1526
  return { found: true, source: probed, isReactApp: true, isProduction: false };
1539
1527
  }
@@ -2139,35 +2127,28 @@ async function getSourceMapUrlFromBundle(bundleUrl) {
2139
2127
  async function loadSourceMap(bundleUrl) {
2140
2128
  if (cache2.has(bundleUrl)) return cache2.get(bundleUrl) ?? null;
2141
2129
  if (failedUrls.has(bundleUrl)) return null;
2142
- const debugLog = typeof window !== "undefined" && window.__IMPAKERS_DEBUG_LOG;
2143
2130
  const directMapUrl = bundleUrl.endsWith(".map") ? bundleUrl : `${bundleUrl}.map`;
2144
2131
  try {
2145
2132
  const res = await fetch(directMapUrl, { cache: "force-cache" });
2146
- if (debugLog) console.log("[impakers-debug] 1\uCC28 .map fetch:", res.status, directMapUrl);
2147
2133
  if (res.ok) {
2148
2134
  const rawMap = await res.json();
2149
2135
  const traceMap = new import_trace_mapping.AnyMap(rawMap);
2150
2136
  cache2.set(bundleUrl, traceMap);
2151
2137
  return traceMap;
2152
2138
  }
2153
- } catch (e) {
2154
- if (debugLog) console.log("[impakers-debug] 1\uCC28 .map fetch exception:", e);
2139
+ } catch {
2155
2140
  }
2156
- if (debugLog) console.log("[impakers-debug] 2\uCC28 \uC2DC\uB3C4: JS\uC5D0\uC11C sourceMappingURL \uCD94\uCD9C...");
2157
2141
  const actualMapUrl = await getSourceMapUrlFromBundle(bundleUrl);
2158
- if (debugLog) console.log("[impakers-debug] 2\uCC28 actualMapUrl:", actualMapUrl);
2159
2142
  if (actualMapUrl) {
2160
2143
  try {
2161
2144
  const res = await fetch(actualMapUrl, { cache: "force-cache" });
2162
- if (debugLog) console.log("[impakers-debug] 2\uCC28 .map fetch:", res.status, actualMapUrl);
2163
2145
  if (res.ok) {
2164
2146
  const rawMap = await res.json();
2165
2147
  const traceMap = new import_trace_mapping.AnyMap(rawMap);
2166
2148
  cache2.set(bundleUrl, traceMap);
2167
2149
  return traceMap;
2168
2150
  }
2169
- } catch (e) {
2170
- if (debugLog) console.log("[impakers-debug] 2\uCC28 .map fetch exception:", e);
2151
+ } catch {
2171
2152
  }
2172
2153
  }
2173
2154
  failedUrls.add(bundleUrl);
@@ -2400,13 +2381,11 @@ function CommentThread({
2400
2381
  },
2401
2382
  [handleClose, handleSend]
2402
2383
  );
2403
- const handleCameraClick = (0, import_react3.useCallback)(() => {
2384
+ const startDomCapture = (0, import_react3.useCallback)(() => {
2404
2385
  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");
2386
+ const debugEls = document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");
2387
+ debugEls.forEach((el) => el.style.visibility = "hidden");
2388
+ document.documentElement.classList.add("impakers-selecting");
2410
2389
  let hoverBox = null;
2411
2390
  const showHover = (rect) => {
2412
2391
  if (!hoverBox) {
@@ -2419,25 +2398,32 @@ function CommentThread({
2419
2398
  hoverBox.style.width = `${rect.width}px`;
2420
2399
  hoverBox.style.height = `${rect.height}px`;
2421
2400
  };
2401
+ const cleanup = () => {
2402
+ document.removeEventListener("mousemove", handleMove);
2403
+ document.removeEventListener("click", handleClick, true);
2404
+ document.removeEventListener("keydown", handleEsc);
2405
+ document.documentElement.classList.remove("impakers-selecting");
2406
+ hoverBox?.remove();
2407
+ debugEls.forEach((el) => el.style.visibility = "");
2408
+ setCapturingDom(false);
2409
+ };
2422
2410
  const handleMove = (e) => {
2423
2411
  const el = document.elementFromPoint(e.clientX, e.clientY);
2424
2412
  if (!el || el === hoverBox) return;
2425
2413
  showHover(el.getBoundingClientRect());
2426
2414
  };
2415
+ const handleEsc = (e) => {
2416
+ if (e.key === "Escape") {
2417
+ cleanup();
2418
+ }
2419
+ };
2427
2420
  const handleClick = async (e) => {
2428
2421
  e.preventDefault();
2429
2422
  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();
2423
+ e.stopImmediatePropagation();
2435
2424
  const targetEl = document.elementFromPoint(e.clientX, e.clientY);
2436
- if (!targetEl) {
2437
- if (threadEl) threadEl.style.visibility = "";
2438
- setCapturingDom(false);
2439
- return;
2440
- }
2425
+ cleanup();
2426
+ if (!targetEl) return;
2441
2427
  try {
2442
2428
  const html2canvas = (await import("html2canvas")).default;
2443
2429
  const canvas = await html2canvas(targetEl, {
@@ -2451,13 +2437,15 @@ function CommentThread({
2451
2437
  } catch (err) {
2452
2438
  console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:", err);
2453
2439
  }
2454
- if (threadEl) threadEl.style.visibility = "";
2455
- setCapturingDom(false);
2456
2440
  textareaRef.current?.focus();
2457
2441
  };
2458
2442
  document.addEventListener("mousemove", handleMove);
2459
2443
  document.addEventListener("click", handleClick, true);
2444
+ document.addEventListener("keydown", handleEsc);
2460
2445
  }, []);
2446
+ const handleCameraClick = (0, import_react3.useCallback)(() => {
2447
+ startDomCapture();
2448
+ }, [startDomCapture]);
2461
2449
  const handleAttachClick = (0, import_react3.useCallback)(() => {
2462
2450
  fileInputRef.current?.click();
2463
2451
  }, []);
@@ -3319,8 +3307,8 @@ function SettingsPanel({ settings, onChange, onClose }) {
3319
3307
  }
3320
3308
 
3321
3309
  // 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" };
3310
+ 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}';
3311
+ 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
3312
  if (typeof document !== "undefined") {
3325
3313
  let style = document.getElementById("impakers-debug-styles-debug-widget-styles");
3326
3314
  if (!style) {
@@ -3421,6 +3409,7 @@ function DebugWidget({ endpoint, getUser, onHide }) {
3421
3409
  const [hoveredMarkerId, setHoveredMarkerId] = (0, import_react7.useState)(null);
3422
3410
  const [hoveredTargetElement, setHoveredTargetElement] = (0, import_react7.useState)(null);
3423
3411
  const [showToast, setShowToast] = (0, import_react7.useState)(false);
3412
+ const [toastError, setToastError] = (0, import_react7.useState)(null);
3424
3413
  const [activeThread, setActiveThread] = (0, import_react7.useState)(null);
3425
3414
  const [threadComments, setThreadComments] = (0, import_react7.useState)({});
3426
3415
  const [serverTasks, setServerTasks] = (0, import_react7.useState)([]);
@@ -3784,12 +3773,14 @@ ${elementInfo.join("\n")}`);
3784
3773
  }, 150);
3785
3774
  window.getSelection()?.removeAllRanges();
3786
3775
  } catch (err) {
3776
+ const msg = err?.message || "\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";
3777
+ showErrorToast(msg);
3787
3778
  console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:", err);
3788
3779
  } finally {
3789
3780
  setSubmitting(false);
3790
3781
  }
3791
3782
  },
3792
- [pendingAnnotation, submitting, endpoint, getUser]
3783
+ [pendingAnnotation, submitting, endpoint, getUser, showErrorToast]
3793
3784
  );
3794
3785
  const cancelAnnotation = (0, import_react7.useCallback)(() => {
3795
3786
  setPendingExiting(true);
@@ -3825,19 +3816,31 @@ ${elementInfo.join("\n")}`);
3825
3816
  });
3826
3817
  return unsubscribe;
3827
3818
  }, [activeThread, endpoint]);
3819
+ const showErrorToast = (0, import_react7.useCallback)((msg) => {
3820
+ setToastError(msg);
3821
+ originalSetTimeout(() => setToastError(null), 4e3);
3822
+ }, []);
3828
3823
  const handleThreadReply = (0, import_react7.useCallback)(async (taskId, content, screenshot, file) => {
3829
3824
  const authorName = getUser?.()?.name ? String(getUser().name) : "\uC775\uBA85";
3830
3825
  const authorId = getUser?.()?.id ? String(getUser().id) : void 0;
3831
3826
  try {
3832
3827
  let fileResult;
3833
3828
  if (file) {
3834
- fileResult = await uploadFile(endpoint, file, "comment", taskId);
3829
+ try {
3830
+ fileResult = await uploadFile(endpoint, file, "comment", taskId);
3831
+ } catch (uploadErr) {
3832
+ const msg = uploadErr?.message || "\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";
3833
+ showErrorToast(msg);
3834
+ console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:", uploadErr);
3835
+ }
3835
3836
  }
3836
3837
  await postComment(endpoint, taskId, content, authorName, authorId, screenshot, fileResult);
3837
3838
  } catch (err) {
3839
+ const msg = err?.message || "\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";
3840
+ showErrorToast(msg);
3838
3841
  console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:", err);
3839
3842
  }
3840
- }, [getUser, endpoint]);
3843
+ }, [getUser, endpoint, showErrorToast]);
3841
3844
  const handleThreadClose = (0, import_react7.useCallback)(() => {
3842
3845
  setActiveThread(null);
3843
3846
  }, []);
@@ -4150,6 +4153,14 @@ ${elementInfo.join("\n")}`);
4150
4153
  showToast && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: styles_module_default7.toast, "data-impakers-debug": "", children: [
4151
4154
  /* @__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
4155
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4" })
4156
+ ] }),
4157
+ toastError && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: `${styles_module_default7.toast} ${styles_module_default7.toastError}`, "data-impakers-debug": "", children: [
4158
+ /* @__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: [
4159
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
4160
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
4161
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
4162
+ ] }),
4163
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: toastError })
4153
4164
  ] })
4154
4165
  ] }),
4155
4166
  document.body