@nine-lab/nine-mu 0.1.342 β 0.1.343
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 +41 -18
- 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 +33 -13
package/package.json
CHANGED
|
@@ -68,13 +68,32 @@ export class ExceptionHook extends HTMLElement {
|
|
|
68
68
|
#renderer = () => {
|
|
69
69
|
const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
|
|
70
70
|
|
|
71
|
+
// π― [μμ 1] κΈλ‘λ² λ‘λ© μ€λ²λ μ΄λ₯Ό νλ©΄ μ 체μμ μ°μ΄λλ₯΄κΈ° μν νΈμ€νΈ λ° λ μ΄μ΄ μ€νμΌ λ΄μ₯
|
|
71
72
|
this.shadowRoot.innerHTML = `
|
|
72
73
|
<style>
|
|
73
74
|
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${__APP_VERSION__}/dist/css/nine-mu.css";
|
|
74
75
|
${customImport}
|
|
76
|
+
|
|
77
|
+
:host {
|
|
78
|
+
display: block;
|
|
79
|
+
width: 100%;
|
|
80
|
+
height: 100%;
|
|
81
|
+
}
|
|
82
|
+
/* μ΄λ€ λ‘λ© λ μ΄μ΄κ° λκ³ μμ΄λ λ·°ν¬νΈ κΈ°μ€ λ¬΄μ‘°κ±΄ 맨 μ(μ΅μλ¨)μΌλ‘ λΉΌλ²λ¦¬λ μ λ λ°©μ΄ ν΄λμ€ */
|
|
83
|
+
.nine-hook-full-overlay {
|
|
84
|
+
position: fixed !important;
|
|
85
|
+
top: 0 !important;
|
|
86
|
+
left: 0 !important;
|
|
87
|
+
width: 100vw !important;
|
|
88
|
+
height: 100vh !important;
|
|
89
|
+
box-sizing: border-box !important;
|
|
90
|
+
background-color: #FFF5F5 !important;
|
|
91
|
+
z-index: 99999999 !important;
|
|
92
|
+
overflow: auto !important;
|
|
93
|
+
}
|
|
75
94
|
</style>
|
|
76
95
|
|
|
77
|
-
<div class="nine-hook-core">
|
|
96
|
+
<div class="nine-hook-core" style="width: 100%; height: 100%;">
|
|
78
97
|
<slot></slot>
|
|
79
98
|
</div>
|
|
80
99
|
<div class="nine-exception-board"></div>
|
|
@@ -141,7 +160,7 @@ export class ExceptionHook extends HTMLElement {
|
|
|
141
160
|
const coreContainer = this.shadowRoot.querySelector('.nine-hook-core');
|
|
142
161
|
if (coreContainer) coreContainer.style.display = '';
|
|
143
162
|
}
|
|
144
|
-
},
|
|
163
|
+
}, 50); // λΌμ°ν
μλ£ λκΈ° μκ°μ μν΄ λ―ΈμΈ μν₯ (50ms)
|
|
145
164
|
}
|
|
146
165
|
|
|
147
166
|
#sendToAiAction = async (errorMessage, errorStack) => {
|
|
@@ -180,8 +199,6 @@ export class ExceptionHook extends HTMLElement {
|
|
|
180
199
|
if (this.#hasError) return;
|
|
181
200
|
this.#hasError = true;
|
|
182
201
|
|
|
183
|
-
// π― [ν΅μ¬] 리μ‘νΈκ° μλ¬ λ°μ ν νμ DOMμ Unmount/μ‘°μνλ λκΈ°μ μΈ νμ΄λ°μ
|
|
184
|
-
// μμ ν νλ €λ³΄λΈ λ€(setTimeout 0)μ μμ νκ² Web Component UIλ₯Ό κ½μ λ£μ΅λλ€.
|
|
185
202
|
setTimeout(() => {
|
|
186
203
|
trace.log("π¨ [nine-exception-hook] 리μ‘νΈ μ¬μ΄ν΄ μ’
λ£ ν μλ¬ UI μ΅μ’
λ λλ§");
|
|
187
204
|
|
|
@@ -197,16 +214,19 @@ export class ExceptionHook extends HTMLElement {
|
|
|
197
214
|
return;
|
|
198
215
|
}
|
|
199
216
|
|
|
217
|
+
// π― [μμ 2] μλ¬ HTML 컨ν
μ΄λ ꡬ쑰λ₯Ό νλ©΄ μ 체 λ·°ν¬νΈλ₯Ό μ₯μ
νλ κ³ μ λ μ΄μμ κ΅¬μ‘°λ‘ λ©ν
|
|
200
218
|
const errorHTML = `
|
|
201
|
-
<div class="nine-
|
|
202
|
-
<
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
<
|
|
208
|
-
|
|
209
|
-
|
|
219
|
+
<div class="nine-hook-full-overlay">
|
|
220
|
+
<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;">
|
|
221
|
+
<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>
|
|
222
|
+
<p class="nine-error-label" style="font-weight: bold; margin: 20px 0 8px 0; color: #4A5568; font-size: 15px;">[μλ¬ μμΈ λ‘κ·Έ]:</p>
|
|
223
|
+
<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}\n\n[Stack Trace]\n${errorStack}</pre>
|
|
224
|
+
|
|
225
|
+
<div class="nine-action-area" style="display: flex; align-items: center; gap: 20px; border-top: 1px solid #E2E8F0; padding-top: 20px;">
|
|
226
|
+
<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>
|
|
227
|
+
<div class="nine-error-footer" style="font-size: 14px; color: #718096; line-height: 1.4;">
|
|
228
|
+
λ²νΌμ λλ₯΄λ©΄ AIκ° λ‘κ·Έ λ° μ»΄ν¬λνΈ λ§΅μ μμΆμ νμ¬ μμ μ μμν©λλ€.
|
|
229
|
+
</div>
|
|
210
230
|
</div>
|
|
211
231
|
</div>
|
|
212
232
|
</div>
|