@nine-lab/nine-mu 0.1.71 → 0.1.73
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 +43 -37
- 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 -1
- package/src/components/NineDiffPopup.js +23 -10
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 _getSourcePath, _service, _routes, _diffPopup, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _diffView,
|
|
12
|
+
var _getSourcePath, _service, _routes, _diffPopup, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _diffView, _asisBackup, _host, _NineDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn;
|
|
13
13
|
import { trace, api, nine } from "@nine-lab/nine-util";
|
|
14
14
|
class NineMuService {
|
|
15
15
|
constructor(connectorUrl) {
|
|
@@ -183,7 +183,7 @@ render_fn = function() {
|
|
|
183
183
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
184
184
|
this.shadowRoot.innerHTML = `
|
|
185
185
|
<style>
|
|
186
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
186
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.72"}/dist/css/nine-mu.css";
|
|
187
187
|
${customImport}
|
|
188
188
|
</style>
|
|
189
189
|
<div class="wrapper">
|
|
@@ -26396,7 +26396,7 @@ class NineDiff extends HTMLElement {
|
|
|
26396
26396
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
26397
26397
|
this.shadowRoot.innerHTML = `
|
|
26398
26398
|
<style>
|
|
26399
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
26399
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.72"}/dist/css/nine-mu.css";
|
|
26400
26400
|
${customImport}
|
|
26401
26401
|
</style>
|
|
26402
26402
|
|
|
@@ -26450,37 +26450,13 @@ class NineDiffPopup extends HTMLElement {
|
|
|
26450
26450
|
__privateAdd(this, _dialog, null);
|
|
26451
26451
|
__privateAdd(this, _diffView, null);
|
|
26452
26452
|
// Container 대신 직접 에디터 뷰를 참조
|
|
26453
|
-
__privateAdd(this, _resolve, null);
|
|
26454
26453
|
__privateAdd(this, _asisBackup, "");
|
|
26454
|
+
__privateAdd(this, _host);
|
|
26455
26455
|
this.attachShadow({ mode: "open" });
|
|
26456
26456
|
}
|
|
26457
26457
|
connectedCallback() {
|
|
26458
|
-
this.
|
|
26459
|
-
|
|
26460
|
-
render() {
|
|
26461
|
-
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
26462
|
-
this.shadowRoot.innerHTML = `
|
|
26463
|
-
<style>
|
|
26464
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.70"}/dist/css/nine-mu.css";
|
|
26465
|
-
${customImport}
|
|
26466
|
-
</style>
|
|
26467
|
-
|
|
26468
|
-
<nine-dialog>
|
|
26469
|
-
<div class="main-layout">
|
|
26470
|
-
<div class="diff-area">
|
|
26471
|
-
<nine-diff></nine-diff>
|
|
26472
|
-
</div>
|
|
26473
|
-
<div class="footer">
|
|
26474
|
-
<button class="btn btn-cancel">취소</button>
|
|
26475
|
-
<button class="btn btn-confirm">최종 확정 및 저장</button>
|
|
26476
|
-
</div>
|
|
26477
|
-
</div>
|
|
26478
|
-
</nine-dialog>
|
|
26479
|
-
`;
|
|
26480
|
-
__privateSet(this, _dialog, this.shadowRoot.querySelector("nine-dialog"));
|
|
26481
|
-
__privateSet(this, _diffView, this.shadowRoot.querySelector("nine-diff"));
|
|
26482
|
-
this.shadowRoot.querySelector(".btn-confirm").onclick = () => __privateMethod(this, _NineDiffPopup_instances, handleConfirm_fn).call(this);
|
|
26483
|
-
this.shadowRoot.querySelector(".btn-cancel").onclick = () => __privateMethod(this, _NineDiffPopup_instances, handleCancel_fn).call(this);
|
|
26458
|
+
__privateSet(this, _host, this.getRootNode().host);
|
|
26459
|
+
__privateMethod(this, _NineDiffPopup_instances, render_fn2).call(this);
|
|
26484
26460
|
}
|
|
26485
26461
|
popup() {
|
|
26486
26462
|
__privateGet(this, _dialog).showModal();
|
|
@@ -26523,23 +26499,53 @@ ${e.message}`;
|
|
|
26523
26499
|
}
|
|
26524
26500
|
_dialog = new WeakMap();
|
|
26525
26501
|
_diffView = new WeakMap();
|
|
26526
|
-
_resolve = new WeakMap();
|
|
26527
26502
|
_asisBackup = new WeakMap();
|
|
26503
|
+
_host = new WeakMap();
|
|
26528
26504
|
_NineDiffPopup_instances = new WeakSet();
|
|
26505
|
+
render_fn2 = function() {
|
|
26506
|
+
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
26507
|
+
this.shadowRoot.innerHTML = `
|
|
26508
|
+
<style>
|
|
26509
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.72"}/dist/css/nine-mu.css";
|
|
26510
|
+
${customImport}
|
|
26511
|
+
</style>
|
|
26512
|
+
|
|
26513
|
+
<nine-dialog>
|
|
26514
|
+
<div class="main-layout">
|
|
26515
|
+
<div class="diff-area">
|
|
26516
|
+
<nine-diff></nine-diff>
|
|
26517
|
+
</div>
|
|
26518
|
+
<div class="footer">
|
|
26519
|
+
<button class="btn btn-cancel">취소</button>
|
|
26520
|
+
<button class="btn btn-confirm">저장</button>
|
|
26521
|
+
</div>
|
|
26522
|
+
</div>
|
|
26523
|
+
</nine-dialog>
|
|
26524
|
+
`;
|
|
26525
|
+
__privateSet(this, _dialog, this.shadowRoot.querySelector("nine-dialog"));
|
|
26526
|
+
__privateSet(this, _diffView, this.shadowRoot.querySelector("nine-diff"));
|
|
26527
|
+
this.shadowRoot.querySelector(".btn-confirm").onclick = () => __privateMethod(this, _NineDiffPopup_instances, handleConfirm_fn).call(this);
|
|
26528
|
+
this.shadowRoot.querySelector(".btn-cancel").onclick = () => __privateMethod(this, _NineDiffPopup_instances, handleCancel_fn).call(this);
|
|
26529
|
+
};
|
|
26529
26530
|
handleConfirm_fn = function() {
|
|
26530
26531
|
const finalContent = __privateGet(this, _diffView) ? __privateGet(this, _diffView).getContents() : __privateGet(this, _asisBackup);
|
|
26531
|
-
|
|
26532
|
-
|
|
26533
|
-
|
|
26532
|
+
console.log(finalContent);
|
|
26533
|
+
const params = {
|
|
26534
|
+
packageName: __privateGet(this, _host).getAttribute("package-name"),
|
|
26535
|
+
contents: finalContent
|
|
26536
|
+
};
|
|
26537
|
+
api.post(`/nine-ai/source/generateJsonFile`, params).then((res) => {
|
|
26538
|
+
nine.alert("소스를 변경하였습니다.").then((res2) => {
|
|
26539
|
+
__privateGet(this, _dialog).close();
|
|
26540
|
+
});
|
|
26541
|
+
});
|
|
26534
26542
|
};
|
|
26535
26543
|
handleCancel_fn = function() {
|
|
26536
26544
|
__privateGet(this, _dialog).close();
|
|
26537
|
-
if (__privateGet(this, _resolve)) __privateGet(this, _resolve).call(this, null);
|
|
26538
|
-
this.remove();
|
|
26539
26545
|
};
|
|
26540
26546
|
customElements.define("nine-diff-popup", NineDiffPopup);
|
|
26541
26547
|
const NineMu = {
|
|
26542
|
-
version: "0.1.
|
|
26548
|
+
version: "0.1.72",
|
|
26543
26549
|
init: (config) => {
|
|
26544
26550
|
trace.log("🛠️ Nine-Mu Engine initialized", config);
|
|
26545
26551
|
}
|