@nine-lab/nine-mu 0.1.290 → 0.1.292

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
@@ -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.289"}/dist/css/nine-mu.css";
17566
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.291"}/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.289"}/dist/css/nine-mu.css";
43783
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.291"}/dist/css/nine-mu.css";
43784
43784
  ${customImport}
43785
43785
  </style>
43786
43786
 
@@ -43834,7 +43834,7 @@ class NineDiffPopup extends HTMLElement {
43834
43834
  __privateAdd(this, _dialog, null);
43835
43835
  __privateAdd(this, _tabContainer, null);
43836
43836
  __privateAdd(this, _fileList, []);
43837
- // 최종 일괄 저장을 위한 데이터 버퍼
43837
+ // 최종 [모두 저장]을 위한 차분 명세 데이터 버퍼
43838
43838
  __privateAdd(this, _host);
43839
43839
  this.attachShadow({ mode: "open" });
43840
43840
  }
@@ -43847,8 +43847,7 @@ class NineDiffPopup extends HTMLElement {
43847
43847
  return this;
43848
43848
  }
43849
43849
  /**
43850
- * 💡 [기존 정적 매핑 방식]
43851
- * 동적 생성 없이, 이미 조립되어 들어간 nine-tab 내부의 에디터를 정밀 타격하여 데이터만 꽂습니다.
43850
+ * 💡 [ 고정 + 에디터 동적 인스턴싱 엔진]
43852
43851
  */
43853
43852
  async data(fileList) {
43854
43853
  if (!Array.isArray(fileList) || fileList.length === 0) return this;
@@ -43861,27 +43860,45 @@ class NineDiffPopup extends HTMLElement {
43861
43860
  return "javascript";
43862
43861
  };
43863
43862
  setTimeout(() => {
43864
- fileList.forEach((file) => {
43865
- const { layer: layer2, full_path, asis_source, source } = file;
43866
- const diff = __privateGet(this, _tabContainer).shadowRoot.querySelector(`nine-diff.${layer2}`);
43867
- if (diff) {
43868
- const lang = detectLanguage(full_path);
43869
- const fileName = full_path.split("/").pop() || "Unknown";
43870
- const tabButtons = __privateGet(this, _tabContainer).shadowRoot.querySelectorAll(".tab-button");
43871
- tabButtons.forEach((btn) => {
43872
- if (btn.textContent.trim() === layer2.toUpperCase()) {
43873
- btn.textContent = `${layer2.toUpperCase()} (${fileName})`;
43874
- }
43875
- });
43876
- diff.initialize(asis_source || "", source || "", lang);
43863
+ const activeLayers = fileList.map((f) => f.layer);
43864
+ const tabButtons = __privateGet(this, _tabContainer).shadowRoot.querySelectorAll(".tab-button");
43865
+ const targetLayers = ["MyBatis", "Service", "Controller", "JavaScript"];
43866
+ targetLayers.forEach((layerName, index) => {
43867
+ const currentBtn = tabButtons[index];
43868
+ const pageBody = __privateGet(this, _tabContainer).shadowRoot.getElementById(`content${index}`);
43869
+ if (!pageBody) return;
43870
+ if (activeLayers.includes(layerName)) {
43871
+ const fileData = fileList.find((f) => f.layer === layerName);
43872
+ const fileName = fileData.full_path.split("/").pop() || "Unknown";
43873
+ if (currentBtn) {
43874
+ currentBtn.textContent = `${layerName.toUpperCase()} (${fileName})`;
43875
+ currentBtn.style.display = "unset";
43876
+ }
43877
+ pageBody.innerHTML = `<nine-diff class="${layerName}"></nine-diff>`;
43877
43878
  } else {
43878
- trace.error(`❌ 에디터 인스턴스를 찾을 수 없습니다: nine-diff.${layer2}`);
43879
+ if (currentBtn) {
43880
+ currentBtn.style.display = "none";
43881
+ currentBtn.classList.remove("active");
43882
+ }
43883
+ pageBody.innerHTML = "";
43879
43884
  }
43880
43885
  });
43881
- if (__privateGet(this, _tabContainer) && typeof __privateGet(this, _tabContainer).initialize === "function") {
43882
- __privateGet(this, _tabContainer).initialize();
43883
- }
43884
- }, 100);
43886
+ requestAnimationFrame(() => {
43887
+ requestAnimationFrame(() => {
43888
+ fileList.forEach((file) => {
43889
+ const { layer: layer2, full_path, asis_source, source } = file;
43890
+ const diff = __privateGet(this, _tabContainer).shadowRoot.querySelector(`nine-diff.${layer2}`);
43891
+ if (diff && typeof diff.initialize === "function") {
43892
+ const lang = detectLanguage(full_path);
43893
+ diff.initialize(asis_source || "", source || "", lang);
43894
+ }
43895
+ });
43896
+ if (__privateGet(this, _tabContainer) && typeof __privateGet(this, _tabContainer).initialize === "function") {
43897
+ __privateGet(this, _tabContainer).initialize();
43898
+ }
43899
+ });
43900
+ });
43901
+ }, 120);
43885
43902
  return this;
43886
43903
  }
43887
43904
  }
