@nine-lab/nine-mu 0.1.284 → 0.1.286

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 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, _filesMap, _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, _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() {
@@ -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.283"}/dist/css/nine-mu.css";
17566
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.285"}/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.283"}/dist/css/nine-mu.css";
43783
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.285"}/dist/css/nine-mu.css";
43784
43784
  ${customImport}
43785
43785
  </style>
43786
43786
 
@@ -43833,8 +43833,8 @@ class NineDiffPopup extends HTMLElement {
43833
43833
  __privateAdd(this, _NineDiffPopup_instances);
43834
43834
  __privateAdd(this, _dialog, null);
43835
43835
  __privateAdd(this, _tabContainer, null);
43836
- __privateAdd(this, _filesMap, /* @__PURE__ */ new Map());
43837
- // 탭(파일)별 메타데이터 에디터 인스턴스를 관리할 고유 저장소
43836
+ __privateAdd(this, _fileList, []);
43837
+ // 최종 [모두 저장]을 위한 차분 명세 데이터 버퍼
43838
43838
  __privateAdd(this, _host);
43839
43839
  this.attachShadow({ mode: "open" });
43840
43840
  }
@@ -43847,14 +43847,14 @@ class NineDiffPopup extends HTMLElement {
43847
43847
  return this;
43848
43848
  }
43849
43849
  /**
43850
- * 💡 [완벽 동적 빌딩 시스템]
43851
- * 백엔드 완료 시그널로부터 모아진 collectedFiles 들어오면, 런타임에 해당하는 탭만 정확하게 파싱하여 주입합니다.
43850
+ * 💡 [100% 동적 빌딩 시스템]
43851
+ * 들어온 데이터 개수에 정확히 맞추어 런타임에 페이지와 에디터를 일대일 매핑으로 직접 조립합니다.
43852
43852
  * @param {Array} fileList - [{ layer: "MyBatis", full_path: "...", asis_source: "...", source: "..." }]
43853
43853
  */
