@nine-lab/nine-mu 0.1.308 → 0.1.310

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 _owner, _collectedFiles, _NotificationHandler_instances, handleLoggingMessage_fn, _collectModifySource, _openDiffPopup, _generateSource, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager, _config, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _tabContainer, _fileList, _host, _NineDiffPopup_instances, renderScaffolding_fn, handleConfirmAll_fn, handleCancel_fn, _dialog2, _diffView, _asisBackup, _host2, _NineMenuDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn2, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
12
+ var _owner, _collectedFiles, _NotificationHandler_instances, handleLoggingMessage_fn, _collectModifySource, _openDiffPopup, _generateSource, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager, _config, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _isDirty, _initialAsisSrc, _initialTobeSrc, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _checkDirtyState, _setupScrollSync, _applyDiffDecorations, _dialog, _tabContainer, _fileList, _host, _NineDiffPopup_instances, renderScaffolding_fn, handleConfirmAll_fn, handleCancel_fn, _dialog2, _diffView, _asisBackup, _host2, _NineMenuDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn2, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
13
13
  import { trace as trace$1, api, nine as nine$1 } from "@nine-lab/nine-util";
14
14
  class Trace extends trace$1.constructor {
15
15
  constructor() {
@@ -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.307"}/dist/css/nine-mu.css";
17566
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.309"}/dist/css/nine-mu.css";
17567
17567
  ${customImport}
17568
17568
  </style>
17569
17569
  <div class="wrapper">
@@ -43493,6 +43493,9 @@ class NineDiff extends HTMLElement {
43493
43493
  __privateAdd(this, _tobeEditorView);
43494
43494
  __privateAdd(this, _asisEditorEl);
43495
43495
  __privateAdd(this, _tobeEditorEl);
43496
+ __privateAdd(this, _isDirty, false);
43497
+ __privateAdd(this, _initialAsisSrc);
43498
+ __privateAdd(this, _initialTobeSrc);
43496
43499
  __privateAdd(this, _languageCompartment, new Compartment());
43497
43500
  __privateAdd(this, _isScrollSyncActive, false);
43498
43501
  __publicField(this, "_asisScrollHandler", null);
@@ -43562,6 +43565,9 @@ class NineDiff extends HTMLElement {
43562
43565
  asisReady = true;
43563
43566
  checkAllReady();
43564
43567
  }
43568
+ if (update.docChanged) {
43569
+ __privateGet(this, _checkDirtyState).call(this);
43570
+ }
43565
43571
  })
43566
43572
  ]
43567
43573
  }),
@@ -43584,6 +43590,9 @@ class NineDiff extends HTMLElement {
43584
43590
  tobeReady = true;
43585
43591
  checkAllReady();
43586
43592
  }
43593
+ if (update.docChanged) {
43594
+ __privateGet(this, _checkDirtyState).call(this);
43595
+ }
43587
43596
  })
43588
43597
  ]
43589
43598
  }),
@@ -43591,6 +43600,20 @@ class NineDiff extends HTMLElement {
43591
43600
  }));
43592
43601
  __privateGet(this, _setupScrollSync).call(this);
43593
43602
  });
