@nine-lab/nine-mu 0.1.352 → 0.1.354
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 +37 -35
- 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 +31 -32
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
// ==========================================
|
|
4
|
-
// 1.
|
|
4
|
+
// 1. 터미널 프롬프트 테마 스타일 (픽셀 단위 정밀 제어)
|
|
5
5
|
// ==========================================
|
|
6
6
|
export const NineExceptionStyles = {
|
|
7
7
|
container: {
|
|
8
|
-
padding: '
|
|
8
|
+
padding: '25px',
|
|
9
9
|
margin: '20px',
|
|
10
10
|
background: '#121314', // 터미널 다크 블랙 배경
|
|
11
|
-
border: '1px solid #343A40', // 외곽
|
|
11
|
+
border: '1px solid #343A40', // 외곽 테두리
|
|
12
12
|
borderRadius: '6px',
|
|
13
|
-
fontFamily: 'Consolas, Monaco, "Courier New", monospace',
|
|
13
|
+
fontFamily: 'Consolas, Monaco, "Courier New", monospace',
|
|
14
14
|
textAlign: 'left',
|
|
15
15
|
boxShadow: '0 4px 12px rgba(0,0,0,0.3)',
|
|
16
|
-
lineHeight: '1.
|
|
16
|
+
lineHeight: '1.2' // 기본 줄높이를 고정하여 서체 왜곡 방지
|
|
17
17
|
},
|
|
18
18
|
systemError: {
|
|
19
|
-
color: '#E53E3E', //
|
|
19
|
+
color: '#E53E3E', // 터미널 레드 Warning
|
|
20
20
|
fontWeight: 'bold',
|
|
21
21
|
fontSize: '14px',
|
|
22
|
-
margin: '0 0
|
|
23
|
-
letterSpacing: '0.5px'
|
|
22
|
+
margin: '0 0 12px 0', // ⭐ 첫 번째 줄 아래 여백 (12px)
|
|
23
|
+
letterSpacing: '0.5px',
|
|
24
|
+
padding: '0'
|
|
24
25
|
},
|
|
25
|
-
// 내부 테두리 박스를 완전히 제거하고 순수 텍스트만 출력되도록 수정
|
|
26
26
|
pre: {
|
|
27
27
|
background: 'transparent',
|
|
28
28
|
color: '#F8F9FA',
|
|
29
29
|
padding: '0',
|
|
30
|
-
margin: '0 0
|
|
30
|
+
margin: '0 0 12px 0', // ⭐ 브라우저 기본 마진을 지우고 정확히 하단 여백 12px 강제
|
|
31
31
|
border: 'none',
|
|
32
32
|
overflowX: 'auto',
|
|
33
33
|
whiteSpace: 'pre-wrap',
|
|
@@ -37,20 +37,19 @@ export const NineExceptionStyles = {
|
|
|
37
37
|
footer: {
|
|
38
38
|
fontSize: '14px',
|
|
39
39
|
color: '#E2E8F0',
|
|
40
|
+
margin: '0',
|
|
41
|
+
padding: '0',
|
|
40
42
|
display: 'flex',
|
|
41
43
|
flexDirection: 'column',
|
|
42
|
-
gap: '
|
|
44
|
+
gap: '12px' // ⭐ 상태 메시지들 간의 간격도 12px로 통일
|
|
43
45
|
},
|
|
44
46
|
promptRow: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
margin: '0',
|
|
48
|
+
padding: '0',
|
|
49
|
+
display: 'block'
|
|
48
50
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
background: 'transparent',
|
|
52
|
-
color: '#38A169', // 터미널 그린 포인트
|
|
53
|
-
border: 'none',
|
|
51
|
+
cliLink: {
|
|
52
|
+
color: '#38A169', // 터미널 그린
|
|
54
53
|
padding: '0',
|
|
55
54
|
fontFamily: 'Consolas, Monaco, monospace',
|
|
56
55
|
fontSize: '14px',
|
|
@@ -62,7 +61,7 @@ export const NineExceptionStyles = {
|
|
|
62
61
|
};
|
|
63
62
|
|
|
64
63
|
// ==========================================
|
|
65
|
-
// 2. 컴포넌트 본문
|
|
64
|
+
// 2. 컴포넌트 본문
|
|
66
65
|
// ==========================================
|
|
67
66
|
export class NineExceptionHook extends React.Component {
|
|
68
67
|
|
|
@@ -89,7 +88,7 @@ export class NineExceptionHook extends React.Component {
|
|
|
89
88
|
componentDidMount() {
|
|
90
89
|
window.addEventListener('popstate', this.handleLocationChange);
|
|
91
90
|
document.addEventListener('click', this.handleLocationChange, true);
|
|
92
|
-
window.addEventListener('keydown', this.handleKeyDown);
|
|
91
|
+
window.addEventListener('keydown', this.handleKeyDown);
|
|
93
92
|
}
|
|
94
93
|
|
|
95
94
|
componentWillUnmount() {
|
|
@@ -98,7 +97,6 @@ export class NineExceptionHook extends React.Component {
|
|
|
98
97
|
window.removeEventListener('keydown', this.handleKeyDown);
|
|
99
98
|
}
|
|
100
99
|
|
|
101
|
-
// 실제 사용자가 키보드로 'Y' 또는 'y'를 누르면 마우스 클릭과 동일하게 관제탑 전송 실행
|
|
102
100
|
handleKeyDown(e) {
|
|
103
101
|
if (this.state.hasError && this.state.reportStatus === 'idle') {
|
|
104
102
|
if (e.key === 'y' || e.key === 'Y') {
|
|
@@ -149,17 +147,17 @@ export class NineExceptionHook extends React.Component {
|
|
|
149
147
|
style: { ...NineExceptionStyles.container, ...customStyles.container, ...this.props.containerStyle }
|
|
150
148
|
},
|
|
151
149
|
|
|
152
|
-
// 1. 에러 감지
|
|
150
|
+
// 1. 에러 감지 로그
|
|
153
151
|
React.createElement(
|
|
154
152
|
'div',
|
|
155
153
|
{ style: { ...NineExceptionStyles.systemError, ...customStyles.systemError } },
|
|
156
154
|
'[SYSTEM] COMPONENT RENDER ERROR DETECTED'
|
|
157
155
|
),
|
|
158
156
|
|
|
159
|
-
// 2. 에러
|
|
157
|
+
// 2. 에러 내용
|
|
160
158
|
React.createElement('pre', { style: { ...NineExceptionStyles.pre, ...customStyles.pre } }, errorMessage),
|
|
161
159
|
|
|
162
|
-
// 3. CLI
|
|
160
|
+
// 3. CLI 프롬프트 영역
|
|
163
161
|
React.createElement(
|
|
164
162
|
'div',
|
|
165
163
|
{ style: { ...NineExceptionStyles.footer, ...customStyles.footer } },
|
|
@@ -167,26 +165,27 @@ export class NineExceptionHook extends React.Component {
|
|
|
167
165
|
this.state.reportStatus === 'idle' && React.createElement(
|
|
168
166
|
'div',
|
|
169
167
|
{ style: NineExceptionStyles.promptRow },
|
|
170
|
-
React.createElement('span', null, 'Send error log to Control Tower (
|
|
168
|
+
React.createElement('span', null, 'Send error log to Control Tower ('),
|
|
171
169
|
React.createElement(
|
|
172
|
-
'
|
|
170
|
+
'span',
|
|
173
171
|
{
|
|
174
|
-
style: { ...NineExceptionStyles.
|
|
172
|
+
style: { ...NineExceptionStyles.cliLink, ...customStyles.cliLink },
|
|
175
173
|
onClick: this.handleReport
|
|
176
174
|
},
|
|
177
|
-
'
|
|
178
|
-
)
|
|
175
|
+
'y'
|
|
176
|
+
),
|
|
177
|
+
React.createElement('span', null, '/n)?')
|
|
179
178
|
),
|
|
180
179
|
|
|
181
180
|
this.state.reportStatus === 'sending' && React.createElement(
|
|
182
181
|
'div',
|
|
183
|
-
{ style: { color: '#ED8936' } },
|
|
182
|
+
{ style: { color: '#ED8936', margin: '0' } },
|
|
184
183
|
'>> Connecting to Control Tower... Sending payload.'
|
|
185
184
|
),
|
|
186
185
|
|
|
187
186
|
this.state.reportStatus === 'success' && React.createElement(
|
|
188
187
|
'div',
|
|
189
|
-
{ style: { display: 'flex', flexDirection: 'column', gap: '
|
|
188
|
+
{ style: { display: 'flex', flexDirection: 'column', gap: '12px', margin: '0' } },
|
|
190
189
|
React.createElement('div', { style: { color: '#38A169', fontWeight: 'bold' } }, '>> Transmit complete. Core engine initialized.'),
|
|
191
190
|
React.createElement('div', { style: { color: '#A0AEC0', fontStyle: 'italic', fontSize: '13px' } }, 'AI가 소스 코드를 재수정하는 동안 잠시만 기다려주세요...')
|
|
192
191
|
)
|