43854
43854
  async data(fileList) {
43855
43855
  if (!Array.isArray(fileList) || fileList.length === 0) return this;
43856
+ __privateSet(this, _fileList, fileList);
43856
43857
  __privateGet(this, _tabContainer).innerHTML = "";
43857
- __privateGet(this, _filesMap).clear();
43858
43858
  const detectLanguage = (path) => {
43859
43859
  const lower = (path || "").toLowerCase();
43860
43860
  if (lower.endsWith(".xml")) return "xml";
@@ -43862,49 +43862,48 @@ class NineDiffPopup extends HTMLElement {
43862
43862
  if (lower.endsWith(".json")) return "json";
43863
43863
  return "javascript";
43864
43864
  };
43865
- fileList.forEach((file, index) => {
43866
- const { layer: layer2, full_path, asis_source, source } = file;
43867
- const lang = detectLanguage(full_path);
43865
+ fileList.forEach((file) => {
43866
+ const { layer: layer2, full_path } = file;
43867
+ detectLanguage(full_path);
43868
43868
  const fileName = full_path.split("/").pop() || "Unknown";
43869
- const caption = `${layer2.toUpperCase()} (${fileName})`;
43869
+ const captionName = `${layer2.toUpperCase()} (${fileName})`;
43870
43870
  const tabPage = document.createElement("nine-tab-page");
43871
- tabPage.setAttribute("caption", caption);
43871
+ tabPage.setAttribute("caption", captionName);
43872
43872
  const diffWrapper = document.createElement("div");
43873
43873
  diffWrapper.className = "diff-wrapper";
43874
43874
  const diffView = document.createElement("nine-diff");
43875
+ diffView.className = layer2;
43875
43876
  diffWrapper.appendChild(diffView);
43876
43877
  tabPage.appendChild(diffWrapper);
43877
43878
  __privateGet(this, _tabContainer).appendChild(tabPage);
43878
- const fileKey = `file_tab_${index}`;
43879
- __privateGet(this, _filesMap).set(fileKey, {
43880
- layer: layer2,
43881
- fullPath: full_path,
43882
- asisSource: asis_source,
43883
- diffView
43884
- });
43885
- diffView.addEventListener("ready", () => {
43886
- diffView.initialize(asis_source || "", source || "", lang);
43887
- }, { once: true });
43888
43879
  });
43889
43880
  setTimeout(() => {
43890
- if (typeof __privateGet(this, _tabContainer).initialize === "function") {
43881
+ fileList.forEach((file) => {
43882
+ const { layer: layer2, asis_source, source } = file;
43883
+ const diff = this.shadowRoot.querySelector(`nine-diff.${layer2}`);
43884
+ if (diff) {
43885
+ const lang = detectLanguage(file.full_path);
43886
+ diff.initialize(asis_source || "", source || "", lang);
43887
+ }
43888
+ });
43889
+ if (__privateGet(this, _tabContainer) && typeof __privateGet(this, _tabContainer).initialize === "function") {
43891
43890
  __privateGet(this, _tabContainer).initialize();
43892
43891
  }
43893
- }, 50);
43892
+ }, 150);
43894
43893
  return this;
43895
43894
  }
43896
43895
  }
43897
43896
  _dialog = new WeakMap();
43898
43897
  _tabContainer = new WeakMap();
43899
- _filesMap = new WeakMap();
43898
+ _fileList = new WeakMap();
43900
43899
  _host = new WeakMap();
43901
43900
  _NineDiffPopup_instances = new WeakSet();
43902
43901
  /**
43903
- * 💡 기본 다이얼로그 프레임 스타일 스케폴딩 렌더링
43902
+ * 💡 기본 다이얼로그 외곽 프레임만 정적으로 선언 (탭 레이아웃은 비워둠)
43904
43903
  */
43905
43904
  renderScaffolding_fn = function() {
43906
43905
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43907
- const appVersion = "0.1.283";
43906
+ const appVersion = "0.1.285";
43908
43907
  this.shadowRoot.innerHTML = `
43909
43908
  <style>
43910
43909
  @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${appVersion}/dist/css/nine-mu.css";
@@ -43923,14 +43922,13 @@ renderScaffolding_fn = function() {
43923
43922
  display: flex;
43924
43923
  flex-direction: column;
43925
43924
  }
43926
- /* 💡 nx-tab / nine-tab 프레임워크가 100% 자라나도록 높이 강제 배치 */
43927
43925
  nine-tab {
43928
43926
  flex: 1;
43929
43927
  display: flex;
43930
43928
  flex-direction: column;
43931
43929
  height: 100%;
43932
43930
  }
43933
- /* 💡 내부 에디터 가시성이 유실되어 숨겨지는 현상을 확실하게 방어 */
43931
+ /* 💡 하얗게 보이는 현상을 방지하기 위해 동적 삽입될 에디터 영역의 높이를 확실히 보장 */
43934
43932
  .diff-wrapper {
43935
43933
  height: calc(80vh - 120px);
43936
43934
  width: 100%;
@@ -43970,12 +43968,13 @@ renderScaffolding_fn = function() {
43970
43968
  handleConfirmAll_fn = async function() {
43971
43969
  var _a2;
43972
43970
  const payloadList = [];
43973
- for (const [key, fileObj] of __privateGet(this, _filesMap).entries()) {
43974
- const { diffView, fullPath, asisSource, layer: layer2 } = fileObj;
43975
- const currentContent = diffView ? diffView.getContents() : asisSource;
43971
+ for (const file of __privateGet(this, _fileList)) {
43972
+ const { layer: layer2, full_path, asis_source } = file;
43973
+ const diff = this.shadowRoot.querySelector(`nine-diff.${layer2}`);
43974
+ const currentContent = diff ? diff.getContents() : asis_source;
43976
43975
  payloadList.push({
43977
43976
  layer: layer2,
43978
- fullPath,
43977
+ fullPath: full_path,
43979
43978
  packageName: ((_a2 = __privateGet(this, _host)) == null ? void 0 : _a2.getAttribute("package-name")) || "com.ninelab.ai",
43980
43979
  contents: currentContent
43981
43980
  });
@@ -44284,7 +44283,7 @@ class ChatMessageBody extends HTMLElement {
44284
44283
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
44285
44284
  this.shadowRoot.innerHTML = `
44286
44285
  <style>
44287
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.283"}/dist/css/nine-mu.css";
44286
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.285"}/dist/css/nine-mu.css";
44288
44287
  ${customImport}
44289
44288
  </style>
44290
44289
 
@@ -44378,7 +44377,7 @@ if (!customElements.get("nine-chat-progress")) {
44378
44377
  customElements.define("nine-chat-progress", ProgressMessage);
44379
44378
  }
44380
44379
  const NineMu = {
44381
- version: "0.1.283",
44380
+ version: "0.1.285",
44382
44381
  init: (config2) => {
44383
44382
  trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
44384
44383
  }