@nine-lab/nine-mu 0.1.339 β 0.1.340
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/nine-mu.js +50 -15
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +1 -1
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/exception/ExceptionHook.js +48 -17
package/dist/nine-mu.js
CHANGED
|
@@ -17537,7 +17537,7 @@ render_fn = function() {
|
|
|
17537
17537
|
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
17538
17538
|
this.shadowRoot.innerHTML = `
|
|
17539
17539
|
<style>
|
|
17540
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
17540
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.339"}/dist/css/nine-mu.css";
|
|
17541
17541
|
${customImport}
|
|
17542
17542
|
</style>
|
|
17543
17543
|
<div class="wrapper">
|
|
@@ -43787,7 +43787,7 @@ class NineDiff extends HTMLElement {
|
|
|
43787
43787
|
const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
|
|
43788
43788
|
this.shadowRoot.innerHTML = `
|
|
43789
43789
|
<style>
|
|
43790
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43790
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.339"}/dist/css/nine-mu.css";
|
|
43791
43791
|
${customImport}
|
|
43792
43792
|
</style>
|
|
43793
43793
|
|
|
@@ -43927,7 +43927,7 @@ renderScaffolding_fn = function() {
|
|
|
43927
43927
|
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
43928
43928
|
this.shadowRoot.innerHTML = `
|
|
43929
43929
|
<style>
|
|
43930
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43930
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.339"}/dist/css/nine-mu.css";
|
|
43931
43931
|
${customImport}
|
|
43932
43932
|
</style>
|
|
43933
43933
|
|
|
@@ -44036,7 +44036,7 @@ render_fn2 = function() {
|
|
|
44036
44036
|
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
44037
44037
|
this.shadowRoot.innerHTML = `
|
|
44038
44038
|
<style>
|
|
44039
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
44039
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.339"}/dist/css/nine-mu.css";
|
|
44040
44040
|
${customImport}
|
|
44041
44041
|
</style>
|
|
44042
44042
|
|
|
@@ -44366,7 +44366,7 @@ class ChatMessageBody extends HTMLElement {
|
|
|
44366
44366
|
const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
|
|
44367
44367
|
this.shadowRoot.innerHTML = `
|
|
44368
44368
|
<style>
|
|
44369
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
44369
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.339"}/dist/css/nine-mu.css";
|
|
44370
44370
|
${customImport}
|
|
44371
44371
|
</style>
|
|
44372
44372
|
|
|
@@ -44468,7 +44468,6 @@ class ExceptionHook extends HTMLElement {
|
|
|
44468
44468
|
constructor() {
|
|
44469
44469
|
super();
|
|
44470
44470
|
__privateAdd(this, _ExceptionHook_instances);
|
|
44471
|
-
// π‘ λΉκ³΅κ° μΈμ€ν΄μ€ νλ μ μ
|
|
44472
44471
|
__privateAdd(this, _lastPath, window.location.pathname);
|
|
44473
44472
|
__privateAdd(this, _hasError, false);
|
|
44474
44473
|
__privateAdd(this, _cssPath, "/css/nine-exception-hook.css");
|
|
@@ -44477,7 +44476,7 @@ class ExceptionHook extends HTMLElement {
|
|
|
44477
44476
|
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
44478
44477
|
this.shadowRoot.innerHTML = `
|
|
44479
44478
|
<style>
|
|
44480
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
44479
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.339"}/dist/css/nine-mu.css";
|
|
44481
44480
|
${customImport}
|
|
44482
44481
|
</style>
|
|
44483
44482
|
|
|
@@ -44489,24 +44488,38 @@ class ExceptionHook extends HTMLElement {
|
|
|
44489
44488
|
});
|
|
44490
44489
|
__privateAdd(this, _handleRuntimeError, (event) => {
|
|
44491
44490
|
var _a2, _b;
|
|
44492
|
-
|
|
44491
|
+
trace.log("π¨ [nine-exception-hook] window.addEventListener('error') 리μ€λ ν¬μ°©!!", event);
|
|
44492
|
+
if (__privateGet(this, _hasError)) {
|
|
44493
|
+
trace.log("β οΈ [nine-exception-hook] μ΄λ―Έ μλ¬ νλ©΄μ΄ νμ±νλμ΄ μμ΄ μ΄λ²€νΈ 리μ€λ ν¨μ€");
|
|
44494
|
+
return;
|
|
44495
|
+
}
|
|
44493
44496
|
const errorMessage = ((_a2 = event.error) == null ? void 0 : _a2.message) || event.message || String(event);
|
|
44494
44497
|
const errorStack = ((_b = event.error) == null ? void 0 : _b.stack) || "No stack trace available";
|
|
44495
44498
|
if (errorMessage && errorMessage !== "Script error.") {
|
|
44499
|
+
trace.log("π― [nine-exception-hook] μ μμ μΈ μλ¬ λ©μμ§ νμΈ -> μλ¬ λ³΄λ μΆλ ₯ μλ", { errorMessage });
|
|
44496
44500
|
__privateMethod(this, _ExceptionHook_instances, renderError_fn).call(this, errorMessage, errorStack);
|
|
44501
|
+
} else {
|
|
44502
|
+
trace.log("β οΈ [nine-exception-hook] 'Script error.' μ΄κ±°λ λΉ λ©μμ§λΌ 무μλ¨");
|
|
44497
44503
|
}
|
|
44498
44504
|
});
|
|
44499
44505
|
__privateAdd(this, _handlePromiseError, (event) => {
|
|
44506
|
+
trace.log("π¨ [nine-exception-hook] unhandledrejection (Promise μλ¬) ν¬μ°©!!", event);
|
|
44500
44507
|
if (__privateGet(this, _hasError)) return;
|
|
44501
44508
|
const reason = event.reason;
|
|
44502
44509
|
const errorMessage = (reason == null ? void 0 : reason.message) || String(reason || "Unhandled Promise Rejection");
|
|
44503
44510
|
const errorStack = (reason == null ? void 0 : reason.stack) || "No stack trace available";
|
|
44511
|
+
trace.log("π― [nine-exception-hook] Promise κ±°λΆ νμΈ -> μλ¬ λ³΄λ μΆλ ₯ μλ");
|
|
44504
44512
|
__privateMethod(this, _ExceptionHook_instances, renderError_fn).call(this, errorMessage, errorStack);
|
|
44505
44513
|
});
|
|
44506
44514
|
__privateAdd(this, _handleLocationChange, () => {
|
|
44507
44515
|
setTimeout(() => {
|
|
44516
|
+
trace.log("π [nine-exception-hook] μ£Όμ μ΄λ κ°μ§ 체ν¬", {
|
|
44517
|
+
hasError: __privateGet(this, _hasError),
|
|
44518
|
+
lastPath: __privateGet(this, _lastPath),
|
|
44519
|
+
currentPath: window.location.pathname
|
|
44520
|
+
});
|
|
44508
44521
|
if (__privateGet(this, _hasError) && __privateGet(this, _lastPath) !== window.location.pathname) {
|
|
44509
|
-
|
|
44522
|
+
trace.log("β¨ [nine-exception-hook] Shadow DOM λ΄λΆ μμΈ μ²μ λ° μ μ 볡ꡬ");
|
|
44510
44523
|
__privateSet(this, _lastPath, window.location.pathname);
|
|
44511
44524
|
__privateSet(this, _hasError, false);
|
|
44512
44525
|
const exceptionBoard = this.shadowRoot.querySelector(".nine-exception-board");
|
|
@@ -44517,6 +44530,7 @@ class ExceptionHook extends HTMLElement {
|
|
|
44517
44530
|
}, 10);
|
|
44518
44531
|
});
|
|
44519
44532
|
__privateAdd(this, _sendToAiAction, async (errorMessage, errorStack) => {
|
|
44533
|
+
trace.log("π [nine-exception-hook] AI μμ μμ² λ²νΌ ν΄λ¦λ¨");
|
|
44520
44534
|
const btn = this.shadowRoot.querySelector(".nine-ai-btn");
|
|
44521
44535
|
const footer = this.shadowRoot.querySelector(".nine-error-footer");
|
|
44522
44536
|
if (!btn) return;
|
|
@@ -44525,6 +44539,7 @@ class ExceptionHook extends HTMLElement {
|
|
|
44525
44539
|
btn.classList.add("loading");
|
|
44526
44540
|
try {
|
|
44527
44541
|
if (window.triggerAutoRecovery) {
|
|
44542
|
+
trace.log("π‘ [nine-exception-hook] window.triggerAutoRecovery νΈμΆ μ€ν");
|
|
44528
44543
|
await window.triggerAutoRecovery({
|
|
44529
44544
|
message: errorMessage,
|
|
44530
44545
|
stack: errorStack || "No stack trace available",
|
|
@@ -44536,15 +44551,17 @@ class ExceptionHook extends HTMLElement {
|
|
|
44536
44551
|
throw new Error("window.triggerAutoRecovery κ΄μ ν μμ§μ΄ λ‘λλμ§ μμμ΅λλ€.");
|
|
44537
44552
|
}
|
|
44538
44553
|
} catch (err) {
|
|
44539
|
-
|
|
44554
|
+
trace.error("β AI μ μ‘ μ€ν¨:", err);
|
|
44540
44555
|
btn.disabled = false;
|
|
44541
44556
|
btn.innerText = "β μ¬μ μ‘ μλ";
|
|
44542
44557
|
footer.innerHTML = `<span style="color: #E53E3E;">β οΈ μ μ‘ μ€ν¨: ${err.message}</span>`;
|
|
44543
44558
|
}
|
|
44544
44559
|
});
|
|
44545
44560
|
this.attachShadow({ mode: "open" });
|
|
44561
|
+
trace.log("π [nine-exception-hook] μΈμ€ν΄μ€ μμ±λ¨");
|
|
44546
44562
|
}
|
|
44547
44563
|
connectedCallback() {
|
|
44564
|
+
trace.log("π [nine-exception-hook] DOMμ λ§μ΄νΈλ¨. μ΄λ²€νΈ 리μ€λ λ°μΈλ© μμ");
|
|
44548
44565
|
__privateGet(this, _renderer2).call(this);
|
|
44549
44566
|
__privateMethod(this, _ExceptionHook_instances, injectShadowStylesheet_fn).call(this);
|
|
44550
44567
|
__privateMethod(this, _ExceptionHook_instances, setupGlobalSniffer_fn).call(this);
|
|
@@ -44553,12 +44570,14 @@ class ExceptionHook extends HTMLElement {
|
|
|
44553
44570
|
document.addEventListener("click", __privateGet(this, _handleLocationChange), true);
|
|
44554
44571
|
}
|
|
44555
44572
|
disconnectedCallback() {
|
|
44573
|
+
trace.log("π [nine-exception-hook] DOMμμ μΈλ§μ΄νΈλ¨. 리μ€λ ν΄μ ");
|
|
44556
44574
|
window.removeEventListener("error", __privateGet(this, _handleRuntimeError), true);
|
|
44557
44575
|
window.removeEventListener("unhandledrejection", __privateGet(this, _handlePromiseError), true);
|
|
44558
44576
|
window.removeEventListener("popstate", __privateGet(this, _handleLocationChange));
|
|
44559
44577
|
document.removeEventListener("click", __privateGet(this, _handleLocationChange), true);
|
|
44560
44578
|
if (window.onerror === __privateGet(this, _handleRuntimeError) || __privateGet(this, _oldOnError)) {
|
|
44561
44579
|
window.onerror = __privateGet(this, _oldOnError);
|
|
44580
|
+
trace.log("π [nine-exception-hook] window.onerror 볡ꡬ μλ£");
|
|
44562
44581
|
}
|
|
44563
44582
|
}
|
|
44564
44583
|
}
|
|
@@ -44569,18 +44588,25 @@ _oldOnError = new WeakMap();
|
|
|
44569
44588
|
_ExceptionHook_instances = new WeakSet();
|
|
44570
44589
|
setupGlobalSniffer_fn = function() {
|
|
44571
44590
|
window.addEventListener("error", __privateGet(this, _handleRuntimeError), true);
|
|
44591
|
+
trace.log("π [nine-exception-hook] window.addEventListener('error') λ±λ‘ μλ£");
|
|
44572
44592
|
__privateSet(this, _oldOnError, window.onerror);
|
|
44573
44593
|
window.onerror = (message, source, lineno, colno, error) => {
|
|
44594
|
+
trace.log("π¨ [nine-exception-hook] μμ window.onerror ν¬μ°©!!", { message, source, lineno, error });
|
|
44574
44595
|
if (!__privateGet(this, _hasError)) {
|
|
44596
|
+
trace.log("π― [nine-exception-hook] νμ¬ μλ¬ μν μμ -> μλ¬ λ³΄λ μΆλ ₯ μλ");
|
|
44575
44597
|
const errorMessage = (error == null ? void 0 : error.message) || message || "μ μ μλ λ°νμ μμΈ";
|
|
44576
44598
|
const errorStack = (error == null ? void 0 : error.stack) || `${source}:${lineno}:${colno}`;
|
|
44577
44599
|
__privateMethod(this, _ExceptionHook_instances, renderError_fn).call(this, errorMessage, errorStack);
|
|
44600
|
+
} else {
|
|
44601
|
+
trace.log("β οΈ [nine-exception-hook] μ΄λ―Έ μλ¬ νλ©΄μ΄ νμ±νλμ΄ μμ΄ μμ onerror ν¨μ€");
|
|
44578
44602
|
}
|
|
44579
44603
|
if (__privateGet(this, _oldOnError)) {
|
|
44604
|
+
trace.log("π [nine-exception-hook] κΈ°μ‘΄μ λ±λ‘λμ΄ μλ λ€λ₯Έ onerror μμ§μΌλ‘ μμ");
|
|
44580
44605
|
return __privateGet(this, _oldOnError).call(this, message, source, lineno, colno, error);
|
|
44581
44606
|
}
|
|
44582
44607
|
return false;
|
|
44583
44608
|
};
|
|
44609
|
+
trace.log("π [nine-exception-hook] μμ window.onerror κ°λ‘μ±κΈ°(Chaining) μλ£");
|
|
44584
44610
|
};
|
|
44585
44611
|
_renderer2 = new WeakMap();
|
|
44586
44612
|
injectShadowStylesheet_fn = function() {
|
|
@@ -44595,12 +44621,19 @@ _handlePromiseError = new WeakMap();
|
|
|
44595
44621
|
_handleLocationChange = new WeakMap();
|
|
44596
44622
|
_sendToAiAction = new WeakMap();
|
|
44597
44623
|
renderError_fn = function(errorMessage, errorStack) {
|
|
44598
|
-
|
|
44599
|
-
__privateSet(this, _hasError, true);
|
|
44624
|
+
trace.log("π¨ [nine-exception-hook] #renderError() μ€ν μμ. UI μ ν μ§ν");
|
|
44600
44625
|
const coreContainer = this.shadowRoot.querySelector(".nine-hook-core");
|
|
44601
|
-
if (coreContainer)
|
|
44626
|
+
if (coreContainer) {
|
|
44627
|
+
coreContainer.style.display = "none";
|
|
44628
|
+
trace.log("π¨ [nine-exception-hook] <slot> λ³Έλ¬Έ μμ 컨ν
μ΄λ μ¨κΉ (display: none)");
|
|
44629
|
+
} else {
|
|
44630
|
+
trace.error("β [nine-exception-hook] .nine-hook-core μ리먼νΈλ₯Ό μ°Ύμ μ μμ΅λλ€.");
|
|
44631
|
+
}
|
|
44602
44632
|
const exceptionBoard = this.shadowRoot.querySelector(".nine-exception-board");
|
|
44603
|
-
if (!exceptionBoard)
|
|
44633
|
+
if (!exceptionBoard) {
|
|
44634
|
+
trace.error("β [nine-exception-hook] .nine-exception-board μ리먼νΈλ₯Ό μ°Ύμ μ μμ΅λλ€.");
|
|
44635
|
+
return;
|
|
44636
|
+
}
|
|
44604
44637
|
const errorHTML = `
|
|
44605
44638
|
<div class="nine-error-container">
|
|
44606
44639
|
<h3 class="nine-error-title">β οΈ μμ€ν
μμΈ κ°μ§ (${this.tagName.toLowerCase()})</h3>
|
|
@@ -44616,16 +44649,18 @@ renderError_fn = function(errorMessage, errorStack) {
|
|
|
44616
44649
|
</div>
|
|
44617
44650
|
`;
|
|
44618
44651
|
exceptionBoard.innerHTML = errorHTML;
|
|
44652
|
+
trace.log("π¨ [nine-exception-hook] Shadow DOMμ μλ¬ UI μ½μ
μλ£");
|
|
44619
44653
|
const aiBtn = this.shadowRoot.querySelector(".nine-ai-btn");
|
|
44620
44654
|
if (aiBtn) {
|
|
44621
44655
|
aiBtn.addEventListener("click", () => __privateGet(this, _sendToAiAction).call(this, errorMessage, errorStack));
|
|
44656
|
+
trace.log("π¨ [nine-exception-hook] AI μμ² λ²νΌ μ΄λ²€νΈ 리μ€λ λ°μΈλ© μ±κ³΅");
|
|
44622
44657
|
}
|
|
44623
44658
|
};
|
|
44624
44659
|
if (!customElements.get("nine-exception-hook")) {
|
|
44625
44660
|
customElements.define("nine-exception-hook", ExceptionHook);
|
|
44626
44661
|
}
|
|
44627
44662
|
const NineMu = {
|
|
44628
|
-
version: "0.1.
|
|
44663
|
+
version: "0.1.339",
|
|
44629
44664
|
init: (config2) => {
|
|
44630
44665
|
trace$1.log("π οΈ Nine-Mu Engine initialized", config2);
|
|
44631
44666
|
}
|