@nine-lab/nine-mu 0.1.343 → 0.1.345

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.342"}/dist/css/nine-mu.css";
17540
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.344"}/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.342"}/dist/css/nine-mu.css";
43790
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.344"}/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.342"}/dist/css/nine-mu.css";
43930
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.344"}/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.342"}/dist/css/nine-mu.css";
44039
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.344"}/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.342"}/dist/css/nine-mu.css";
44369
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.344"}/dist/css/nine-mu.css";
44370
44370
  ${customImport}
44371
44371
  </style>
44372
44372
 
@@ -44476,79 +44476,72 @@ class ExceptionHook extends HTMLElement {
44476
44476
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
44477
44477
  this.shadowRoot.innerHTML = `
44478
44478
  <style>
44479
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.342"}/dist/css/nine-mu.css";
44479
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.344"}/dist/css/nine-mu.css";
44480
44480
  ${customImport}
44481
44481
 
44482
44482
  :host {
44483
44483
  display: block;
44484
44484
  width: 100%;
44485
44485
  height: 100%;
44486
+ position: relative !important; /* 내부 에러 보드의 기준점 기둥 생성 */
44486
44487
  }
44487
- /* 어떤 로딩 레이어가 돌고 있어도 뷰포트 기준 무조건 맨 앞(최상단)으로 빼버리는 절대 방어 클래스 */
44488
- .nine-hook-full-overlay {
44489
- position: fixed !important;
44488
+
44489
+ .nine-hook-core {
44490
+ width: 100%;
44491
+ height: 100%;
44492
+ }
44493
+
44494
+ /* 🎯 [핵심 변경 2] 리액트 슬롯을 가리지 않고, 오직 "이 컴포넌트 구역"만 가득 채우는 독립 팝업 레이어 */
44495
+ .nine-hook-inner-cover {
44496
+ position: absolute !important;
44490
44497
  top: 0 !important;
44491
44498
  left: 0 !important;
44492
- width: 100vw !important;
44493
- height: 100vh !important;
44499
+ width: 100% !important;
44500
+ height: 100% !important;
44494
44501
  box-sizing: border-box !important;
44495
44502
  background-color: #FFF5F5 !important;
44496
- z-index: 99999999 !important;
44503
+ z-index: 2147483647 !important; /* 리액트 내부 그 어떤 오버레이보다 무조건 위 */
44497
44504
  overflow: auto !important;
44505
+ display: none; /* 평소엔 숨김 */
44498
44506
  }
44499
44507
  </style>
44500
44508
 
44501
- <div class="nine-hook-core" style="width: 100%; height: 100%;">
44509
+ <div class="nine-hook-core">
44502
44510
  <slot></slot>
44503
44511
  </div>
44504
- <div class="nine-exception-board"></div>
44512
+ <div class="nine-exception-board class-target-board"></div>
44505
44513
  `;
44506
44514
  });
44507
44515
  __privateAdd(this, _handleRuntimeError, (event) => {
44508
44516
  var _a2, _b;
44509
- trace.log("🚨 [nine-exception-hook] window.addEventListener('error') 리스너 포착!!", event);
44510
- if (__privateGet(this, _hasError)) {
44511
- trace.log("⚠️ [nine-exception-hook] 이미 에러 화면이 활성화되어 있어 이벤트 리스너 패스");
44512
- return;
44513
- }
44517
+ if (__privateGet(this, _hasError)) return;
44514
44518
  const errorMessage = ((_a2 = event.error) == null ? void 0 : _a2.message) || event.message || String(event);
44515
44519
  const errorStack = ((_b = event.error) == null ? void 0 : _b.stack) || "No stack trace available";
44516
44520
  if (errorMessage && errorMessage !== "Script error.") {
44517
- trace.log("🎯 [nine-exception-hook] 정상적인 에러 메시지 확인 -> 에러 보드 출력 시도", { errorMessage });
44518
44521
  __privateMethod(this, _ExceptionHook_instances, renderError_fn).call(this, errorMessage, errorStack);
44519
- } else {
44520
- trace.log("⚠️ [nine-exception-hook] 'Script error.' 이거나 빈 메시지라 무시됨");
44521
44522
  }
44522
44523
  });
