@nine-lab/nine-mu 0.1.304 → 0.1.305
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 +107 -7
- 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 +1 -1
- package/src/index.js +1 -0
package/dist/nine-mu.js
CHANGED
|
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
11
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
12
|
-
var _owner, _collectedFiles, _NotificationHandler_instances, handleLoggingMessage_fn, _collectModifySource, _openDiffPopup, _generateSource, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager, _config, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _tabContainer, _fileList, _host, _NineDiffPopup_instances, renderScaffolding_fn, handleConfirmAll_fn, handleCancel_fn, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
|
|
12
|
+
var _owner, _collectedFiles, _NotificationHandler_instances, handleLoggingMessage_fn, _collectModifySource, _openDiffPopup, _generateSource, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager, _config, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _tabContainer, _fileList, _host, _NineDiffPopup_instances, renderScaffolding_fn, handleConfirmAll_fn, handleCancel_fn, _dialog2, _diffView, _asisBackup, _host2, _NineMenuDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn2, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
|
|
13
13
|
import { trace as trace$1, api, nine as nine$1 } from "@nine-lab/nine-util";
|
|
14
14
|
class Trace extends trace$1.constructor {
|
|
15
15
|
constructor() {
|
|
@@ -17454,7 +17454,7 @@ class NineChat extends HTMLElement {
|
|
|
17454
17454
|
trace.log(response);
|
|
17455
17455
|
});
|
|
17456
17456
|
__privateAdd(this, _showDiff, (asis, tobe, lang) => {
|
|
17457
|
-
const oldPopup = this.shadowRoot.querySelector("nine-diff-popup");
|
|
17457
|
+
const oldPopup = this.shadowRoot.querySelector("nine-menu-diff-popup");
|
|
17458
17458
|
if (oldPopup) {
|
|
17459
17459
|
oldPopup.remove();
|
|
17460
17460
|
}
|
|
@@ -17563,7 +17563,7 @@ render_fn = function() {
|
|
|
17563
17563
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
17564
17564
|
this.shadowRoot.innerHTML = `
|
|
17565
17565
|
<style>
|
|
17566
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
17566
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.304"}/dist/css/nine-mu.css";
|
|
17567
17567
|
${customImport}
|
|
17568
17568
|
</style>
|
|
17569
17569
|
<div class="wrapper">
|
|
@@ -43780,7 +43780,7 @@ class NineDiff extends HTMLElement {
|
|
|
43780
43780
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
43781
43781
|
this.shadowRoot.innerHTML = `
|
|
43782
43782
|
<style>
|
|
43783
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43783
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.304"}/dist/css/nine-mu.css";
|
|
43784
43784
|
${customImport}
|
|
43785
43785
|
</style>
|
|
43786
43786
|
|
|
@@ -43906,7 +43906,7 @@ renderScaffolding_fn = function() {
|
|
|
43906
43906
|
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
43907
43907
|
this.shadowRoot.innerHTML = `
|
|
43908
43908
|
<style>
|
|
43909
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43909
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.304"}/dist/css/nine-mu.css";
|
|
43910
43910
|
${customImport}
|
|
43911
43911
|
</style>
|
|
43912
43912
|
|
|
@@ -43953,6 +43953,106 @@ handleCancel_fn = function() {
|
|
|
43953
43953
|
if (!customElements.get("nine-diff-popup")) {
|
|
43954
43954
|
customElements.define("nine-diff-popup", NineDiffPopup);
|
|
43955
43955
|
}
|
|
43956
|
+
class NineMenuDiffPopup extends HTMLElement {
|
|
43957
|
+
constructor() {
|
|
43958
|
+
super();
|
|
43959
|
+
__privateAdd(this, _NineMenuDiffPopup_instances);
|
|
43960
|
+
__privateAdd(this, _dialog2, null);
|
|
43961
|
+
__privateAdd(this, _diffView, null);
|
|
43962
|
+
// Container 대신 직접 에디터 뷰를 참조
|
|
43963
|
+
__privateAdd(this, _asisBackup, "");
|
|
43964
|
+
__privateAdd(this, _host2);
|
|
43965
|
+
this.attachShadow({ mode: "open" });
|
|
43966
|
+
}
|
|
43967
|
+
connectedCallback() {
|
|
43968
|
+
__privateSet(this, _host2, this.getRootNode().host);
|
|
43969
|
+
__privateMethod(this, _NineMenuDiffPopup_instances, render_fn2).call(this);
|
|
43970
|
+
}
|
|
43971
|
+
popup() {
|
|
43972
|
+
__privateGet(this, _dialog2).showModal();
|
|
43973
|
+
return this;
|
|
43974
|
+
}
|
|
43975
|
+
/**
|
|
43976
|
+
* @param {string|object} asis - 소스 텍스트 또는 url:/file: 경로
|
|
43977
|
+
* @param {string|object} tobe - 소스 텍스트 또는 url:/file: 경로
|
|
43978
|
+
* @param {string} lang - 언어 설정
|
|
43979
|
+
*/
|
|
43980
|
+
async data(asis, tobe, lang = "javascript") {
|
|
43981
|
+
const loadSource = async (src) => {
|
|
43982
|
+
if (typeof src === "string" && (src.startsWith("url:") || src.startsWith("file:"))) {
|
|
43983
|
+
const targetUrl = src.replace(/^(url:|file:)/, "");
|
|
43984
|
+
try {
|
|
43985
|
+
trace.log(`📡 리모트 로드: ${targetUrl}`);
|
|
43986
|
+
const res = await fetch(targetUrl);
|
|
43987
|
+
if (!res.ok) throw new Error(`Status: ${res.status}`);
|
|
43988
|
+
return await res.text();
|
|
43989
|
+
} catch (e) {
|
|
43990
|
+
trace.error(`로드 실패 [${targetUrl}]:`, e);
|
|
43991
|
+
return `// 로드 실패: ${targetUrl}
|
|
43992
|
+
${e.message}`;
|
|
43993
|
+
}
|
|
43994
|
+
}
|
|
43995
|
+
return src;
|
|
43996
|
+
};
|
|
43997
|
+
const [finalAsis, finalTobe] = await Promise.all([
|
|
43998
|
+
loadSource(asis),
|
|
43999
|
+
loadSource(tobe)
|
|
44000
|
+
]);
|
|
44001
|
+
__privateSet(this, _asisBackup, finalAsis);
|
|
44002
|
+
__privateGet(this, _diffView).addEventListener("ready", () => {
|
|
44003
|
+
const asisStr = typeof finalAsis === "object" ? JSON.stringify(finalAsis, null, 2) : finalAsis;
|
|
44004
|
+
const tobeStr = typeof finalTobe === "object" ? JSON.stringify(finalTobe, null, 2) : finalTobe;
|
|
44005
|
+
__privateGet(this, _diffView).initialize(asisStr, tobeStr, lang);
|
|
44006
|
+
}, { once: true });
|
|
44007
|
+
return this;
|
|
44008
|
+
}
|
|
44009
|
+
}
|
|
44010
|
+
_dialog2 = new WeakMap();
|
|
44011
|
+
_diffView = new WeakMap();
|
|
44012
|
+
_asisBackup = new WeakMap();
|
|
44013
|
+
_host2 = new WeakMap();
|
|
44014
|
+
_NineMenuDiffPopup_instances = new WeakSet();
|
|
44015
|
+
render_fn2 = function() {
|
|
44016
|
+
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
44017
|
+
this.shadowRoot.innerHTML = `
|
|
44018
|
+
<style>
|
|
44019
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.304"}/dist/css/nine-mu.css";
|
|
44020
|
+
${customImport}
|
|
44021
|
+
</style>
|
|
44022
|
+
|
|
44023
|
+
<nine-dialog>
|
|
44024
|
+
<div class="main-layout">
|
|
44025
|
+
<div class="diff-area">
|
|
44026
|
+
<nine-diff></nine-diff>
|
|
44027
|
+
</div>
|
|
44028
|
+
<div class="footer">
|
|
44029
|
+
<button class="btn btn-cancel">취소</button>
|
|
44030
|
+
<button class="btn btn-confirm">저장</button>
|
|
44031
|
+
</div>
|
|
44032
|
+
</div>
|
|
44033
|
+
</nine-dialog>
|
|
44034
|
+
`;
|
|
44035
|
+
__privateSet(this, _dialog2, this.shadowRoot.querySelector("nine-dialog"));
|
|
44036
|
+
__privateSet(this, _diffView, this.shadowRoot.querySelector("nine-diff"));
|
|
44037
|
+
this.shadowRoot.querySelector(".btn-confirm").onclick = () => __privateMethod(this, _NineMenuDiffPopup_instances, handleConfirm_fn).call(this);
|
|
44038
|
+
this.shadowRoot.querySelector(".btn-cancel").onclick = () => __privateMethod(this, _NineMenuDiffPopup_instances, handleCancel_fn2).call(this);
|
|
44039
|
+
};
|
|
44040
|
+
handleConfirm_fn = function() {
|
|
44041
|
+
const content2 = __privateGet(this, _diffView) ? __privateGet(this, _diffView).getContents() : __privateGet(this, _asisBackup);
|
|
44042
|
+
const params = {
|
|
44043
|
+
packageName: __privateGet(this, _host2).getAttribute("package-name"),
|
|
44044
|
+
contents: content2
|
|
44045
|
+
};
|
|
44046
|
+
api.post(`/nine-mu/source/generateJsonFile`, params).then((res) => {
|
|
44047
|
+
nine$1.alert("소스를 변경하였습니다.").then((res2) => {
|
|
44048
|
+
__privateGet(this, _dialog2).close();
|
|
44049
|
+
});
|
|
44050
|
+
});
|
|
44051
|
+
};
|
|
44052
|
+
handleCancel_fn2 = function() {
|
|
44053
|
+
__privateGet(this, _dialog2).close();
|
|
44054
|
+
};
|
|
44055
|
+
customElements.define("nine-menu-diff-popup", NineMenuDiffPopup);
|
|
43956
44056
|
class AiMessage extends HTMLElement {
|
|
43957
44057
|
constructor() {
|
|
43958
44058
|
super();
|
|
@@ -44242,7 +44342,7 @@ class ChatMessageBody extends HTMLElement {
|
|
|
44242
44342
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
44243
44343
|
this.shadowRoot.innerHTML = `
|
|
44244
44344
|
<style>
|
|
44245
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
44345
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.304"}/dist/css/nine-mu.css";
|
|
44246
44346
|
${customImport}
|
|
44247
44347
|
</style>
|
|
44248
44348
|
|
|
@@ -44336,7 +44436,7 @@ if (!customElements.get("nine-chat-progress")) {
|
|
|
44336
44436
|
customElements.define("nine-chat-progress", ProgressMessage);
|
|
44337
44437
|
}
|
|
44338
44438
|
const NineMu = {
|
|
44339
|
-
version: "0.1.
|
|
44439
|
+
version: "0.1.304",
|
|
44340
44440
|
init: (config2) => {
|
|
44341
44441
|
trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
|
|
44342
44442
|
}
|