@nine-lab/nine-mu 0.1.70 → 0.1.72
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 +19 -12
- 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 +4 -3
- package/src/components/NineDiffPopup.js +22 -7
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, 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.71"}/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.71"}/dist/css/nine-mu.css";
|
|
26400
26400
|
${customImport}
|
|
26401
26401
|
</style>
|
|
26402
26402
|
|
|
@@ -26450,18 +26450,20 @@ 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
|
+
__privateSet(this, _host, this.getRootNode().host);
|
|
26459
|
+
console.log("찾은 호스트:", __privateGet(this, _host));
|
|
26458
26460
|
this.render();
|
|
26459
26461
|
}
|
|
26460
26462
|
render() {
|
|
26461
26463
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
26462
26464
|
this.shadowRoot.innerHTML = `
|
|
26463
26465
|
<style>
|
|
26464
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
26466
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.71"}/dist/css/nine-mu.css";
|
|
26465
26467
|
${customImport}
|
|
26466
26468
|
</style>
|
|
26467
26469
|
|
|
@@ -26472,7 +26474,7 @@ class NineDiffPopup extends HTMLElement {
|
|
|
26472
26474
|
</div>
|
|
26473
26475
|
<div class="footer">
|
|
26474
26476
|
<button class="btn btn-cancel">취소</button>
|
|
26475
|
-
<button class="btn btn-confirm"
|
|
26477
|
+
<button class="btn btn-confirm">저장</button>
|
|
26476
26478
|
</div>
|
|
26477
26479
|
</div>
|
|
26478
26480
|
</nine-dialog>
|
|
@@ -26523,23 +26525,28 @@ ${e.message}`;
|
|
|
26523
26525
|
}
|
|
26524
26526
|
_dialog = new WeakMap();
|
|
26525
26527
|
_diffView = new WeakMap();
|
|
26526
|
-
_resolve = new WeakMap();
|
|
26527
26528
|
_asisBackup = new WeakMap();
|
|
26529
|
+
_host = new WeakMap();
|
|
26528
26530
|
_NineDiffPopup_instances = new WeakSet();
|
|
26529
26531
|
handleConfirm_fn = function() {
|
|
26530
26532
|
const finalContent = __privateGet(this, _diffView) ? __privateGet(this, _diffView).getContents() : __privateGet(this, _asisBackup);
|
|
26533
|
+
console.log(finalContent);
|
|
26534
|
+
const params = [];
|
|
26535
|
+
params.push({
|
|
26536
|
+
path: "",
|
|
26537
|
+
contents: finalContent
|
|
26538
|
+
});
|
|
26539
|
+
api.post(`/nine-ai/source/generateRealFile`, { list: params }).then((res) => {
|
|
26540
|
+
ninegrid.alert("소스를 변경하였습니다.");
|
|
26541
|
+
});
|
|
26531
26542
|
__privateGet(this, _dialog).close();
|
|
26532
|
-
if (__privateGet(this, _resolve)) __privateGet(this, _resolve).call(this, finalContent);
|
|
26533
|
-
this.remove();
|
|
26534
26543
|
};
|
|
26535
26544
|
handleCancel_fn = function() {
|
|
26536
26545
|
__privateGet(this, _dialog).close();
|
|
26537
|
-
if (__privateGet(this, _resolve)) __privateGet(this, _resolve).call(this, null);
|
|
26538
|
-
this.remove();
|
|
26539
26546
|
};
|
|
26540
26547
|
customElements.define("nine-diff-popup", NineDiffPopup);
|
|
26541
26548
|
const NineMu = {
|
|
26542
|
-
version: "0.1.
|
|
26549
|
+
version: "0.1.71",
|
|
26543
26550
|
init: (config) => {
|
|
26544
26551
|
trace.log("🛠️ Nine-Mu Engine initialized", config);
|
|
26545
26552
|
}
|