@nine-lab/nine-mu 0.1.351 → 0.1.352
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 +79 -72
- 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 +76 -83
package/dist/nine-mu.js
CHANGED
|
@@ -17538,7 +17538,7 @@ render_fn = function() {
|
|
|
17538
17538
|
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
17539
17539
|
this.shadowRoot.innerHTML = `
|
|
17540
17540
|
<style>
|
|
17541
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
17541
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.351"}/dist/css/nine-mu.css";
|
|
17542
17542
|
${customImport}
|
|
17543
17543
|
</style>
|
|
17544
17544
|
<div class="wrapper">
|
|
@@ -43788,7 +43788,7 @@ class NineDiff extends HTMLElement {
|
|
|
43788
43788
|
const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
|
|
43789
43789
|
this.shadowRoot.innerHTML = `
|
|
43790
43790
|
<style>
|
|
43791
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43791
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.351"}/dist/css/nine-mu.css";
|
|
43792
43792
|
${customImport}
|
|
43793
43793
|
</style>
|
|
43794
43794
|
|
|
@@ -43928,7 +43928,7 @@ renderScaffolding_fn = function() {
|
|
|
43928
43928
|
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
43929
43929
|
this.shadowRoot.innerHTML = `
|
|
43930
43930
|
<style>
|
|
43931
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43931
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.351"}/dist/css/nine-mu.css";
|
|
43932
43932
|
${customImport}
|
|
43933
43933
|
</style>
|
|
43934
43934
|
|
|
@@ -44037,7 +44037,7 @@ render_fn2 = function() {
|
|
|
44037
44037
|
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
44038
44038
|
this.shadowRoot.innerHTML = `
|
|
44039
44039
|
<style>
|
|
44040
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
44040
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.351"}/dist/css/nine-mu.css";
|
|
44041
44041
|
${customImport}
|
|
44042
44042
|
</style>
|
|
44043
44043
|
|
|
@@ -44367,7 +44367,7 @@ class ChatMessageBody extends HTMLElement {
|
|
|
44367
44367
|
const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
|
|
44368
44368
|
this.shadowRoot.innerHTML = `
|
|
44369
44369
|
<style>
|
|
44370
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
44370
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.351"}/dist/css/nine-mu.css";
|
|
44371
44371
|
${customImport}
|
|
44372
44372
|
</style>
|
|
44373
44373
|
|
|
@@ -44472,50 +44472,59 @@ const NineExceptionStyles = {
|
|
|
44472
44472
|
background: "#121314",
|
|
44473
44473
|
// 터미널 다크 블랙 배경
|
|
44474
44474
|
border: "1px solid #343A40",
|
|
44475
|
-
//
|
|
44475
|
+
// 외곽 메탈릭 테두리만 유지
|
|
44476
44476
|
borderRadius: "6px",
|
|
44477
44477
|
fontFamily: 'Consolas, Monaco, "Courier New", monospace',
|
|
44478
|
-
//
|
|
44478
|
+
// 완벽한 고정폭 서체
|
|
44479
44479
|
textAlign: "left",
|
|
44480
|
-
boxShadow: "0 4px 12px rgba(0,0,0,0.3)"
|
|
44481
|
-
|
|
44480
|
+
boxShadow: "0 4px 12px rgba(0,0,0,0.3)",
|
|
44481
|
+
lineHeight: "1.6"
|
|
44482
44482
|
},
|
|
44483
|
+
systemError: {
|
|
44484
|
+
color: "#E53E3E",
|
|
44485
|
+
// 강렬한 터미널 레드 Warning
|
|
44486
|
+
fontWeight: "bold",
|
|
44487
|
+
fontSize: "14px",
|
|
44488
|
+
margin: "0 0 10px 0",
|
|
44489
|
+
letterSpacing: "0.5px"
|
|
44490
|
+
},
|
|
44491
|
+
// 내부 테두리 박스를 완전히 제거하고 순수 텍스트만 출력되도록 수정
|
|
44483
44492
|
pre: {
|
|
44484
|
-
background: "
|
|
44485
|
-
// 코드 블록 내부의 살짝 더 깊은 블랙
|
|
44493
|
+
background: "transparent",
|
|
44486
44494
|
color: "#F8F9FA",
|
|
44487
|
-
|
|
44488
|
-
|
|
44489
|
-
|
|
44490
|
-
border: "1px solid #2A2D30",
|
|
44495
|
+
padding: "0",
|
|
44496
|
+
margin: "0 0 20px 0",
|
|
44497
|
+
border: "none",
|
|
44491
44498
|
overflowX: "auto",
|
|
44492
44499
|
whiteSpace: "pre-wrap",
|
|
44493
44500
|
fontFamily: "Consolas, Monaco, monospace",
|
|
44494
|
-
fontSize: "
|
|
44495
|
-
lineHeight: "1.5"
|
|
44501
|
+
fontSize: "14px"
|
|
44496
44502
|
},
|
|
44497
44503
|
footer: {
|
|
44498
|
-
|
|
44499
|
-
|
|
44500
|
-
color: "#718096",
|
|
44504
|
+
fontSize: "14px",
|
|
44505
|
+
color: "#E2E8F0",
|
|
44501
44506
|
display: "flex",
|
|
44502
44507
|
flexDirection: "column",
|
|
44508
|
+
gap: "8px"
|
|
44509
|
+
},
|
|
44510
|
+
promptRow: {
|
|
44511
|
+
display: "flex",
|
|
44512
|
+
alignItems: "center",
|
|
44503
44513
|
gap: "10px"
|
|
44504
44514
|
},
|
|
44505
|
-
|
|
44506
|
-
|
|
44507
|
-
background: "
|
|
44508
|
-
|
|
44509
|
-
|
|
44515
|
+
// 버튼을 없애고 터미널 선택지 [Y/n] 스타일의 상호작용 요소로 변경
|
|
44516
|
+
cliButton: {
|
|
44517
|
+
background: "transparent",
|
|
44518
|
+
color: "#38A169",
|
|
44519
|
+
// 터미널 그린 포인트
|
|
44510
44520
|
border: "none",
|
|
44511
|
-
|
|
44512
|
-
|
|
44521
|
+
padding: "0",
|
|
44522
|
+
fontFamily: "Consolas, Monaco, monospace",
|
|
44523
|
+
fontSize: "14px",
|
|
44513
44524
|
fontWeight: "bold",
|
|
44514
|
-
|
|
44515
|
-
|
|
44516
|
-
|
|
44517
|
-
fontFamily: "sans-serif"
|
|
44518
|
-
// 버튼 텍스트는 일반 폰트로 가독성 확보
|
|
44525
|
+
cursor: "pointer",
|
|
44526
|
+
textDecoration: "underline",
|
|
44527
|
+
textUnderlineOffset: "3px"
|
|
44519
44528
|
}
|
|
44520
44529
|
};
|
|
44521
44530
|
class NineExceptionHook extends React.Component {
|
|
@@ -44525,6 +44534,7 @@ class NineExceptionHook extends React.Component {
|
|
|
44525
44534
|
this.lastPath = window.location.pathname;
|
|
44526
44535
|
this.handleLocationChange = this.handleLocationChange.bind(this);
|
|
44527
44536
|
this.handleReport = this.handleReport.bind(this);
|
|
44537
|
+
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
44528
44538
|
}
|
|
44529
44539
|
static getDerivedStateFromError(error) {
|
|
44530
44540
|
return { hasError: true, error, reportStatus: "idle" };
|
|
@@ -44538,15 +44548,26 @@ class NineExceptionHook extends React.Component {
|
|
|
44538
44548
|
componentDidMount() {
|
|
44539
44549
|
window.addEventListener("popstate", this.handleLocationChange);
|
|
44540
44550
|
document.addEventListener("click", this.handleLocationChange, true);
|
|
44551
|
+
window.addEventListener("keydown", this.handleKeyDown);
|
|
44541
44552
|
}
|
|
44542
44553
|
componentWillUnmount() {
|
|
44543
44554
|
window.removeEventListener("popstate", this.handleLocationChange);
|
|
44544
44555
|
document.removeEventListener("click", this.handleLocationChange, true);
|
|
44556
|
+
window.removeEventListener("keydown", this.handleKeyDown);
|
|
44557
|
+
}
|
|
44558
|
+
// 실제 사용자가 키보드로 'Y' 또는 'y'를 누르면 마우스 클릭과 동일하게 관제탑 전송 실행
|
|
44559
|
+
handleKeyDown(e) {
|
|
44560
|
+
if (this.state.hasError && this.state.reportStatus === "idle") {
|
|
44561
|
+
if (e.key === "y" || e.key === "Y") {
|
|
44562
|
+
e.preventDefault();
|
|
44563
|
+
this.handleReport();
|
|
44564
|
+
}
|
|
44565
|
+
}
|
|
44545
44566
|
}
|
|
44546
44567
|
handleLocationChange() {
|
|
44547
44568
|
setTimeout(() => {
|
|
44548
44569
|
if (this.state.hasError && this.lastPath !== window.location.pathname) {
|
|
44549
|
-
console.log("[Nine-Library] 페이지 주소 변경 감지 ->
|
|
44570
|
+
console.log("[Nine-Library] 페이지 주소 변경 감지 -> 에러 상태 초기화");
|
|
44550
44571
|
this.lastPath = window.location.pathname;
|
|
44551
44572
|
this.setState({ hasError: false, error: null, reportStatus: "idle" });
|
|
44552
44573
|
}
|
|
@@ -44564,7 +44585,7 @@ class NineExceptionHook extends React.Component {
|
|
|
44564
44585
|
console.warn("[Nine-Library] window.triggerAutoRecovery 가 정의되지 않았습니다.");
|
|
44565
44586
|
}
|
|
44566
44587
|
this.setState({ reportStatus: "success" });
|
|
44567
|
-
},
|
|
44588
|
+
}, 600);
|
|
44568
44589
|
}
|
|
44569
44590
|
render() {
|
|
44570
44591
|
var _a2;
|
|
@@ -44574,60 +44595,46 @@ class NineExceptionHook extends React.Component {
|
|
|
44574
44595
|
}
|
|
44575
44596
|
const errorMessage = ((_a2 = this.state.error) == null ? void 0 : _a2.message) || String(this.state.error);
|
|
44576
44597
|
const customStyles = this.props.styles || {};
|
|
44577
|
-
let buttonText = "🚀 관제탑에 에러 피드백 전송하기";
|
|
44578
|
-
if (this.state.reportStatus === "sending") buttonText = "⏳ 관제탑 연락 중...";
|
|
44579
|
-
if (this.state.reportStatus === "success") buttonText = "✅ 전송 완료! AI 분석 시작";
|
|
44580
44598
|
return React.createElement(
|
|
44581
44599
|
"div",
|
|
44582
44600
|
{
|
|
44583
44601
|
style: { ...NineExceptionStyles.container, ...customStyles.container, ...this.props.containerStyle }
|
|
44584
44602
|
},
|
|
44585
|
-
|
|
44586
|
-
// 1. 상단 프롬프트 헤더 (시스템 상태 알림)
|
|
44587
|
-
React.createElement(
|
|
44588
|
-
'div',
|
|
44589
|
-
{ style: { ...NineExceptionStyles.title, ...customStyles.title } },
|
|
44590
|
-
React.createElement('span', { style: { color: '#38A169', marginRight: '5px' } }, 'nandoo@nine-mu:~$'),
|
|
44591
|
-
'./system-check --status'
|
|
44592
|
-
), */
|
|
44593
|
-
// 2. 시스템 에러 감지 출력 로그
|
|
44603
|
+
// 1. 에러 감지 시스템 로그 (레드)
|
|
44594
44604
|
React.createElement(
|
|
44595
44605
|
"div",
|
|
44596
|
-
{ style: {
|
|
44606
|
+
{ style: { ...NineExceptionStyles.systemError, ...customStyles.systemError } },
|
|
44597
44607
|
"[SYSTEM] COMPONENT RENDER ERROR DETECTED"
|
|
44598
44608
|
),
|
|
44599
|
-
|
|
44600
|
-
// 3. 명령어 입력 시뮬레이션 ($ cat error.log)
|
|
44601
|
-
React.createElement(
|
|
44602
|
-
'p',
|
|
44603
|
-
{ style: { ...NineExceptionStyles.label, ...customStyles.label } },
|
|
44604
|
-
React.createElement('span', { style: { color: '#3182CE', marginRight: '6px' } }, 'nandoo@nine-mu:~$'),
|
|
44605
|
-
'cat error.log'
|
|
44606
|
-
), */
|
|
44607
|
-
// 4. 에러 내용 본문 박스
|
|
44609
|
+
// 2. 에러 상세 원인 (박스 없는 순수 텍스트 출력)
|
|
44608
44610
|
React.createElement("pre", { style: { ...NineExceptionStyles.pre, ...customStyles.pre } }, errorMessage),
|
|
44609
|
-
//
|
|
44611
|
+
// 3. CLI 양방향 인터페이스 (y/n 프롬프트)
|
|
44610
44612
|
React.createElement(
|
|
44611
44613
|
"div",
|
|
44612
44614
|
{ style: { ...NineExceptionStyles.footer, ...customStyles.footer } },
|
|
44613
|
-
React.createElement(
|
|
44614
|
-
"
|
|
44615
|
-
{
|
|
44616
|
-
|
|
44617
|
-
|
|
44618
|
-
|
|
44619
|
-
|
|
44620
|
-
|
|
44615
|
+
this.state.reportStatus === "idle" && React.createElement(
|
|
44616
|
+
"div",
|
|
44617
|
+
{ style: NineExceptionStyles.promptRow },
|
|
44618
|
+
React.createElement("span", null, "Send error log to Control Tower (y/n)? "),
|
|
44619
|
+
React.createElement(
|
|
44620
|
+
"button",
|
|
44621
|
+
{
|
|
44622
|
+
style: { ...NineExceptionStyles.cliButton, ...customStyles.cliButton },
|
|
44623
|
+
onClick: this.handleReport
|
|
44621
44624
|
},
|
|
44622
|
-
|
|
44623
|
-
|
|
44624
|
-
|
|
44625
|
-
|
|
44625
|
+
"[Y]"
|
|
44626
|
+
)
|
|
44627
|
+
),
|
|
44628
|
+
this.state.reportStatus === "sending" && React.createElement(
|
|
44629
|
+
"div",
|
|
44630
|
+
{ style: { color: "#ED8936" } },
|
|
44631
|
+
">> Connecting to Control Tower... Sending payload."
|
|
44626
44632
|
),
|
|
44627
44633
|
this.state.reportStatus === "success" && React.createElement(
|
|
44628
44634
|
"div",
|
|
44629
|
-
{ style: {
|
|
44630
|
-
"
|
|
44635
|
+
{ style: { display: "flex", flexDirection: "column", gap: "4px" } },
|
|
44636
|
+
React.createElement("div", { style: { color: "#38A169", fontWeight: "bold" } }, ">> Transmit complete. Core engine initialized."),
|
|
44637
|
+
React.createElement("div", { style: { color: "#A0AEC0", fontStyle: "italic", fontSize: "13px" } }, "AI가 소스 코드를 재수정하는 동안 잠시만 기다려주세요...")
|
|
44631
44638
|
)
|
|
44632
44639
|
)
|
|
44633
44640
|
);
|
|
@@ -44636,7 +44643,7 @@ class NineExceptionHook extends React.Component {
|
|
|
44636
44643
|
}
|
|
44637
44644
|
}
|
|
44638
44645
|
const NineMu = {
|
|
44639
|
-
version: "0.1.
|
|
44646
|
+
version: "0.1.351",
|
|
44640
44647
|
init: (config2) => {
|
|
44641
44648
|
trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
|
|
44642
44649
|
}
|