@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 +26 -30
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +1 -1
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/components/NineDiffPopup.js +30 -40
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.
|
|
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.
|
|
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
|
-
* π‘ [
|
|
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).
|
|
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
|
|
43871
|
-
|
|
43872
|
-
|
|
43873
|
-
|
|
43874
|
-
|
|
43875
|
-
|
|
43876
|
-
|
|
43877
|
-
|
|
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(
|
|
43884
|
+
const lang = detectLanguage(full_path);
|
|
43886
43885
|
diff.initialize(asis_source || "", source || "", lang);
|
|
43887
43886
|
}
|
|
43888
43887
|
});
|
|
43889
|
-
|
|
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.
|
|
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 -
|
|
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.
|
|
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.
|
|
44376
|
+
version: "0.1.286",
|
|
44381
44377
|
init: (config2) => {
|
|
44382
44378
|
trace$1.log("π οΈ Nine-Mu Engine initialized", config2);
|
|
44383
44379
|
}
|