44523
44524
  __privateAdd(this, _handlePromiseError, (event) => {
44524
- trace.log("🚨 [nine-exception-hook] unhandledrejection (Promise 에러) 포착!!", event);
44525
44525
  if (__privateGet(this, _hasError)) return;
44526
44526
  const reason = event.reason;
44527
44527
  const errorMessage = (reason == null ? void 0 : reason.message) || String(reason || "Unhandled Promise Rejection");
44528
44528
  const errorStack = (reason == null ? void 0 : reason.stack) || "No stack trace available";
44529
- trace.log("🎯 [nine-exception-hook] Promise 거부 확인 -> 에러 보드 출력 시도");
44530
44529
  __privateMethod(this, _ExceptionHook_instances, renderError_fn).call(this, errorMessage, errorStack);
44531
44530
  });
44532
44531
  __privateAdd(this, _handleLocationChange, () => {
44533
44532
  setTimeout(() => {
44534
- trace.log("📍 [nine-exception-hook] 주소 이동 감지 체크", {
44535
- hasError: __privateGet(this, _hasError),
44536
- lastPath: __privateGet(this, _lastPath),
44537
- currentPath: window.location.pathname
44538
- });
44539
44533
  if (__privateGet(this, _hasError) && __privateGet(this, _lastPath) !== window.location.pathname) {
44540
- trace.log("✨ [nine-exception-hook] Shadow DOM 내부 예외 청소 및 정상 복구");
44541
44534
  __privateSet(this, _lastPath, window.location.pathname);
44542
44535
  __privateSet(this, _hasError, false);
44543
44536
  const exceptionBoard = this.shadowRoot.querySelector(".nine-exception-board");
44544
- if (exceptionBoard) exceptionBoard.innerHTML = "";
44545
- const coreContainer = this.shadowRoot.querySelector(".nine-hook-core");
44546
- if (coreContainer) coreContainer.style.display = "";
44537
+ if (exceptionBoard) {
44538
+ exceptionBoard.innerHTML = "";
44539
+ exceptionBoard.className = "nine-exception-board";
44540
+ }
44547
44541
  }
44548
44542
  }, 50);
44549
44543
  });
