@nine-lab/nine-mu 0.1.292 β†’ 0.1.294

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.291"}/dist/css/nine-mu.css";
17566
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.293"}/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.291"}/dist/css/nine-mu.css";
43783
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.293"}/dist/css/nine-mu.css";
43784
43784
  ${customImport}
43785
43785
  </style>
43786
43786
 
@@ -43847,11 +43847,14 @@ class NineDiffPopup extends HTMLElement {
43847
43847
  return this;
43848
43848
  }
43849
43849
  /**
43850
- * πŸ’‘ [ν‹€ κ³ μ • + 에디터 동적 μΈμŠ€ν„΄μ‹± μ—”μ§„]
43850
+ * πŸ’‘ [μ™„λ²½ μΊ‘μŠν™” 데이터 ν”Όλ”©]
43851
43851
  */
43852
43852
  async data(fileList) {
43853
43853
  if (!Array.isArray(fileList) || fileList.length === 0) return this;
43854
43854
  __privateSet(this, _fileList, fileList);
43855
+ if (__privateGet(this, _tabContainer) && typeof __privateGet(this, _tabContainer).clearTabs === "function") {
43856
+ __privateGet(this, _tabContainer).clearTabs();
43857
+ }
43855
43858
  const detectLanguage = (path) => {
43856
43859
  const lower = (path || "").toLowerCase();
43857
43860
  if (lower.endsWith(".xml")) return "xml";
@@ -43859,46 +43862,28 @@ class NineDiffPopup extends HTMLElement {
43859
43862
  if (lower.endsWith(".json")) return "json";
43860
43863
  return "javascript";
43861
43864
  };
43865
+ fileList.forEach((file) => {
43866
+ const { layer: layer2, full_path } = file;
43867
+ const fileName = full_path.split("/").pop() || "Unknown";
43868
+ const captionName = `${layer2.toUpperCase()} (${fileName})`;
43869
+ const targetHtmlContent = `<nine-diff class="${layer2}"></nine-diff>`;
43870
+ if (__privateGet(this, _tabContainer) && typeof __privateGet(this, _tabContainer).addTabPage === "function") {
43871
+ __privateGet(this, _tabContainer).addTabPage(captionName, targetHtmlContent);
43872
+ }
43873
+ });
43862
43874
  setTimeout(() => {
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>`;
43878
- } else {
43879
- if (currentBtn) {
43880
- currentBtn.style.display = "none";
43881
- currentBtn.classList.remove("active");
43882
- }
43883
- pageBody.innerHTML = "";
43875
+ fileList.forEach((file) => {
43876
+ const { layer: layer2, full_path, asis_source, source } = file;
43877
+ const diff = __privateGet(this, _tabContainer).shadowRoot.querySelector(`nine-diff.${layer2}`);
43878
+ if (diff && typeof diff.initialize === "function") {
43879
+ const lang = detectLanguage(full_path);
43880
+ diff.initialize(asis_source || "", source || "", lang);
43884
43881
  }
43885
43882
  });
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);
43883
+ if (__privateGet(this, _tabContainer) && typeof __privateGet(this, _tabContainer).initialize === "function") {
43884
+ __privateGet(this, _tabContainer).initialize();
43885
+ }
43886
+ }, 50);
43902
43887
  return this;
43903
43888
  }
43904
43889
  }
@@ -43908,11 +43893,11 @@ _fileList = new WeakMap();
43908
43893
  _host = new WeakMap();
43909
43894
  _NineDiffPopup_instances = new WeakSet();
43910
43895
  /**
43911
- * πŸ’‘ νƒ­ νŽ˜μ΄μ§€ μ™Έκ³½ 정적 ꡬ쑰 확보
43896
+ * πŸ’‘ μŠ€νƒ€μΌ κ°„μ„­ μ—†λŠ” κΉ¨λ—ν•œ 순수 μŠ€μΌ€ν΄λ”© μ„ μ–Έ
43912
43897
  */
43913
43898
  renderScaffolding_fn = function() {
43914
43899
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43915
- const appVersion = "0.1.291";
43900
+ const appVersion = "0.1.293";
43916
43901
  this.shadowRoot.innerHTML = `
43917
43902
  <style>
43918
43903
  @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${appVersion}/dist/css/nine-mu.css";
@@ -43920,12 +43905,7 @@ renderScaffolding_fn = function() {
43920
43905
  </style>
43921
43906
 
43922
43907
  <nine-dialog>
43923
- <nine-tab theme="theme-3">
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>
43928
- </nine-tab>
43908
+ <nine-tab theme="theme-3"></nine-tab>
43929
43909
 
43930
43910
  <div class="footer">
43931
43911
  <button class="btn btn-cancel">μ·¨μ†Œ</button>
@@ -44256,7 +44236,7 @@ class ChatMessageBody extends HTMLElement {
44256
44236
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
44257
44237
  this.shadowRoot.innerHTML = `
44258
44238
  <style>
44259
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.291"}/dist/css/nine-mu.css";
44239
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.293"}/dist/css/nine-mu.css";
44260
44240
  ${customImport}
44261
44241
  </style>
44262
44242
 
@@ -44350,7 +44330,7 @@ if (!customElements.get("nine-chat-progress")) {
44350
44330
  customElements.define("nine-chat-progress", ProgressMessage);
44351
44331
  }
44352
44332
  const NineMu = {
44353
- version: "0.1.291",
44333
+ version: "0.1.293",
44354
44334
  init: (config2) => {
44355
44335
  trace$1.log("πŸ› οΈ Nine-Mu Engine initialized", config2);
44356
44336
  }