@nine-lab/nine-mu 0.1.110 → 0.1.112

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
@@ -10,7 +10,14 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
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
12
  var _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _mcpClient, _NineChat_instances, initInteractions_fn, initActions_fn, _initMcp, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _diffView, _asisBackup, _host, _NineDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn;
13
- import { trace, api, nine } from "@nine-lab/nine-util";
13
+ import { trace as trace$1, api, nine } from "@nine-lab/nine-util";
14
+ class Trace extends trace$1 {
15
+ constructor() {
16
+ super();
17
+ this.init("nine-mu", "#0969da");
18
+ }
19
+ }
20
+ const trace = new Trace();
14
21
  class NineMuService {
15
22
  constructor(connectorUrl) {
16
23
  __privateAdd(this, _getSourcePath, (menuUrl) => {
@@ -26,7 +33,7 @@ class NineMuService {
26
33
  */
27
34
  async generate(command2, targets, currentRoutes) {
28
35
  try {
29
- trace.log(`공정 시작: "${command2}" [대상: ${targets.join(", ")}]`);
36
+ trace$1.log(`공정 시작: "${command2}" [대상: ${targets.join(", ")}]`);
30
37
  const response = await fetch(`${this.connectorUrl}/api/mu/generate`, {
31
38
  method: "POST",
32
39
  headers: { "Content-Type": "application/json" },
@@ -43,7 +50,7 @@ class NineMuService {
43
50
  }
44
51
  return result;
45
52
  } catch (error) {
46
- trace.error("NineMu Service Error:", error);
53
+ trace$1.error("NineMu Service Error:", error);
47
54
  throw error;
48
55
  }
49
56
  }
@@ -51,7 +58,7 @@ class NineMuService {
51
58
  }
52
59
  async generateAll_BAK(command2, targets, currentRoutes) {
53
60
  try {
54
- trace.log(`공정 시작: "${command2}" [대상: ${targets.join(", ")}]`);
61
+ trace$1.log(`공정 시작: "${command2}" [대상: ${targets.join(", ")}]`);
55
62
  const srcPath = __privateGet(this, _getSourcePath).call(this, "/admin/payment/order-list");
56
63
  const srcPath1 = {
57
64
  mybatis: "",
@@ -60,9 +67,9 @@ class NineMuService {
60
67
  javascriptFrom: "",
61
68
  javascriptTo: ""
62
69
  };
63
- trace.log(srcPath);
70
+ trace$1.log(srcPath);
64
71
  const src = await api.post("/nine-ai/source/read", srcPath);
65
- trace.log(src);
72
+ trace$1.log(src);
66
73
  const response = await fetch(`${this.connectorUrl}/api/mu/generateAll`, {
67
74
  method: "POST",
68
75
  headers: { "Content-Type": "application/json" },
@@ -73,14 +80,14 @@ class NineMuService {
73
80
  //currentRoutes
74
81
  })
75
82
  });
76
- trace.log(response);
83
+ trace$1.log(response);
77
84
  const result = await response.json();
78
85
  if (!result.success) {
79
86
  throw new Error(result.error || "소스 생성 중 서버 오류가 발생했습니다.");
80
87
  }
81
88
  return result;
82
89
  } catch (error) {
83
- trace.error("NineMu Service Error:", error);
90
+ trace$1.error("NineMu Service Error:", error);
84
91
  throw error;
85
92
  }
86
93
  }
@@ -93,7 +100,7 @@ class NineMuService {
93
100
  const res = await fetch(routeUrl);
94
101
  return await res.json();
95
102
  } catch (err) {
96
- trace.error("Route load fail", err);
103
+ trace$1.error("Route load fail", err);
97
104
  return [];
98
105
  }
99
106
  }
@@ -13713,7 +13720,7 @@ render_fn = function() {
13713
13720
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
13714
13721
  this.shadowRoot.innerHTML = `
13715
13722
  <style>
13716
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.109"}/dist/css/nine-mu.css";
13723
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.111"}/dist/css/nine-mu.css";
13717
13724
  ${customImport}
13718
13725
  </style>
13719
13726
  <div class="wrapper">
@@ -13754,7 +13761,6 @@ render_fn = function() {
13754
13761
  _makeMenuHandler = new WeakMap();
13755
13762
  _sourceGenHandler = new WeakMap();
13756
13763
  _showDiff = new WeakMap();
13757
- trace.init("nine-mu", "#0969da");
13758
13764
  if (!customElements.get("nine-chat")) {
13759
13765
  customElements.define("nine-chat", NineChat);
13760
13766
  }
@@ -39609,9 +39615,9 @@ class MergeButtonWidget extends WidgetType {
39609
39615
  button.className = "cm-merge-button accept";
39610
39616
  }
39611
39617
  button.addEventListener("click", () => {
39612
- trace.log(`버튼 클릭: ${this.isAsisButton ? "ASIS 쪽 (삭제)" : "TOBE 쪽 (적용)"}`, this.textToApply);
39613
- trace.log("대상 에디터:", this.targetEditorView === this.hostComponent.asisEditorView ? "ASIS" : "TOBE");
39614
- trace.log("대상 범위:", this.diffRange);
39618
+ trace$1.log(`버튼 클릭: ${this.isAsisButton ? "ASIS 쪽 (삭제)" : "TOBE 쪽 (적용)"}`, this.textToApply);
39619
+ trace$1.log("대상 에디터:", this.targetEditorView === this.hostComponent.asisEditorView ? "ASIS" : "TOBE");
39620
+ trace$1.log("대상 범위:", this.diffRange);
39615
39621
  this.applyChanges(this.textToApply, this.targetEditorView, this.diffRange);
39616
39622
  });
39617
39623
  const container = document.createElement("div");
@@ -39622,7 +39628,7 @@ class MergeButtonWidget extends WidgetType {
39622
39628
  // 실제 변경 적용 로직
39623
39629
  applyChanges(text, editorView, range) {
39624
39630
  if (!editorView || !range) {
39625
- trace.error("Target editor view or range is undefined.", editorView, range);
39631
+ trace$1.error("Target editor view or range is undefined.", editorView, range);
39626
39632
  return;
39627
39633
  }
39628
39634
  editorView.dispatch({
@@ -39663,7 +39669,7 @@ class NineDiff extends HTMLElement {
39663
39669
  __privateSet(this, _asisEditorEl, this.shadowRoot.querySelector(".panel.asis"));
39664
39670
  __privateSet(this, _tobeEditorEl, this.shadowRoot.querySelector(".panel.tobe"));
39665
39671
  if (!__privateGet(this, _asisEditorEl) || !__privateGet(this, _tobeEditorEl)) {
39666
- trace.error("CodeMirror panel containers not found!");
39672
+ trace$1.error("CodeMirror panel containers not found!");
39667
39673
  return;
39668
39674
  }
39669
39675
  const basicExtensions = [
@@ -39704,7 +39710,7 @@ class NineDiff extends HTMLElement {
39704
39710
  EditorView.updateListener.of((update) => {
39705
39711
  if (update.view.contentDOM.firstChild && !update.view._initialAsisContentLoaded) {
39706
39712
  update.view._initialAsisContentLoaded = true;
39707
- trace.log("CodeMirror ASIS view is ready for initial content.");
39713
+ trace$1.log("CodeMirror ASIS view is ready for initial content.");
39708
39714
  asisReady = true;
39709
39715
  checkAllReady();
39710
39716
  }
@@ -39726,7 +39732,7 @@ class NineDiff extends HTMLElement {
39726
39732
  EditorView.updateListener.of((update) => {
39727
39733
  if (update.view.contentDOM.firstChild && !update.view._initialTobeContentLoaded) {
39728
39734
  update.view._initialTobeContentLoaded = true;
39729
- trace.log("CodeMirror TOBE view is ready for initial content.");
39735
+ trace$1.log("CodeMirror TOBE view is ready for initial content.");
39730
39736
  tobeReady = true;
39731
39737
  checkAllReady();
39732
39738
  }
@@ -39789,7 +39795,7 @@ class NineDiff extends HTMLElement {
39789
39795
  const tobeRangeStart = tobeCursor;
39790
39796
  switch (op) {
39791
39797
  case diffMatchPatchExports.diff_match_patch.DIFF_INSERT:
39792
- trace.log("DIFF_INSERT (TOBE added):", JSON.stringify(text));
39798
+ trace$1.log("DIFF_INSERT (TOBE added):", JSON.stringify(text));
39793
39799
  const tobeLines = text.split("\n");
39794
39800
  for (let i = 0; i < tobeLines.length; i++) {
39795
39801
  if (!(i === tobeLines.length - 1 && tobeLines[i] === "" && text.endsWith("\n"))) {
@@ -39817,7 +39823,7 @@ class NineDiff extends HTMLElement {
39817
39823
  );
39818
39824
  break;
39819
39825
  case diffMatchPatchExports.diff_match_patch.DIFF_DELETE:
39820
- trace.log("DIFF_DELETE (ASIS deleted):", JSON.stringify(text));
39826
+ trace$1.log("DIFF_DELETE (ASIS deleted):", JSON.stringify(text));
39821
39827
  const asisLines = text.split("\n");
39822
39828
  for (let i = 0; i < asisLines.length; i++) {
39823
39829
  if (!(i === asisLines.length - 1 && asisLines[i] === "" && text.endsWith("\n"))) {
@@ -39876,7 +39882,7 @@ class NineDiff extends HTMLElement {
39876
39882
  });
39877
39883
  __publicField(this, "initialize", (src1, src2, language2 = "javascript") => {
39878
39884
  if (!__privateGet(this, _asisEditorView) || !__privateGet(this, _tobeEditorView)) {
39879
- trace.warn("CodeMirror Editors not initialized yet.");
39885
+ trace$1.warn("CodeMirror Editors not initialized yet.");
39880
39886
  return;
39881
39887
  }
39882
39888
  __privateSet(this, _isScrollSyncActive, false);
@@ -39932,7 +39938,7 @@ class NineDiff extends HTMLElement {
39932
39938
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
39933
39939
  this.shadowRoot.innerHTML = `
39934
39940
  <style>
39935
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.109"}/dist/css/nine-mu.css";
39941
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.111"}/dist/css/nine-mu.css";
39936
39942
  ${customImport}
39937
39943
  </style>
39938
39944
 
@@ -39949,7 +39955,7 @@ class NineDiff extends HTMLElement {
39949
39955
  bubbles: true,
39950
39956
  composed: true
39951
39957
  }));
39952
- trace.log("dispatchEvent");
39958
+ trace$1.log("dispatchEvent");
39953
39959
  });
39954
39960
  }
39955
39961
  disconnectedCallback() {
@@ -40008,12 +40014,12 @@ class NineDiffPopup extends HTMLElement {
40008
40014
  if (typeof src === "string" && (src.startsWith("url:") || src.startsWith("file:"))) {
40009
40015
  const targetUrl = src.replace(/^(url:|file:)/, "");
40010
40016
  try {
40011
- trace.log(`📡 리모트 로드: ${targetUrl}`);
40017
+ trace$1.log(`📡 리모트 로드: ${targetUrl}`);
40012
40018
  const res = await fetch(targetUrl);
40013
40019
  if (!res.ok) throw new Error(`Status: ${res.status}`);
40014
40020
  return await res.text();
40015
40021
  } catch (e) {
40016
- trace.error(`로드 실패 [${targetUrl}]:`, e);
40022
+ trace$1.error(`로드 실패 [${targetUrl}]:`, e);
40017
40023
  return `// 로드 실패: ${targetUrl}
40018
40024
  ${e.message}`;
40019
40025
  }
@@ -40042,7 +40048,7 @@ render_fn2 = function() {
40042
40048
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
40043
40049
  this.shadowRoot.innerHTML = `
40044
40050
  <style>
40045
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.109"}/dist/css/nine-mu.css";
40051
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.111"}/dist/css/nine-mu.css";
40046
40052
  ${customImport}
40047
40053
  </style>
40048
40054
 
@@ -40081,9 +40087,9 @@ handleCancel_fn = function() {
40081
40087
  };
40082
40088
  customElements.define("nine-diff-popup", NineDiffPopup);
40083
40089
  const NineMu = {
40084
- version: "0.1.109",
40090
+ version: "0.1.111",
40085
40091
  init: (config2) => {
40086
- trace.log("🛠️ Nine-Mu Engine initialized", config2);
40092
+ trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
40087
40093
  }
40088
40094
  };
40089
40095
  export {