@nine-lab/nine-mu 0.1.340 β†’ 0.1.342

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nine-lab/nine-mu",
3
- "version": "0.1.340",
3
+ "version": "0.1.342",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -177,45 +177,50 @@ export class ExceptionHook extends HTMLElement {
177
177
  }
178
178
 
179
179
  #renderError(errorMessage, errorStack) {
180
- trace.log("🎨 [nine-exception-hook] #renderError() μ‹€ν–‰ μ‹œμž‘. UI μ „ν™˜ μ§„ν–‰");
180
+ if (this.#hasError) return;
181
+ this.#hasError = true;
181
182
 
182
- const coreContainer = this.shadowRoot.querySelector('.nine-hook-core');
183
- if (coreContainer) {
184
- coreContainer.style.display = 'none';
185
- trace.log("🎨 [nine-exception-hook] <slot> λ³Έλ¬Έ μ˜μ—­ μ»¨ν…Œμ΄λ„ˆ μˆ¨κΉ€ (display: none)");
186
- } else {
187
- trace.error("❌ [nine-exception-hook] .nine-hook-core μ—˜λ¦¬λ¨ΌνŠΈλ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€.");
188
- }
183
+ // 🎯 [핡심] λ¦¬μ•‘νŠΈκ°€ μ—λŸ¬ λ°œμƒ ν›„ ν•˜μœ„ DOM을 Unmount/μ‘°μž‘ν•˜λŠ” 동기적인 타이밍을
184
+ // μ™„μ „νžˆ ν˜λ €λ³΄λ‚Έ λ’€(setTimeout 0)에 μ•ˆμ „ν•˜κ²Œ Web Component UIλ₯Ό 꽂아 λ„£μŠ΅λ‹ˆλ‹€.
185
+ setTimeout(() => {
186
+ trace.log("🎨 [nine-exception-hook] λ¦¬μ•‘νŠΈ 사이클 μ’…λ£Œ ν›„ μ—λŸ¬ UI μ΅œμ’… λ Œλ”λ§");
189
187
 
190
- const exceptionBoard = this.shadowRoot.querySelector('.nine-exception-board');
191
- if (!exceptionBoard) {
192
- trace.error("❌ [nine-exception-hook] .nine-exception-board μ—˜λ¦¬λ¨ΌνŠΈλ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€.");
193
- return;
194
- }
188
+ const coreContainer = this.shadowRoot.querySelector('.nine-hook-core');
189
+ if (coreContainer) {
190
+ coreContainer.style.display = 'none';
191
+ trace.log("🎨 [nine-exception-hook] <slot> λ³Έλ¬Έ μ˜μ—­ μ»¨ν…Œμ΄λ„ˆ μˆ¨κΉ€");
192
+ }
195
193
 
196
- const errorHTML = `
197
- <div class="nine-error-container">
198
- <h3 class="nine-error-title">⚠️ μ‹œμŠ€ν…œ μ˜ˆμ™Έ 감지 (${this.tagName.toLowerCase()})</h3>
199
- <p class="nine-error-label">[μ—λŸ¬ 원인 둜그]:</p>
200
- <pre class="nine-error-log">${errorMessage}</pre>
201
-
202
- <div class="nine-action-area" style="margin-top: 20px; display: flex; align-items: center; gap: 15px;">
203
- <button class="nine-ai-btn">πŸ€– AIμ—κ²Œ μ†ŒμŠ€μ½”λ“œ μˆ˜μ • μš”μ²­</button>
204
- <div class="nine-error-footer">
205
- λ²„νŠΌμ„ λˆ„λ₯΄λ©΄ AIκ°€ 둜그 및 μ»΄ν¬λ„ŒνŠΈ 맡을 μ—­μΆ”μ ν•˜μ—¬ μˆ˜μ •μ„ μ‹œμž‘ν•©λ‹ˆλ‹€.
194
+ const exceptionBoard = this.shadowRoot.querySelector('.nine-exception-board');
195
+ if (!exceptionBoard) {
196
+ trace.error("❌ [nine-exception-hook] .nine-exception-board μ—˜λ¦¬λ¨ΌνŠΈλ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€.");
197
+ return;
198
+ }
199
+
200
+ const errorHTML = `
201
+ <div class="nine-error-container">
202
+ <h3 class="nine-error-title">⚠️ μ‹œμŠ€ν…œ μ˜ˆμ™Έ 감지 (${this.tagName.toLowerCase()})</h3>
203
+ <p class="nine-error-label">[μ—λŸ¬ 원인 둜그]:</p>
204
+ <pre class="nine-error-log">${errorMessage}</pre>
205
+
206
+ <div class="nine-action-area" style="margin-top: 20px; display: flex; align-items: center; gap: 15px;">
207
+ <button class="nine-ai-btn">πŸ€– AIμ—κ²Œ μ†ŒμŠ€μ½”λ“œ μˆ˜μ • μš”μ²­</button>
208
+ <div class="nine-error-footer">
209
+ λ²„νŠΌμ„ λˆ„λ₯΄λ©΄ AIκ°€ 둜그 및 μ»΄ν¬λ„ŒνŠΈ 맡을 μ—­μΆ”μ ν•˜μ—¬ μˆ˜μ •μ„ μ‹œμž‘ν•©λ‹ˆλ‹€.
210
+ </div>
206
211
  </div>
207
212
  </div>
208
- </div>
209
- `;
213
+ `;
210
214
 
211
- exceptionBoard.innerHTML = errorHTML;
212
- trace.log("🎨 [nine-exception-hook] Shadow DOM에 μ—λŸ¬ UI μ‚½μž… μ™„λ£Œ");
215
+ exceptionBoard.innerHTML = errorHTML;
216
+ trace.log("🎨 [nine-exception-hook] Shadow DOM에 μ—λŸ¬ UI μ΅œμ’… μ‚½μž… 성곡");
213
217
 
214
- const aiBtn = this.shadowRoot.querySelector('.nine-ai-btn');
215
- if (aiBtn) {
216
- aiBtn.addEventListener('click', () => this.#sendToAiAction(errorMessage, errorStack));
217
- trace.log("🎨 [nine-exception-hook] AI μš”μ²­ λ²„νŠΌ 이벀트 λ¦¬μŠ€λ„ˆ 바인딩 성곡");
218
- }
218
+ const aiBtn = this.shadowRoot.querySelector('.nine-ai-btn');
219
+ if (aiBtn) {
220
+ aiBtn.addEventListener('click', () => this.#sendToAiAction(errorMessage, errorStack));
221
+ trace.log("🎨 [nine-exception-hook] AI μš”μ²­ λ²„νŠΌ 이벀트 λ¦¬μŠ€λ„ˆ μ΅œμ’… 바인딩 성곡");
222
+ }
223
+ }, 0);
219
224
  }
220
225
  }
221
226