@nine-lab/nine-mu 0.1.347 → 0.1.349
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 +129 -37
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +3 -3
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/exception/ExceptionHook.js +123 -33
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.348"}/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.348"}/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.348"}/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.348"}/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.348"}/dist/css/nine-mu.css";
|
|
44371
44371
|
${customImport}
|
|
44372
44372
|
</style>
|
|
44373
44373
|
|
|
@@ -44465,21 +44465,92 @@ if (!customElements.get("nine-chat-ing")) {
|
|
|
44465
44465
|
if (!customElements.get("nine-chat-progress")) {
|
|
44466
44466
|
customElements.define("nine-chat-progress", ProgressMessage);
|
|
44467
44467
|
}
|
|
44468
|
+
const NineExceptionStyles = {
|
|
44469
|
+
container: {
|
|
44470
|
+
padding: "30px",
|
|
44471
|
+
margin: "20px",
|
|
44472
|
+
background: "#121314",
|
|
44473
|
+
// 터미널 다크 블랙 배경
|
|
44474
|
+
border: "1px solid #343A40",
|
|
44475
|
+
// 소프트한 메탈릭 테두리
|
|
44476
|
+
borderRadius: "6px",
|
|
44477
|
+
fontFamily: 'Consolas, Monaco, "Courier New", monospace',
|
|
44478
|
+
// 터미널 고정폭 글꼴 우선
|
|
44479
|
+
textAlign: "left",
|
|
44480
|
+
boxShadow: "0 4px 12px rgba(0,0,0,0.3)"
|
|
44481
|
+
// 터미널 윈도우 입체감
|
|
44482
|
+
},
|
|
44483
|
+
title: {
|
|
44484
|
+
color: "#FFFFFF",
|
|
44485
|
+
// 화이트 타이틀
|
|
44486
|
+
marginTop: 0,
|
|
44487
|
+
fontSize: "16px",
|
|
44488
|
+
fontWeight: "600",
|
|
44489
|
+
display: "flex",
|
|
44490
|
+
alignItems: "center",
|
|
44491
|
+
gap: "8px",
|
|
44492
|
+
borderBottom: "1px solid #2D3139",
|
|
44493
|
+
// 상단 바 구분선 느낌
|
|
44494
|
+
paddingBottom: "12px"
|
|
44495
|
+
},
|
|
44496
|
+
label: {
|
|
44497
|
+
margin: "15px 0 8px 0",
|
|
44498
|
+
fontWeight: "bold",
|
|
44499
|
+
color: "#A0AEC0",
|
|
44500
|
+
// 프롬프트 서브 텍스트 (연한 그레이)
|
|
44501
|
+
fontSize: "13px"
|
|
44502
|
+
},
|
|
44503
|
+
pre: {
|
|
44504
|
+
background: "#1A1C1E",
|
|
44505
|
+
// 코드 블록 내부의 살짝 더 깊은 블랙
|
|
44506
|
+
color: "#F8F9FA",
|
|
44507
|
+
// 에러 로그 화이트 출력
|
|
44508
|
+
padding: "15px",
|
|
44509
|
+
borderRadius: "4px",
|
|
44510
|
+
border: "1px solid #2A2D30",
|
|
44511
|
+
overflowX: "auto",
|
|
44512
|
+
whiteSpace: "pre-wrap",
|
|
44513
|
+
fontFamily: "Consolas, Monaco, monospace",
|
|
44514
|
+
fontSize: "13px",
|
|
44515
|
+
lineHeight: "1.5"
|
|
44516
|
+
},
|
|
44517
|
+
footer: {
|
|
44518
|
+
marginTop: "20px",
|
|
44519
|
+
fontSize: "13px",
|
|
44520
|
+
color: "#718096",
|
|
44521
|
+
display: "flex",
|
|
44522
|
+
flexDirection: "column",
|
|
44523
|
+
gap: "10px"
|
|
44524
|
+
},
|
|
44525
|
+
button: {
|
|
44526
|
+
padding: "10px 16px",
|
|
44527
|
+
background: "#E53E3E",
|
|
44528
|
+
// 버튼의 고유 아이덴티티 유지 (레드)
|
|
44529
|
+
color: "#FFFFFF",
|
|
44530
|
+
border: "none",
|
|
44531
|
+
borderRadius: "4px",
|
|
44532
|
+
cursor: "pointer",
|
|
44533
|
+
fontWeight: "bold",
|
|
44534
|
+
fontSize: "13px",
|
|
44535
|
+
alignSelf: "flex-start",
|
|
44536
|
+
transition: "background 0.2s",
|
|
44537
|
+
fontFamily: "sans-serif"
|
|
44538
|
+
// 버튼 텍스트는 일반 폰트로 가독성 확보
|
|
44539
|
+
}
|
|
44540
|
+
};
|
|
44468
44541
|
class NineExceptionHook extends React.Component {
|
|
44469
44542
|
constructor(props) {
|
|
44470
44543
|
super(props);
|
|
44471
|
-
this.state = { hasError: false, error: null };
|
|
44544
|
+
this.state = { hasError: false, error: null, reportStatus: "idle" };
|
|
44472
44545
|
this.lastPath = window.location.pathname;
|
|
44473
44546
|
this.handleLocationChange = this.handleLocationChange.bind(this);
|
|
44547
|
+
this.handleReport = this.handleReport.bind(this);
|
|
44474
44548
|
}
|
|
44475
44549
|
static getDerivedStateFromError(error) {
|
|
44476
|
-
return { hasError: true, error };
|
|
44550
|
+
return { hasError: true, error, reportStatus: "idle" };
|
|
44477
44551
|
}
|
|
44478
44552
|
componentDidCatch(error, errorInfo) {
|
|
44479
44553
|
console.error("🚨 [Nine-Library] 본문 렌더링 에러 포착:", error);
|
|
44480
|
-
if (window.triggerAutoRecovery) {
|
|
44481
|
-
window.triggerAutoRecovery(error.message || String(error));
|
|
44482
|
-
}
|
|
44483
44554
|
if (this.props.onCatch) {
|
|
44484
44555
|
this.props.onCatch(error, errorInfo);
|
|
44485
44556
|
}
|
|
@@ -44495,12 +44566,26 @@ class NineExceptionHook extends React.Component {
|
|
|
44495
44566
|
handleLocationChange() {
|
|
44496
44567
|
setTimeout(() => {
|
|
44497
44568
|
if (this.state.hasError && this.lastPath !== window.location.pathname) {
|
|
44498
|
-
console.log("
|
|
44569
|
+
console.log("[Nine-Library] 페이지 주소 변경 감지 -> 리액트 에러 상태 초기화");
|
|
44499
44570
|
this.lastPath = window.location.pathname;
|
|
44500
|
-
this.setState({ hasError: false, error: null });
|
|
44571
|
+
this.setState({ hasError: false, error: null, reportStatus: "idle" });
|
|
44501
44572
|
}
|
|
44502
44573
|
}, 10);
|
|
44503
44574
|
}
|
|
44575
|
+
handleReport() {
|
|
44576
|
+
var _a2;
|
|
44577
|
+
if (this.state.reportStatus !== "idle") return;
|
|
44578
|
+
this.setState({ reportStatus: "sending" });
|
|
44579
|
+
const errorMessage = ((_a2 = this.state.error) == null ? void 0 : _a2.message) || String(this.state.error);
|
|
44580
|
+
setTimeout(() => {
|
|
44581
|
+
if (window.triggerAutoRecovery) {
|
|
44582
|
+
window.triggerAutoRecovery(errorMessage);
|
|
44583
|
+
} else {
|
|
44584
|
+
console.warn("[Nine-Library] window.triggerAutoRecovery 가 정의되지 않았습니다.");
|
|
44585
|
+
}
|
|
44586
|
+
this.setState({ reportStatus: "success" });
|
|
44587
|
+
}, 500);
|
|
44588
|
+
}
|
|
44504
44589
|
render() {
|
|
44505
44590
|
var _a2;
|
|
44506
44591
|
if (this.state.hasError) {
|
|
@@ -44508,41 +44593,48 @@ class NineExceptionHook extends React.Component {
|
|
|
44508
44593
|
return this.props.fallback(this.state.error);
|
|
44509
44594
|
}
|
|
44510
44595
|
const errorMessage = ((_a2 = this.state.error) == null ? void 0 : _a2.message) || String(this.state.error);
|
|
44596
|
+
const customStyles = this.props.styles || {};
|
|
44597
|
+
let buttonText = "🚀 관제탑에 에러 피드백 전송하기";
|
|
44598
|
+
if (this.state.reportStatus === "sending") buttonText = "⏳ 관제탑 연락 중...";
|
|
44599
|
+
if (this.state.reportStatus === "success") buttonText = "✅ 전송 완료! AI 분석 시작";
|
|
44511
44600
|
return React.createElement(
|
|
44512
44601
|
"div",
|
|
44513
44602
|
{
|
|
44514
|
-
style: {
|
|
44515
|
-
padding: "30px",
|
|
44516
|
-
margin: "20px",
|
|
44517
|
-
background: "#FFF5F5",
|
|
44518
|
-
border: "1px solid #FEB2B2",
|
|
44519
|
-
borderRadius: "8px",
|
|
44520
|
-
fontFamily: "sans-serif",
|
|
44521
|
-
textAlign: "left",
|
|
44522
|
-
...this.props.containerStyle
|
|
44523
|
-
}
|
|
44603
|
+
style: { ...NineExceptionStyles.container, ...customStyles.container, ...this.props.containerStyle }
|
|
44524
44604
|
},
|
|
44525
|
-
React.createElement("h3", { style: {
|
|
44526
|
-
React.createElement("p", { style: {
|
|
44527
|
-
React.createElement("pre", {
|
|
44528
|
-
|
|
44529
|
-
|
|
44530
|
-
|
|
44531
|
-
|
|
44532
|
-
|
|
44533
|
-
|
|
44534
|
-
|
|
44535
|
-
|
|
44536
|
-
|
|
44537
|
-
|
|
44538
|
-
|
|
44605
|
+
React.createElement("h3", { style: { ...NineExceptionStyles.title, ...customStyles.title } }, "🤖 [SYSTEM] COMPONENT RENDER ERROR DETECTED"),
|
|
44606
|
+
React.createElement("p", { style: { ...NineExceptionStyles.label, ...customStyles.label } }, "$ cat error.log"),
|
|
44607
|
+
React.createElement("pre", { style: { ...NineExceptionStyles.pre, ...customStyles.pre } }, errorMessage),
|
|
44608
|
+
React.createElement(
|
|
44609
|
+
"div",
|
|
44610
|
+
{ style: { ...NineExceptionStyles.footer, ...customStyles.footer } },
|
|
44611
|
+
React.createElement(
|
|
44612
|
+
"button",
|
|
44613
|
+
{
|
|
44614
|
+
style: {
|
|
44615
|
+
...NineExceptionStyles.button,
|
|
44616
|
+
...customStyles.button,
|
|
44617
|
+
backgroundColor: this.state.reportStatus === "success" ? "#38A169" : this.state.reportStatus === "sending" ? "#A0AEC0" : "#E53E3E",
|
|
44618
|
+
cursor: this.state.reportStatus === "idle" ? "pointer" : "not-allowed"
|
|
44619
|
+
},
|
|
44620
|
+
disabled: this.state.reportStatus !== "idle",
|
|
44621
|
+
onClick: this.handleReport
|
|
44622
|
+
},
|
|
44623
|
+
buttonText
|
|
44624
|
+
),
|
|
44625
|
+
this.state.reportStatus === "success" && React.createElement(
|
|
44626
|
+
"div",
|
|
44627
|
+
{ style: { color: "#CBD5E0", fontSize: "13px", marginTop: "5px", fontStyle: "italic" } },
|
|
44628
|
+
">> AI가 소스 코드를 재수정하는 동안 잠시만 기다려주세요..."
|
|
44629
|
+
)
|
|
44630
|
+
)
|
|
44539
44631
|
);
|
|
44540
44632
|
}
|
|
44541
44633
|
return this.props.children;
|
|
44542
44634
|
}
|
|
44543
44635
|
}
|
|
44544
44636
|
const NineMu = {
|
|
44545
|
-
version: "0.1.
|
|
44637
|
+
version: "0.1.348",
|
|
44546
44638
|
init: (config2) => {
|
|
44547
44639
|
trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
|
|
44548
44640
|
}
|