@@ -43891,12 +43908,11 @@ _fileList = new WeakMap();
43891
43908
  _host = new WeakMap();
43892
43909
  _NineDiffPopup_instances = new WeakSet();
43893
43910
  /**
43894
- * 💡 [기존 방식 복구] 스타일 전량 제거하고,
43895
- * 기존 소스처럼 nine-tab 내부에 nine-tab-page 2개를 정적으로 미리 박아 놓습니다.
43911
+ * 💡 페이지 외곽 정적 구조 확보
43896
43912
  */
43897
43913
  renderScaffolding_fn = function() {
43898
43914
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43899
- const appVersion = "0.1.289";
43915
+ const appVersion = "0.1.291";
43900
43916
  this.shadowRoot.innerHTML = `
43901
43917
  <style>
43902
43918
  @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${appVersion}/dist/css/nine-mu.css";
@@ -43905,12 +43921,10 @@ renderScaffolding_fn = function() {
43905
43921
 
43906
43922
  <nine-dialog>
43907
43923
  <nine-tab theme="theme-3">
43908
- <nine-tab-page caption="MYBATIS">
43909
- <nine-diff class="MyBatis"></nine-diff>
43910
- </nine-tab-page>
43911
- <nine-tab-page caption="JAVASCRIPT">
43912
- <nine-diff class="JavaScript"></nine-diff>
43913
- </nine-tab-page>
43924
+ <nine-tab-page caption="MYBATIS" id="layer_MyBatis"></nine-tab-page>
43925
+ <nine-tab-page caption="SERVICE" id="layer_Service"></nine-tab-page>
43926
+ <nine-tab-page caption="CONTROLLER" id="layer_Controller"></nine-tab-page>
43927
+ <nine-tab-page caption="JAVASCRIPT" id="layer_JavaScript"></nine-tab-page>
43914
43928
  </nine-tab>
43915
43929
 
43916
43930
  <div class="footer">
@@ -44242,7 +44256,7 @@ class ChatMessageBody extends HTMLElement {
44242
44256
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
44243
44257
  this.shadowRoot.innerHTML = `
44244
44258
  <style>
44245
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.289"}/dist/css/nine-mu.css";
44259
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.291"}/dist/css/nine-mu.css";
44246
44260
  ${customImport}
44247
44261
  </style>
44248
44262
 
@@ -44336,7 +44350,7 @@ if (!customElements.get("nine-chat-progress")) {
44336
44350
  customElements.define("nine-chat-progress", ProgressMessage);
44337
44351
  }
44338
44352
  const NineMu = {
44339
- version: "0.1.289",
44353
+ version: "0.1.291",
44340
44354
  init: (config2) => {
44341
44355
  trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
44342
44356
  }