@nine-lab/nine-mu 0.1.227 → 0.1.228
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 +14 -12
- 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/NineChat.js +17 -4
- package/src/components/NineChatManager.js +1 -1
package/package.json
CHANGED
|
@@ -8,7 +8,6 @@ import { WebSocketClientTransport } from "@modelcontextprotocol/sdk/client/webso
|
|
|
8
8
|
export class NineChat extends HTMLElement {
|
|
9
9
|
#service = null;
|
|
10
10
|
#routes = [];
|
|
11
|
-
#diffPopup;
|
|
12
11
|
#packageName;
|
|
13
12
|
#routesPath;
|
|
14
13
|
#connectorUrl;
|
|
@@ -185,10 +184,9 @@ export class NineChat extends HTMLElement {
|
|
|
185
184
|
</div>
|
|
186
185
|
</div>
|
|
187
186
|
<div class="expand-icon"></div>
|
|
188
|
-
<nine-diff-popup></nine-diff-popup>
|
|
189
187
|
`;
|
|
190
188
|
|
|
191
|
-
this.#diffPopup = this.shadowRoot.querySelector('nine-diff-popup');
|
|
189
|
+
//this.#diffPopup = this.shadowRoot.querySelector('nine-diff-popup');
|
|
192
190
|
|
|
193
191
|
this.#$nineChatMessage = this.shadowRoot.querySelector("nine-chat-message");
|
|
194
192
|
}
|
|
@@ -241,7 +239,22 @@ export class NineChat extends HTMLElement {
|
|
|
241
239
|
}
|
|
242
240
|
|
|
243
241
|
#showDiff = (asis, tobe, lang) => {
|
|
244
|
-
|
|
242
|
+
// 1. 혹시 잔상이 남아있을지 모르니 기존에 생성된 팝업이 있다면 강제 제거
|
|
243
|
+
const oldPopup = this.shadowRoot.querySelector('nine-diff-popup');
|
|
244
|
+
if (oldPopup) {
|
|
245
|
+
oldPopup.remove();
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// 2. 동적으로 커스텀 엘리먼트 생성
|
|
249
|
+
const $diffPopup = document.createElement('nine-diff-popup');
|
|
250
|
+
|
|
251
|
+
// 3. 래퍼(wrapper) 안이나 shadowRoot 제일 밑바닥에 부착
|
|
252
|
+
const container = this.shadowRoot.querySelector('.wrapper') || this.shadowRoot;
|
|
253
|
+
container.appendChild($diffPopup);
|
|
254
|
+
|
|
255
|
+
// 4. 데이터 주입 및 팝업 실행
|
|
256
|
+
// 💡 팝업이 네이티브 <dialog> 기반이라면 .popup() 내부에서 showModal()이 실행될 겁니다.
|
|
257
|
+
$diffPopup.popup().data(asis, tobe, lang);
|
|
245
258
|
}
|
|
246
259
|
}
|
|
247
260
|
|