@nine-lab/nine-mu 0.1.285 β†’ 0.1.287

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.284"}/dist/css/nine-mu.css";
17566
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.286"}/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.284"}/dist/css/nine-mu.css";
43783
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.286"}/dist/css/nine-mu.css";
43784
43784
  ${customImport}
43785
43785
  </style>
43786
43786
 
@@ -43847,14 +43847,15 @@ class NineDiffPopup extends HTMLElement {
43847
43847
  return this;
43848
43848
  }
43849
43849
  /**
43850
- * πŸ’‘ [100% 동적 λΉŒλ”© μ‹œμŠ€ν…œ]
43851
- * λ“€μ–΄μ˜¨ 데이터 κ°œμˆ˜μ— μ •ν™•νžˆ λ§žμΆ”μ–΄ λŸ°νƒ€μž„μ— νƒ­ νŽ˜μ΄μ§€μ™€ 에디터λ₯Ό μΌλŒ€μΌ λ§€ν•‘μœΌλ‘œ 직접 μ‘°λ¦½ν•©λ‹ˆλ‹€.
43850
+ * πŸ’‘ [정석 데이터 μœ„μž„ 연동 μ—”μ§„]
43852
43851
  * @param {Array} fileList - [{ layer: "MyBatis", full_path: "...", asis_source: "...", source: "..." }]
43853
43852
  */
43854
43853
  async data(fileList) {
43855
43854
  if (!Array.isArray(fileList) || fileList.length === 0) return this;
43856
43855
  __privateSet(this, _fileList, fileList);
43857
- __privateGet(this, _tabContainer).innerHTML = "";
43856
+ if (__privateGet(this, _tabContainer) && typeof __privateGet(this, _tabContainer).clearTabs === "function") {
43857
+ __privateGet(this, _tabContainer).clearTabs();
43858
+ }
43858
43859
  const detectLanguage = (path) => {
43859
43860
  const lower = (path || "").toLowerCase();
43860
43861
  if (lower.endsWith(".xml")) return "xml";
@@ -43863,33 +43864,28 @@ class NineDiffPopup extends HTMLElement {
43863
43864
  return "javascript";
43864
43865
  };
43865
43866
  fileList.forEach((file) => {
43866
- const { layer: layer2, full_path } = file;
43867
- detectLanguage(full_path);
43867
+ const { layer: layer2, full_path, asis_source, source } = file;
43868
43868
  const fileName = full_path.split("/").pop() || "Unknown";
43869
43869
  const captionName = `${layer2.toUpperCase()} (${fileName})`;
43870
- const tabPage = document.createElement("nine-tab-page");
43871
- tabPage.setAttribute("caption", captionName);
43872
- const diffWrapper = document.createElement("div");
43873
- diffWrapper.className = "diff-wrapper";
43874
- const diffView = document.createElement("nine-diff");
43875
- diffView.className = layer2;
43876
- diffWrapper.appendChild(diffView);
43877
- tabPage.appendChild(diffWrapper);
43878
- __privateGet(this, _tabContainer).appendChild(tabPage);
43870
+ const targetHtmlContent = `
43871
+ <div class="diff-wrapper">
43872
+ <nine-diff class="${layer2}"></nine-diff>
43873
+ </div>
43874
+ `;
43875
+ if (__privateGet(this, _tabContainer) && typeof __privateGet(this, _tabContainer).addTabPage === "function") {
43876
+ __privateGet(this, _tabContainer).addTabPage(captionName, targetHtmlContent);
43877
+ }
43879
43878
  });
43880
43879
  setTimeout(() => {
43881
43880
  fileList.forEach((file) => {
43882
- const { layer: layer2, asis_source, source } = file;
43883
- const diff = this.shadowRoot.querySelector(`nine-diff.${layer2}`);
43881
+ const { layer: layer2, full_path, asis_source, source } = file;
43882
+ const diff = this.shadowRoot.querySelector(`nine-tab`).shadowRoot.querySelector(`nine-diff.${layer2}`);
43884
43883
  if (diff) {
43885
- const lang = detectLanguage(file.full_path);
43884
+ const lang = detectLanguage(full_path);
43886
43885
  diff.initialize(asis_source || "", source || "", lang);
43887
43886
  }
43888
43887
  });
43889
- if (__privateGet(this, _tabContainer) && typeof __privateGet(this, _tabContainer).initialize === "function") {
43890
- __privateGet(this, _tabContainer).initialize();
43891
- }
43892
- }, 150);
43888
+ }, 50);
43893
43889
  return this;