43603
+ __privateAdd(this, _checkDirtyState, () => {
43604
+ const currentAsis = this.getAsisContents();
43605
+ const currentTobe = this.getTobeContents();
43606
+ const nextDirty = currentAsis !== __privateGet(this, _initialAsisSrc) || currentTobe !== __privateGet(this, _initialTobeSrc);
43607
+ if (__privateGet(this, _isDirty) !== nextDirty) {
43608
+ __privateSet(this, _isDirty, nextDirty);
43609
+ this.dispatchEvent(new CustomEvent("change-dirty", {
43610
+ detail: { isDirty: __privateGet(this, _isDirty) },
43611
+ bubbles: true,
43612
+ composed: true
43613
+ }));
43614
+ trace.log(`[NineDiff] 상태 변경 - isDirty: ${__privateGet(this, _isDirty)}`);
43615
+ }
43616
+ });
43594
43617
  __privateAdd(this, _setupScrollSync, () => {
43595
43618
  if (this._asisScrollHandler) {
43596
43619
  __privateGet(this, _asisEditorView).scrollDOM.removeEventListener("scroll", this._asisScrollHandler);
@@ -43734,6 +43757,9 @@ class NineDiff extends HTMLElement {
43734
43757
  return;
43735
43758
  }
43736
43759
  __privateSet(this, _isScrollSyncActive, false);
43760
+ __privateSet(this, _isDirty, false);
43761
+ __privateSet(this, _initialAsisSrc, src1 ?? "");
43762
+ __privateSet(this, _initialTobeSrc, src2 ?? "");
43737
43763
  let langExtension;
43738
43764
  switch (language2) {
43739
43765
  case "javascript":
@@ -43782,11 +43808,14 @@ class NineDiff extends HTMLElement {
43782
43808
  get tobeEditorView() {
43783
43809
  return __privateGet(this, _tobeEditorView);
43784
43810
  }
43811
+ get isDirty() {
43812
+ return __privateGet(this, _isDirty);
43813
+ }
43785
43814
  connectedCallback() {
43786
43815
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43787
43816
  this.shadowRoot.innerHTML = `
43788
43817
  <style>
43789
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.307"}/dist/css/nine-mu.css";
43818
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.309"}/dist/css/nine-mu.css";
43790
43819
  ${customImport}
43791
43820
  </style>
43792
43821
 
@@ -43825,9 +43854,13 @@ _asisEditorView = new WeakMap();
43825
43854
  _tobeEditorView = new WeakMap();
43826
43855
  _asisEditorEl = new WeakMap();
43827
43856
  _tobeEditorEl = new WeakMap();
43857
+ _isDirty = new WeakMap();
43858
+ _initialAsisSrc = new WeakMap();
43859
+ _initialTobeSrc = new WeakMap();
43828
43860
  _languageCompartment = new WeakMap();
43829
43861
  _isScrollSyncActive = new WeakMap();
43830
43862
  _initCodeMirror = new WeakMap();
43863
+ _checkDirtyState = new WeakMap();
43831
43864
  _setupScrollSync = new WeakMap();
43832
43865
  _applyDiffDecorations = new WeakMap();
43833
43866
  if (!customElements.get("nine-diff")) {
@@ -43912,7 +43945,7 @@ renderScaffolding_fn = function() {
43912
43945
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
43913
43946
  this.shadowRoot.innerHTML = `
43914
43947
  <style>
43915
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.307"}/dist/css/nine-mu.css";
43948
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.309"}/dist/css/nine-mu.css";
43916
43949
  ${customImport}
43917
43950
  </style>
43918
43951
 
@@ -44022,7 +44055,7 @@ render_fn2 = function() {
44022
44055
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
44023
44056
  this.shadowRoot.innerHTML = `
44024
44057
  <style>
44025
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.307"}/dist/css/nine-mu.css";
44058
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.309"}/dist/css/nine-mu.css";
44026
44059
  ${customImport}
44027
44060
  </style>
44028
44061
 
@@ -44033,15 +44066,21 @@ render_fn2 = function() {
44033
44066
  </div>
44034
44067
  <div class="footer">
44035
44068
  <button class="btn btn-cancel">취소</button>
44036
- <button class="btn btn-confirm">저장</button>
44069
+ <button class="btn btn-confirm" disabled>저장</button>
44037
44070
  </div>
44038
44071
  </div>
44039
44072
  </nine-dialog>
44040
44073
  `;
44041
44074
  __privateSet(this, _dialog2, this.shadowRoot.querySelector("nine-dialog"));
44042
44075
  __privateSet(this, _diffView, this.shadowRoot.querySelector("nine-diff"));
44043
- this.shadowRoot.querySelector(".btn-confirm").onclick = () => __privateMethod(this, _NineMenuDiffPopup_instances, handleConfirm_fn).call(this);
44076
+ const $btnConfirm = this.shadowRoot.querySelector(".btn-confirm");
44077
+ $btnConfirm.onclick = () => __privateMethod(this, _NineMenuDiffPopup_instances, handleConfirm_fn).call(this);
44044
44078
  this.shadowRoot.querySelector(".btn-cancel").onclick = () => __privateMethod(this, _NineMenuDiffPopup_instances, handleCancel_fn2).call(this);
44079
+ __privateGet(this, _diffView).addEventListener("change-dirty", (e) => {
44080
+ const { isDirty: isDirty2 } = e.detail;
44081
+ console.log(e);
44082
+ $btnConfirm.disabled = !isDirty2;
44083
+ });
44045
44084
  };
44046
44085
  handleConfirm_fn = function() {
44047
44086
  const content2 = __privateGet(this, _diffView) ? __privateGet(this, _diffView).getAsisContents() : __privateGet(this, _asisBackup);
@@ -44348,7 +44387,7 @@ class ChatMessageBody extends HTMLElement {
44348
44387
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
44349
44388
  this.shadowRoot.innerHTML = `
44350
44389
  <style>
44351
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.307"}/dist/css/nine-mu.css";
44390
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.309"}/dist/css/nine-mu.css";
44352
44391
  ${customImport}
44353
44392
  </style>
44354
44393
 
@@ -44442,7 +44481,7 @@ if (!customElements.get("nine-chat-progress")) {
44442
44481
  customElements.define("nine-chat-progress", ProgressMessage);
44443
44482
  }
44444
44483
  const NineMu = {
44445
- version: "0.1.307",
44484
+ version: "0.1.309",
44446
44485
  init: (config2) => {
44447
44486
  trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
44448
44487
  }