@impakers/debug 1.3.12 → 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 +72 -26
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +72 -26
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -2139,28 +2139,35 @@ async function getSourceMapUrlFromBundle(bundleUrl) {
|
|
|
2139
2139
|
async function loadSourceMap(bundleUrl) {
|
|
2140
2140
|
if (cache2.has(bundleUrl)) return cache2.get(bundleUrl) ?? null;
|
|
2141
2141
|
if (failedUrls.has(bundleUrl)) return null;
|
|
2142
|
+
const debugLog = typeof window !== "undefined" && window.__IMPAKERS_DEBUG_LOG;
|
|
2142
2143
|
const directMapUrl = bundleUrl.endsWith(".map") ? bundleUrl : `${bundleUrl}.map`;
|
|
2143
2144
|
try {
|
|
2144
2145
|
const res = await fetch(directMapUrl, { cache: "force-cache" });
|
|
2146
|
+
if (debugLog) console.log("[impakers-debug] 1\uCC28 .map fetch:", res.status, directMapUrl);
|
|
2145
2147
|
if (res.ok) {
|
|
2146
2148
|
const rawMap = await res.json();
|
|
2147
2149
|
const traceMap = new import_trace_mapping.AnyMap(rawMap);
|
|
2148
2150
|
cache2.set(bundleUrl, traceMap);
|
|
2149
2151
|
return traceMap;
|
|
2150
2152
|
}
|
|
2151
|
-
} catch {
|
|
2153
|
+
} catch (e) {
|
|
2154
|
+
if (debugLog) console.log("[impakers-debug] 1\uCC28 .map fetch exception:", e);
|
|
2152
2155
|
}
|
|
2156
|
+
if (debugLog) console.log("[impakers-debug] 2\uCC28 \uC2DC\uB3C4: JS\uC5D0\uC11C sourceMappingURL \uCD94\uCD9C...");
|
|
2153
2157
|
const actualMapUrl = await getSourceMapUrlFromBundle(bundleUrl);
|
|
2158
|
+
if (debugLog) console.log("[impakers-debug] 2\uCC28 actualMapUrl:", actualMapUrl);
|
|
2154
2159
|
if (actualMapUrl) {
|
|
2155
2160
|
try {
|
|
2156
2161
|
const res = await fetch(actualMapUrl, { cache: "force-cache" });
|
|
2162
|
+
if (debugLog) console.log("[impakers-debug] 2\uCC28 .map fetch:", res.status, actualMapUrl);
|
|
2157
2163
|
if (res.ok) {
|
|
2158
2164
|
const rawMap = await res.json();
|
|
2159
2165
|
const traceMap = new import_trace_mapping.AnyMap(rawMap);
|
|
2160
2166
|
cache2.set(bundleUrl, traceMap);
|
|
2161
2167
|
return traceMap;
|
|
2162
2168
|
}
|
|
2163
|
-
} catch {
|
|
2169
|
+
} catch (e) {
|
|
2170
|
+
if (debugLog) console.log("[impakers-debug] 2\uCC28 .map fetch exception:", e);
|
|
2164
2171
|
}
|
|
2165
2172
|
}
|
|
2166
2173
|
failedUrls.add(bundleUrl);
|
|
@@ -2393,13 +2400,11 @@ function CommentThread({
|
|
|
2393
2400
|
},
|
|
2394
2401
|
[handleClose, handleSend]
|
|
2395
2402
|
);
|
|
2396
|
-
const
|
|
2403
|
+
const startDomCapture = (0, import_react3.useCallback)(() => {
|
|
2397
2404
|
setCapturingDom(true);
|
|
2398
|
-
const
|
|
2399
|
-
|
|
2400
|
-
document.documentElement.
|
|
2401
|
-
const allEls = document.querySelectorAll("*");
|
|
2402
|
-
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");
|
|
2403
2408
|
let hoverBox = null;
|
|
2404
2409
|
const showHover = (rect) => {
|
|
2405
2410
|
if (!hoverBox) {
|
|
@@ -2412,25 +2417,32 @@ function CommentThread({
|
|
|
2412
2417
|
hoverBox.style.width = `${rect.width}px`;
|
|
2413
2418
|
hoverBox.style.height = `${rect.height}px`;
|
|
2414
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
|
+
};
|
|
2415
2429
|
const handleMove = (e) => {
|
|
2416
2430
|
const el = document.elementFromPoint(e.clientX, e.clientY);
|
|
2417
2431
|
if (!el || el === hoverBox) return;
|
|
2418
2432
|
showHover(el.getBoundingClientRect());
|
|
2419
2433
|
};
|
|
2434
|
+
const handleEsc = (e) => {
|
|
2435
|
+
if (e.key === "Escape") {
|
|
2436
|
+
cleanup();
|
|
2437
|
+
}
|
|
2438
|
+
};
|
|
2420
2439
|
const handleClick = async (e) => {
|
|
2421
2440
|
e.preventDefault();
|
|
2422
2441
|
e.stopPropagation();
|
|
2423
|
-
|
|
2424
|
-
document.removeEventListener("click", handleClick, true);
|
|
2425
|
-
document.documentElement.style.cursor = "";
|
|
2426
|
-
allEls.forEach((el) => el.style.cursor = "");
|
|
2427
|
-
hoverBox?.remove();
|
|
2442
|
+
e.stopImmediatePropagation();
|
|
2428
2443
|
const targetEl = document.elementFromPoint(e.clientX, e.clientY);
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
setCapturingDom(false);
|
|
2432
|
-
return;
|
|
2433
|
-
}
|
|
2444
|
+
cleanup();
|
|
2445
|
+
if (!targetEl) return;
|
|
2434
2446
|
try {
|
|
2435
2447
|
const html2canvas = (await import("html2canvas")).default;
|
|
2436
2448
|
const canvas = await html2canvas(targetEl, {
|
|
@@ -2444,13 +2456,15 @@ function CommentThread({
|
|
|
2444
2456
|
} catch (err) {
|
|
2445
2457
|
console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:", err);
|
|
2446
2458
|
}
|
|
2447
|
-
if (threadEl) threadEl.style.visibility = "";
|
|
2448
|
-
setCapturingDom(false);
|
|
2449
2459
|
textareaRef.current?.focus();
|
|
2450
2460
|
};
|
|
2451
2461
|
document.addEventListener("mousemove", handleMove);
|
|
2452
2462
|
document.addEventListener("click", handleClick, true);
|
|
2463
|
+
document.addEventListener("keydown", handleEsc);
|
|
2453
2464
|
}, []);
|
|
2465
|
+
const handleCameraClick = (0, import_react3.useCallback)(() => {
|
|
2466
|
+
startDomCapture();
|
|
2467
|
+
}, [startDomCapture]);
|
|
2454
2468
|
const handleAttachClick = (0, import_react3.useCallback)(() => {
|
|
2455
2469
|
fileInputRef.current?.click();
|
|
2456
2470
|
}, []);
|
|
@@ -3312,8 +3326,8 @@ function SettingsPanel({ settings, onChange, onClose }) {
|
|
|
3312
3326
|
}
|
|
3313
3327
|
|
|
3314
3328
|
// src/components/debug-widget/styles.module.scss
|
|
3315
|
-
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}';
|
|
3316
|
-
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" };
|
|
3317
3331
|
if (typeof document !== "undefined") {
|
|
3318
3332
|
let style = document.getElementById("impakers-debug-styles-debug-widget-styles");
|
|
3319
3333
|
if (!style) {
|
|
@@ -3414,6 +3428,7 @@ function DebugWidget({ endpoint, getUser, onHide }) {
|
|
|
3414
3428
|
const [hoveredMarkerId, setHoveredMarkerId] = (0, import_react7.useState)(null);
|
|
3415
3429
|
const [hoveredTargetElement, setHoveredTargetElement] = (0, import_react7.useState)(null);
|
|
3416
3430
|
const [showToast, setShowToast] = (0, import_react7.useState)(false);
|
|
3431
|
+
const [toastError, setToastError] = (0, import_react7.useState)(null);
|
|
3417
3432
|
const [activeThread, setActiveThread] = (0, import_react7.useState)(null);
|
|
3418
3433
|
const [threadComments, setThreadComments] = (0, import_react7.useState)({});
|
|
3419
3434
|
const [serverTasks, setServerTasks] = (0, import_react7.useState)([]);
|
|
@@ -3637,7 +3652,13 @@ function DebugWidget({ endpoint, getUser, onHide }) {
|
|
|
3637
3652
|
setHoverInfo(null);
|
|
3638
3653
|
const rawSource = detectSourceFile(elementUnder);
|
|
3639
3654
|
if (rawSource?.includes("/chunks/")) {
|
|
3655
|
+
if (window.__IMPAKERS_DEBUG_LOG) {
|
|
3656
|
+
console.log("[impakers-debug] async resolve start:", rawSource);
|
|
3657
|
+
}
|
|
3640
3658
|
resolveSourceString(rawSource).then((resolved) => {
|
|
3659
|
+
if (window.__IMPAKERS_DEBUG_LOG) {
|
|
3660
|
+
console.log("[impakers-debug] async resolve result:", resolved);
|
|
3661
|
+
}
|
|
3641
3662
|
if (resolved) {
|
|
3642
3663
|
setPendingAnnotation(
|
|
3643
3664
|
(prev) => prev ? {
|
|
@@ -3647,7 +3668,10 @@ function DebugWidget({ endpoint, getUser, onHide }) {
|
|
|
3647
3668
|
} : prev
|
|
3648
3669
|
);
|
|
3649
3670
|
}
|
|
3650
|
-
}).catch(() => {
|
|
3671
|
+
}).catch((err) => {
|
|
3672
|
+
if (window.__IMPAKERS_DEBUG_LOG) {
|
|
3673
|
+
console.log("[impakers-debug] async resolve error:", err);
|
|
3674
|
+
}
|
|
3651
3675
|
});
|
|
3652
3676
|
}
|
|
3653
3677
|
};
|
|
@@ -3777,12 +3801,14 @@ ${elementInfo.join("\n")}`);
|
|
|
3777
3801
|
}, 150);
|
|
3778
3802
|
window.getSelection()?.removeAllRanges();
|
|
3779
3803
|
} catch (err) {
|
|
3804
|
+
const msg = err?.message || "\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";
|
|
3805
|
+
showErrorToast(msg);
|
|
3780
3806
|
console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:", err);
|
|
3781
3807
|
} finally {
|
|
3782
3808
|
setSubmitting(false);
|
|
3783
3809
|
}
|
|
3784
3810
|
},
|
|
3785
|
-
[pendingAnnotation, submitting, endpoint, getUser]
|
|
3811
|
+
[pendingAnnotation, submitting, endpoint, getUser, showErrorToast]
|
|
3786
3812
|
);
|
|
3787
3813
|
const cancelAnnotation = (0, import_react7.useCallback)(() => {
|
|
3788
3814
|
setPendingExiting(true);
|
|
@@ -3818,19 +3844,31 @@ ${elementInfo.join("\n")}`);
|
|
|
3818
3844
|
});
|
|
3819
3845
|
return unsubscribe;
|
|
3820
3846
|
}, [activeThread, endpoint]);
|
|
3847
|
+
const showErrorToast = (0, import_react7.useCallback)((msg) => {
|
|
3848
|
+
setToastError(msg);
|
|
3849
|
+
originalSetTimeout(() => setToastError(null), 4e3);
|
|
3850
|
+
}, []);
|
|
3821
3851
|
const handleThreadReply = (0, import_react7.useCallback)(async (taskId, content, screenshot, file) => {
|
|
3822
3852
|
const authorName = getUser?.()?.name ? String(getUser().name) : "\uC775\uBA85";
|
|
3823
3853
|
const authorId = getUser?.()?.id ? String(getUser().id) : void 0;
|
|
3824
3854
|
try {
|
|
3825
3855
|
let fileResult;
|
|
3826
3856
|
if (file) {
|
|
3827
|
-
|
|
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
|
+
}
|
|
3828
3864
|
}
|
|
3829
3865
|
await postComment(endpoint, taskId, content, authorName, authorId, screenshot, fileResult);
|
|
3830
3866
|
} catch (err) {
|
|
3867
|
+
const msg = err?.message || "\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";
|
|
3868
|
+
showErrorToast(msg);
|
|
3831
3869
|
console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:", err);
|
|
3832
3870
|
}
|
|
3833
|
-
}, [getUser, endpoint]);
|
|
3871
|
+
}, [getUser, endpoint, showErrorToast]);
|
|
3834
3872
|
const handleThreadClose = (0, import_react7.useCallback)(() => {
|
|
3835
3873
|
setActiveThread(null);
|
|
3836
3874
|
}, []);
|
|
@@ -4143,6 +4181,14 @@ ${elementInfo.join("\n")}`);
|
|
|
4143
4181
|
showToast && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: styles_module_default7.toast, "data-impakers-debug": "", children: [
|
|
4144
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" }) }),
|
|
4145
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 })
|
|
4146
4192
|
] })
|
|
4147
4193
|
] }),
|
|
4148
4194
|
document.body
|