43894
43890
  }
43895
43891
  }
@@ -43899,11 +43895,11 @@ _fileList = new WeakMap();
43899
43895
  _host = new WeakMap();
43900
43896
  _NineDiffPopup_instances = new WeakSet();
43901
43897
  /**
43902
- * πŸ’‘ κΈ°λ³Έ λ‹€μ΄μ–Όλ‘œκ·Έ μ™Έκ³½ ν”„λ ˆμž„λ§Œ μ •μ μœΌλ‘œ μ„ μ–Έ (νƒ­ λ ˆμ΄μ•„μ›ƒμ€ λΉ„μ›Œλ‘ )
43898
+ * πŸ’‘ κΈ°λ³Έ λ‹€μ΄μ–Όλ‘œκ·Έ μ™Έκ³½ ν”„λ ˆμž„ 및 μŠ€νƒ€μΌ μŠ€μΌ€ν΄λ”© λ Œλ”λ§
43903
43899
  */
43904
43900
  renderScaffolding_fn = function() {
43905
43901
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43906
- const appVersion = "0.1.284";
43902
+ const appVersion = "0.1.286";
43907
43903
  this.shadowRoot.innerHTML = `
43908
43904
  <style>
43909
43905
  @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${appVersion}/dist/css/nine-mu.css";
@@ -43928,9 +43924,9 @@ renderScaffolding_fn = function() {
43928
43924
  flex-direction: column;
43929
43925
  height: 100%;
43930
43926
  }
43931
- /* πŸ’‘ ν•˜μ–—κ²Œ μ•ˆ λ³΄μ΄λŠ” ν˜„μƒμ„ λ°©μ§€ν•˜κΈ° μœ„ν•΄ 동적 μ‚½μž…λ  에디터 μ˜μ—­μ˜ 높이λ₯Ό ν™•μ‹€νžˆ 보μž₯ */
43927
+ /* πŸ’‘ ν•˜μ–—κ²Œ μ•ˆ λ³΄μ΄λŠ” ν˜„μƒμ„ λ°©μ§€ν•˜κΈ° μœ„ν•΄ 에디터 μ˜μ—­μ˜ 높이λ₯Ό ν™•μ‹€νžˆ 보μž₯ */
43932
43928
  .diff-wrapper {
43933
- height: calc(80vh - 120px);
43929
+ height: calc(80vh - 160px);
43934
43930
  width: 100%;
43935
43931
  display: block;
43936
43932
  }
@@ -43970,7 +43966,7 @@ handleConfirmAll_fn = async function() {
43970
43966
  const payloadList = [];
43971
43967
  for (const file of __privateGet(this, _fileList)) {
43972
43968
  const { layer: layer2, full_path, asis_source } = file;
43973
- const diff = this.shadowRoot.querySelector(`nine-diff.${layer2}`);
43969
+ const diff = this.shadowRoot.querySelector(`nine-tab`).shadowRoot.querySelector(`nine-diff.${layer2}`);
43974
43970
  const currentContent = diff ? diff.getContents() : asis_source;
43975
43971
  payloadList.push({
43976
43972
  layer: layer2,
@@ -44283,7 +44279,7 @@ class ChatMessageBody extends HTMLElement {
44283
44279
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
44284
44280
  this.shadowRoot.innerHTML = `
44285
44281
  <style>
44286
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.284"}/dist/css/nine-mu.css";
44282
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.286"}/dist/css/nine-mu.css";
44287
44283
  ${customImport}
44288
44284
  </style>
44289
44285
 
@@ -44377,7 +44373,7 @@ if (!customElements.get("nine-chat-progress")) {
44377
44373
  customElements.define("nine-chat-progress", ProgressMessage);
44378
44374
  }
44379
44375
  const NineMu = {
44380
- version: "0.1.284",
44376
+ version: "0.1.286",
44381
44377
  init: (config2) => {
44382
44378
  trace$1.log("πŸ› οΈ Nine-Mu Engine initialized", config2);
44383
44379
  }