44550
44544
  __privateAdd(this, _sendToAiAction, async (errorMessage, errorStack) => {
44551
- trace.log("🚀 [nine-exception-hook] AI 수정 요청 버튼 클릭됨");
44552
44545
  const btn = this.shadowRoot.querySelector(".nine-ai-btn");
44553
44546
  const footer = this.shadowRoot.querySelector(".nine-error-footer");
44554
44547
  if (!btn) return;
@@ -44557,7 +44550,6 @@ class ExceptionHook extends HTMLElement {
44557
44550
  btn.classList.add("loading");
44558
44551
  try {
44559
44552
  if (window.triggerAutoRecovery) {
44560
- trace.log("📡 [nine-exception-hook] window.triggerAutoRecovery 호출 실행");
44561
44553
  await window.triggerAutoRecovery({
44562
44554
  message: errorMessage,
44563
44555
  stack: errorStack || "No stack trace available",
@@ -44569,17 +44561,14 @@ class ExceptionHook extends HTMLElement {
44569
44561
  throw new Error("window.triggerAutoRecovery 관제탑 엔진이 로드되지 않았습니다.");
44570
44562
  }
44571
44563
  } catch (err) {
44572
- trace.error("❌ AI 전송 실패:", err);
44573
44564
  btn.disabled = false;
44574
44565
  btn.innerText = "❌ 재전송 시도";
44575
44566
  footer.innerHTML = `<span style="color: #E53E3E;">⚠️ 전송 실패: ${err.message}</span>`;
44576
44567
  }
44577
44568
  });
44578
44569
  this.attachShadow({ mode: "open" });
44579
- trace.log("🔍 [nine-exception-hook] 인스턴스 생성됨");
44580
44570
  }
44581
44571
  connectedCallback() {
44582
- trace.log("🔍 [nine-exception-hook] DOM에 마운트됨. 이벤트 리스너 바인딩 시작");
44583
44572
  __privateGet(this, _renderer2).call(this);
44584
44573
  __privateMethod(this, _ExceptionHook_instances, injectShadowStylesheet_fn).call(this);
44585
44574
  __privateMethod(this, _ExceptionHook_instances, setupGlobalSniffer_fn).call(this);
@@ -44588,14 +44577,12 @@ class ExceptionHook extends HTMLElement {
44588
44577
  document.addEventListener("click", __privateGet(this, _handleLocationChange), true);
44589
44578
  }
44590
44579
  disconnectedCallback() {
44591
- trace.log("🔍 [nine-exception-hook] DOM에서 언마운트됨. 리스너 해제");
44592
44580
  window.removeEventListener("error", __privateGet(this, _handleRuntimeError), true);
44593
44581
  window.removeEventListener("unhandledrejection", __privateGet(this, _handlePromiseError), true);
44594
44582
  window.removeEventListener("popstate", __privateGet(this, _handleLocationChange));
44595
44583
  document.removeEventListener("click", __privateGet(this, _handleLocationChange), true);
44596
44584
  if (window.onerror === __privateGet(this, _handleRuntimeError) || __privateGet(this, _oldOnError)) {
44597
44585
  window.onerror = __privateGet(this, _oldOnError);
44598
- trace.log("🔍 [nine-exception-hook] window.onerror 복구 완료");
44599
44586
  }
44600
44587
  }
44601
44588
  }
@@ -44606,25 +44593,18 @@ _oldOnError = new WeakMap();
44606
44593
  _ExceptionHook_instances = new WeakSet();
44607
44594
  setupGlobalSniffer_fn = function() {
44608
44595
  window.addEventListener("error", __privateGet(this, _handleRuntimeError), true);
44609
- trace.log("🔍 [nine-exception-hook] window.addEventListener('error') 등록 완료");
44610
44596
  __privateSet(this, _oldOnError, window.onerror);
44611
44597
  window.onerror = (message, source, lineno, colno, error) => {
44612
- trace.log("🚨 [nine-exception-hook] 원시 window.onerror 포착!!", { message, source, lineno, error });
44613
44598
  if (!__privateGet(this, _hasError)) {
44614
- trace.log("🎯 [nine-exception-hook] 현재 에러 상태 없음 -> 에러 보드 출력 시도");
44615
44599
  const errorMessage = (error == null ? void 0 : error.message) || message || "알 수 없는 런타임 예외";
44616
44600
  const errorStack = (error == null ? void 0 : error.stack) || `${source}:${lineno}:${colno}`;
44617
44601
  __privateMethod(this, _ExceptionHook_instances, renderError_fn).call(this, errorMessage, errorStack);
44618
- } else {
44619
- trace.log("⚠️ [nine-exception-hook] 이미 에러 화면이 활성화되어 있어 원시 onerror 패스");
44620
44602
  }
44621
44603
  if (__privateGet(this, _oldOnError)) {
44622
- trace.log("🔄 [nine-exception-hook] 기존에 등록되어 있던 다른 onerror 엔진으로 위임");
44623
44604
  return __privateGet(this, _oldOnError).call(this, message, source, lineno, colno, error);
44624
44605
  }
44625
44606
  return false;
44626
44607
  };
44627
- trace.log("🔍 [nine-exception-hook] 원시 window.onerror 가로채기(Chaining) 완료");
44628
44608
  };
44629
44609
  _renderer2 = new WeakMap();
44630
44610
  injectShadowStylesheet_fn = function() {
@@ -44642,42 +44622,30 @@ renderError_fn = function(errorMessage, errorStack) {
44642
44622
  if (__privateGet(this, _hasError)) return;
44643
44623
  __privateSet(this, _hasError, true);
44644
44624
  setTimeout(() => {
44645
- trace.log("🎨 [nine-exception-hook] 리액트 사이클 종료 후 에러 UI 최종 렌더링");
44646
- const coreContainer = this.shadowRoot.querySelector(".nine-hook-core");
44647
- if (coreContainer) {
44648
- coreContainer.style.display = "none";
44649
- trace.log("🎨 [nine-exception-hook] <slot> 본문 영역 컨테이너 숨김");
44650
- }
44651
44625
  const exceptionBoard = this.shadowRoot.querySelector(".nine-exception-board");
44652
- if (!exceptionBoard) {
44653
- trace.error("❌ [nine-exception-hook] .nine-exception-board 엘리먼트를 찾을 수 없습니다.");
44654
- return;
44655
- }
44626
+ if (!exceptionBoard) return;
44627
+ exceptionBoard.className = "nine-hook-inner-cover";
44656
44628
  const errorHTML = `
44657
- <div class="nine-hook-full-overlay">
44658
- <div class="nine-error-container" style="padding: 40px; max-width: 1200px; margin: 40px auto; font-family: sans-serif; background: white; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.08); text-align: left;">
44659
- <h3 class="nine-error-title" style="color: #C53030; margin-top: 0; font-size: 22px; font-weight: 700; border-bottom: 2px solid #FED2D2; padding-bottom: 12px;">⚠️ 시스템 예외 감지 (${this.tagName.toLowerCase()})</h3>
44660
- <p class="nine-error-label" style="font-weight: bold; margin: 20px 0 8px 0; color: #4A5568; font-size: 15px;">[에러 원인 로그]:</p>
44661
- <pre class="nine-error-log" style="background: #1A202C; color: #EDF2F7; padding: 20px; border-radius: 6px; overflow-x: auto; white-space: pre-wrap; font-family: monospace; font-size: 14px; line-height: 1.6; margin-bottom: 25px;">${errorMessage}
44629
+ <div class="nine-error-container" style="padding: 30px; box-sizing: border-box; font-family: sans-serif; background: white; min-height: 100%; text-align: left;">
44630
+ <h3 class="nine-error-title" style="color: #C53030; margin-top: 0; font-size: 20px; font-weight: 700; border-bottom: 2px solid #FED2D2; padding-bottom: 12px; font-family: sans-serif;">⚠️ 시스템 예외 감지 (${this.tagName.toLowerCase()})</h3>
44631
+ <p class="nine-error-label" style="font-weight: bold; margin: 15px 0 6px 0; color: #4A5568; font-size: 14px; font-family: sans-serif;">[에러 원인 로그]:</p>
44632
+ <pre class="nine-error-log" style="background: #1A202C; color: #EDF2F7; padding: 15px; border-radius: 6px; overflow-x: auto; white-space: pre-wrap; font-family: monospace; font-size: 13px; line-height: 1.5; margin-bottom: 20px;">${errorMessage}
44662
44633
 
44663
44634
  [Stack Trace]
44664
44635
  ${errorStack}</pre>
44665
-
44666
- <div class="nine-action-area" style="display: flex; align-items: center; gap: 20px; border-top: 1px solid #E2E8F0; padding-top: 20px;">
44667
- <button class="nine-ai-btn" style="background: #3182CE; color: white; border: none; padding: 14px 28px; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 16px; transition: background 0.2s;">🤖 AI에게 소스코드 수정 요청</button>
44668
- <div class="nine-error-footer" style="font-size: 14px; color: #718096; line-height: 1.4;">
44669
- 버튼을 누르면 AI가 로그 및 컴포넌트 맵을 역추적하여 수정을 시작합니다.
44670
- </div>
44636
+
44637
+ <div class="nine-action-area" style="display: flex; align-items: center; gap: 15px; border-top: 1px solid #E2E8F0; padding-top: 15px;">
44638
+ <button class="nine-ai-btn" style="background: #3182CE; color: white; border: none; padding: 10px 20px; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 14px;">🤖 AI에게 소스코드 수정 요청</button>
44639
+ <div class="nine-error-footer" style="font-size: 13px; color: #718096; line-height: 1.4; font-family: sans-serif;">
44640
+ 버튼을 누르면 AI가 로그 및 컴포넌트 맵을 역추적하여 수정을 시작합니다.
44671
44641
  </div>
44672
44642
  </div>
44673
44643
  </div>
44674
44644
  `;
44675
44645
  exceptionBoard.innerHTML = errorHTML;
44676
- trace.log("🎨 [nine-exception-hook] Shadow DOM에 에러 UI 최종 삽입 성공");
44677
- const aiBtn = this.shadowRoot.querySelector(".nine-ai-btn");
44646
+ const aiBtn = exceptionBoard.querySelector(".nine-ai-btn");
44678
44647
  if (aiBtn) {
44679
44648
  aiBtn.addEventListener("click", () => __privateGet(this, _sendToAiAction).call(this, errorMessage, errorStack));
44680
- trace.log("🎨 [nine-exception-hook] AI 요청 버튼 이벤트 리스너 최종 바인딩 성공");
44681
44649
  }
44682
44650
  }, 0);
44683
44651
  };
@@ -44685,7 +44653,7 @@ if (!customElements.get("nine-exception-hook")) {
44685
44653
  customElements.define("nine-exception-hook", ExceptionHook);
44686
44654
  }
44687
44655
  const NineMu = {
44688
- version: "0.1.342",
44656
+ version: "0.1.344",
44689
44657
  init: (config2) => {
44690
44658
  trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
44691
44659
  }