@nine-lab/nine-mu 0.1.339 β†’ 0.1.341

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 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.338"}/dist/css/nine-mu.css";
17540
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.340"}/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.338"}/dist/css/nine-mu.css";
43790
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.340"}/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.338"}/dist/css/nine-mu.css";
43930
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.340"}/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.338"}/dist/css/nine-mu.css";
44039
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.340"}/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.338"}/dist/css/nine-mu.css";
44369
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.340"}/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.338"}/dist/css/nine-mu.css";
44479
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.340"}/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
- if (__privateGet(this, _hasError)) return;
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
- console.log("✨ [nine-exception-hook] Shadow DOM λ‚΄λΆ€ μ˜ˆμ™Έ μ²­μ†Œ 및 정상 볡ꡬ");
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
- console.error("❌ AI 전솑 μ‹€νŒ¨:", err);
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() {
@@ -44597,35 +44623,46 @@ _sendToAiAction = new WeakMap();
44597
44623
  renderError_fn = function(errorMessage, errorStack) {
44598
44624
  if (__privateGet(this, _hasError)) return;
44599
44625
  __privateSet(this, _hasError, true);
44600
- const coreContainer = this.shadowRoot.querySelector(".nine-hook-core");
44601
- if (coreContainer) coreContainer.style.display = "none";
44602
- const exceptionBoard = this.shadowRoot.querySelector(".nine-exception-board");
44603
- if (!exceptionBoard) return;
44604
- const errorHTML = `
44605
- <div class="nine-error-container">
44606
- <h3 class="nine-error-title">⚠️ μ‹œμŠ€ν…œ μ˜ˆμ™Έ 감지 (${this.tagName.toLowerCase()})</h3>
44607
- <p class="nine-error-label">[μ—λŸ¬ 원인 둜그]:</p>
44608
- <pre class="nine-error-log">${errorMessage}</pre>
44609
-
44610
- <div class="nine-action-area" style="margin-top: 20px; display: flex; align-items: center; gap: 15px;">
44611
- <button class="nine-ai-btn">πŸ€– AIμ—κ²Œ μ†ŒμŠ€μ½”λ“œ μˆ˜μ • μš”μ²­</button>
44612
- <div class="nine-error-footer">
44613
- λ²„νŠΌμ„ λˆ„λ₯΄λ©΄ AIκ°€ 둜그 및 μ»΄ν¬λ„ŒνŠΈ 맡을 μ—­μΆ”μ ν•˜μ—¬ μˆ˜μ •μ„ μ‹œμž‘ν•©λ‹ˆλ‹€.
44626
+ setTimeout(() => {
44627
+ console.log("🎨 [nine-exception-hook] λ¦¬μ•‘νŠΈ 사이클 μ’…λ£Œ ν›„ μ—λŸ¬ UI μ΅œμ’… λ Œλ”λ§");
44628
+ const coreContainer = this.shadowRoot.querySelector(".nine-hook-core");
44629
+ if (coreContainer) {
44630
+ coreContainer.style.display = "none";
44631
+ console.log("🎨 [nine-exception-hook] <slot> λ³Έλ¬Έ μ˜μ—­ μ»¨ν…Œμ΄λ„ˆ μˆ¨κΉ€");
44632
+ }
44633
+ const exceptionBoard = this.shadowRoot.querySelector(".nine-exception-board");
44634
+ if (!exceptionBoard) {
44635
+ console.error("❌ [nine-exception-hook] .nine-exception-board μ—˜λ¦¬λ¨ΌνŠΈλ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€.");
44636
+ return;
44637
+ }
44638
+ const errorHTML = `
44639
+ <div class="nine-error-container">
44640
+ <h3 class="nine-error-title">⚠️ μ‹œμŠ€ν…œ μ˜ˆμ™Έ 감지 (${this.tagName.toLowerCase()})</h3>
44641
+ <p class="nine-error-label">[μ—λŸ¬ 원인 둜그]:</p>
44642
+ <pre class="nine-error-log">${errorMessage}</pre>
44643
+
44644
+ <div class="nine-action-area" style="margin-top: 20px; display: flex; align-items: center; gap: 15px;">
44645
+ <button class="nine-ai-btn">πŸ€– AIμ—κ²Œ μ†ŒμŠ€μ½”λ“œ μˆ˜μ • μš”μ²­</button>
44646
+ <div class="nine-error-footer">
44647
+ λ²„νŠΌμ„ λˆ„λ₯΄λ©΄ AIκ°€ 둜그 및 μ»΄ν¬λ„ŒνŠΈ 맡을 μ—­μΆ”μ ν•˜μ—¬ μˆ˜μ •μ„ μ‹œμž‘ν•©λ‹ˆλ‹€.
44648
+ </div>
44614
44649
  </div>
44615
44650
  </div>
44616
- </div>
44617
- `;
44618
- exceptionBoard.innerHTML = errorHTML;
44619
- const aiBtn = this.shadowRoot.querySelector(".nine-ai-btn");
44620
- if (aiBtn) {
44621
- aiBtn.addEventListener("click", () => __privateGet(this, _sendToAiAction).call(this, errorMessage, errorStack));
44622
- }
44651
+ `;
44652
+ exceptionBoard.innerHTML = errorHTML;
44653
+ console.log("🎨 [nine-exception-hook] Shadow DOM에 μ—λŸ¬ UI μ΅œμ’… μ‚½μž… 성곡");
44654
+ const aiBtn = this.shadowRoot.querySelector(".nine-ai-btn");
44655
+ if (aiBtn) {
44656
+ aiBtn.addEventListener("click", () => __privateGet(this, _sendToAiAction).call(this, errorMessage, errorStack));
44657
+ console.log("🎨 [nine-exception-hook] AI μš”μ²­ λ²„νŠΌ 이벀트 λ¦¬μŠ€λ„ˆ μ΅œμ’… 바인딩 성곡");
44658
+ }
44659
+ }, 0);
44623
44660
  };
44624
44661
  if (!customElements.get("nine-exception-hook")) {
44625
44662
  customElements.define("nine-exception-hook", ExceptionHook);
44626
44663
  }
44627
44664
  const NineMu = {
44628
- version: "0.1.338",
44665
+ version: "0.1.340",
44629
44666
  init: (config2) => {
44630
44667
  trace$1.log("πŸ› οΈ Nine-Mu Engine initialized", config2);
44631
44668
  }