@nine-lab/nine-mu 0.1.360 → 0.1.361
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 +46 -42
- 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 +41 -40
package/package.json
CHANGED
|
@@ -8,58 +8,61 @@ export const NineExceptionStyles = {
|
|
|
8
8
|
minHeight: '100%',
|
|
9
9
|
flexGrow: 1,
|
|
10
10
|
padding: '25px',
|
|
11
|
-
background: '#121314',
|
|
12
|
-
// ⭐ 모든
|
|
11
|
+
background: '#121314', // 터미널 다크 블랙 배경
|
|
12
|
+
// ⭐ 모든 요소의 폰트 크기, 패딩, 높이 기준을 부모 레벨에서 완벽히 통일
|
|
13
13
|
fontFamily: 'Consolas, Monaco, "Courier New", monospace',
|
|
14
|
+
fontSize: '14px',
|
|
15
|
+
lineHeight: '1.6', // 줄간격을 터미널 배시 화면 비율(1.6)로 고정
|
|
16
|
+
color: '#999', // 기본 텍스트 색상 #999 적용
|
|
14
17
|
textAlign: 'left',
|
|
15
18
|
boxShadow: '0 4px 12px rgba(0,0,0,0.3)',
|
|
16
|
-
|
|
17
|
-
// 내부 라인들을 인라인 텍스트 흐름처럼 촘촘하게 쌓기 위해 flex 간격 조정
|
|
18
|
-
display: 'flex',
|
|
19
|
-
flexDirection: 'column',
|
|
20
|
-
gap: '10px', // 줄간 간격을 10px로 타이트하게 조여 터미널 감성 극대화
|
|
21
|
-
lineHeight: '1.2' // 모든 라인의 글자 높이 기준 통일
|
|
19
|
+
boxSizing: 'border-box'
|
|
22
20
|
},
|
|
21
|
+
// 1. 모든 라인의 display 형식을 'block'으로 맞추고 마진/패딩을 0으로 통일
|
|
23
22
|
systemError: {
|
|
24
|
-
color: '#999',
|
|
23
|
+
color: '#999',
|
|
25
24
|
fontWeight: 'bold',
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
padding: '0'
|
|
25
|
+
margin: '0',
|
|
26
|
+
padding: '0',
|
|
27
|
+
display: 'block'
|
|
30
28
|
},
|
|
29
|
+
// 2. 에러 본문 텍스트도 불필요한 속성을 다 버리고 일반 라인과 똑같이 흐르게 교정
|
|
31
30
|
pre: {
|
|
32
31
|
background: 'transparent',
|
|
33
|
-
color: '#666',
|
|
32
|
+
color: '#666', // aa is not defined는 요청하신 #666 적용
|
|
34
33
|
padding: '0',
|
|
35
|
-
margin: '0',
|
|
34
|
+
margin: '0',
|
|
36
35
|
border: 'none',
|
|
37
36
|
overflowX: 'auto',
|
|
38
37
|
whiteSpace: 'pre-wrap',
|
|
39
|
-
fontFamily: '
|
|
40
|
-
fontSize: '
|
|
38
|
+
fontFamily: 'inherit', // 부모 폰트 그대로 상속
|
|
39
|
+
fontSize: 'inherit', // 부모 크기 그대로 상속
|
|
41
40
|
display: 'block'
|
|
42
41
|
},
|
|
42
|
+
// 3. 에러 위치 추적 라인
|
|
43
|
+
locationRow: {
|
|
44
|
+
color: '#666',
|
|
45
|
+
margin: '0',
|
|
46
|
+
padding: '0',
|
|
47
|
+
display: 'block'
|
|
48
|
+
},
|
|
49
|
+
// 4. 하단 영역의 flex와 gap을 완전히 제거하여 줄간격 왜곡 원천 차단
|
|
43
50
|
footer: {
|
|
44
|
-
fontSize: '14px',
|
|
45
|
-
color: '#999',
|
|
46
51
|
margin: '0',
|
|
47
52
|
padding: '0',
|
|
48
|
-
display: '
|
|
49
|
-
flexDirection: 'column',
|
|
50
|
-
gap: '10px' // 후속 로그가 찍힐 때도 동일한 간격 유지
|
|
53
|
+
display: 'block'
|
|
51
54
|
},
|
|
52
55
|
promptRow: {
|
|
53
56
|
margin: '0',
|
|
54
57
|
padding: '0',
|
|
55
58
|
display: 'block',
|
|
56
|
-
color: '#999'
|
|
59
|
+
color: '#999'
|
|
57
60
|
},
|
|
58
61
|
cliLink: {
|
|
59
|
-
color: '#38A169',
|
|
60
|
-
padding: '0
|
|
61
|
-
fontFamily: '
|
|
62
|
-
fontSize: '
|
|
62
|
+
color: '#38A169', // y 링크 터미널 그린
|
|
63
|
+
padding: '0',
|
|
64
|
+
fontFamily: 'inherit',
|
|
65
|
+
fontSize: 'inherit',
|
|
63
66
|
fontWeight: 'bold',
|
|
64
67
|
cursor: 'pointer',
|
|
65
68
|
textDecoration: 'underline',
|
|
@@ -154,14 +157,11 @@ export class NineExceptionHook extends React.Component {
|
|
|
154
157
|
const errorMessage = this.state.error?.message || String(this.state.error);
|
|
155
158
|
const customStyles = this.props.styles || {};
|
|
156
159
|
|
|
157
|
-
// 🔍 React 컴포넌트 스택에서 파일명과 라인 번호
|
|
160
|
+
// 🔍 React 컴포넌트 스택에서 파일명과 라인 번호 추출
|
|
158
161
|
let errorLocation = '';
|
|
159
162
|
if (this.state.errorInfo?.componentStack) {
|
|
160
|
-
// 스택 트레이스 문자열에서 실제 파일 경로가 포함된 첫 줄을 타겟팅합니다.
|
|
161
163
|
const lines = this.state.errorInfo.componentStack.trim().split('\n');
|
|
162
164
|
const targetLine = lines[0] || '';
|
|
163
|
-
|
|
164
|
-
// 정규식을 이용해 파일명과 라인 번호 정제 (예: at UserList (at users.js:42) -> UserList (users.js:42))
|
|
165
165
|
const match = targetLine.match(/at\s+(\w+)\s+\((.*)\)/) || targetLine.match(/at\s+(.*)/);
|
|
166
166
|
if (match) {
|
|
167
167
|
errorLocation = match[2] ? `${match[1]} (${match[2]})` : match[1];
|
|
@@ -176,24 +176,24 @@ export class NineExceptionHook extends React.Component {
|
|
|
176
176
|
style: { ...NineExceptionStyles.container, ...customStyles.container, ...this.props.containerStyle }
|
|
177
177
|
},
|
|
178
178
|
|
|
179
|
-
// 1.
|
|
179
|
+
// 1. [SYSTEM] 라인
|
|
180
180
|
React.createElement(
|
|
181
181
|
'div',
|
|
182
182
|
{ style: { ...NineExceptionStyles.systemError, ...customStyles.systemError } },
|
|
183
183
|
'[SYSTEM] COMPONENT RENDER ERROR DETECTED'
|
|
184
184
|
),
|
|
185
185
|
|
|
186
|
-
// 2.
|
|
186
|
+
// 2. aa is not defined 라인
|
|
187
187
|
React.createElement('pre', { style: { ...NineExceptionStyles.pre, ...customStyles.pre } }, errorMessage),
|
|
188
188
|
|
|
189
|
-
//
|
|
189
|
+
// 3. at MemberUsers 라인
|
|
190
190
|
errorLocation && React.createElement(
|
|
191
191
|
'div',
|
|
192
|
-
{ style: {
|
|
192
|
+
{ style: { ...NineExceptionStyles.locationRow, ...customStyles.locationRow } },
|
|
193
193
|
` at ${errorLocation}`
|
|
194
194
|
),
|
|
195
195
|
|
|
196
|
-
// 4. CLI 프롬프트 영역
|
|
196
|
+
// 4. CLI 프롬프트 및 후속 결과 라인 영역
|
|
197
197
|
React.createElement(
|
|
198
198
|
'div',
|
|
199
199
|
{ style: { ...NineExceptionStyles.footer, ...customStyles.footer } },
|
|
@@ -213,17 +213,18 @@ export class NineExceptionHook extends React.Component {
|
|
|
213
213
|
React.createElement('span', null, '/n)?')
|
|
214
214
|
),
|
|
215
215
|
|
|
216
|
+
// display: 'block'과 margin/padding 0을 주어 다른 라인들과 오차 없이 간격을 맞춤
|
|
216
217
|
this.state.reportStatus === 'sending' && React.createElement(
|
|
217
218
|
'div',
|
|
218
|
-
{ style: { color: '#ED8936', margin: '0',
|
|
219
|
+
{ style: { color: '#ED8936', margin: '0', padding: '0', display: 'block' } },
|
|
219
220
|
'>> Connecting to Control Tower... Sending payload.'
|
|
220
221
|
),
|
|
221
222
|
|
|
222
223
|
this.state.reportStatus === 'success' && React.createElement(
|
|
223
224
|
'div',
|
|
224
|
-
{ style: {
|
|
225
|
-
React.createElement('div', { style: { color: '#38A169', fontWeight: 'bold',
|
|
226
|
-
React.createElement('div', { style: { color: '#A0AEC0', fontStyle: 'italic', fontSize: '13px',
|
|
225
|
+
{ style: { margin: '0', padding: '0', display: 'block' } },
|
|
226
|
+
React.createElement('div', { style: { color: '#38A169', fontWeight: 'bold', display: 'block', margin: '0' } }, '>> Transmit complete. Core engine initialized.'),
|
|
227
|
+
React.createElement('div', { style: { color: '#A0AEC0', fontStyle: 'italic', fontSize: '13px', display: 'block', margin: '4px 0 0 0' } }, 'AI가 소스 코드를 재수정하는 동안 잠시만 기다려주세요...')
|
|
227
228
|
)
|
|
228
229
|
)
|
|
229
230
|
);
|