@nine-lab/nine-mu 0.1.72 → 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 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, _asisBackup, _host, _NineDiffPopup_instances, handleConfirm_fn, handleCancel_fn;
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.71"}/dist/css/nine-mu.css";
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.71"}/dist/css/nine-mu.css";
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
 
@@ -26456,33 +26456,7 @@ class NineDiffPopup extends HTMLElement {
26456
26456
  }
26457
26457
  connectedCallback() {
26458
26458
  __privateSet(this, _host, this.getRootNode().host);
26459
- console.log("찾은 호스트:", __privateGet(this, _host));
26460
- this.render();
26461
- }
26462
- render() {
26463
- const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
26464
- this.shadowRoot.innerHTML = `
26465
- <style>
26466
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.71"}/dist/css/nine-mu.css";
26467
- ${customImport}
26468
- </style>
26469
-
26470
- <nine-dialog>
26471
- <div class="main-layout">
26472
- <div class="diff-area">
26473
- <nine-diff></nine-diff>
26474
- </div>
26475
- <div class="footer">
26476
- <button class="btn btn-cancel">취소</button>
26477
- <button class="btn btn-confirm">저장</button>
26478
- </div>
26479
- </div>
26480
- </nine-dialog>
26481
- `;
26482
- __privateSet(this, _dialog, this.shadowRoot.querySelector("nine-dialog"));
26483
- __privateSet(this, _diffView, this.shadowRoot.querySelector("nine-diff"));
26484
- this.shadowRoot.querySelector(".btn-confirm").onclick = () => __privateMethod(this, _NineDiffPopup_instances, handleConfirm_fn).call(this);
26485
- this.shadowRoot.querySelector(".btn-cancel").onclick = () => __privateMethod(this, _NineDiffPopup_instances, handleCancel_fn).call(this);
26459
+ __privateMethod(this, _NineDiffPopup_instances, render_fn2).call(this);
26486
26460
  }
26487
26461
  popup() {
26488
26462
  __privateGet(this, _dialog).showModal();
@@ -26528,25 +26502,50 @@ _diffView = new WeakMap();
26528
26502
  _asisBackup = new WeakMap();
26529
26503
  _host = new WeakMap();
26530
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
+ };
26531
26530
  handleConfirm_fn = function() {
26532
26531
  const finalContent = __privateGet(this, _diffView) ? __privateGet(this, _diffView).getContents() : __privateGet(this, _asisBackup);
26533
26532
  console.log(finalContent);
26534
- const params = [];
26535
- params.push({
26536
- path: "",
26533
+ const params = {
26534
+ packageName: __privateGet(this, _host).getAttribute("package-name"),
26537
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
+ });
26538
26541
  });
26539
- api.post(`/nine-ai/source/generateRealFile`, { list: params }).then((res) => {
26540
- ninegrid.alert("소스를 변경하였습니다.");
26541
- });
26542
- __privateGet(this, _dialog).close();
26543
26542
  };
26544
26543
  handleCancel_fn = function() {
26545
26544
  __privateGet(this, _dialog).close();
26546
26545
  };
26547
26546
  customElements.define("nine-diff-popup", NineDiffPopup);
26548
26547
  const NineMu = {
26549
- version: "0.1.71",
26548
+ version: "0.1.72",
26550
26549
  init: (config) => {
26551
26550
  trace.log("🛠️ Nine-Mu Engine initialized", config);
26552
26551
  }