@nine-lab/nine-mu 0.1.317 β†’ 0.1.319

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nine-lab/nine-mu",
3
- "version": "0.1.317",
3
+ "version": "0.1.319",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -88,20 +88,24 @@ export class NineDiffPopup extends HTMLElement {
88
88
  `;
89
89
  });
90
90
 
91
- // 3. πŸš€ 단 ν•œ 번의 μ—°μ‚°μœΌλ‘œ Light DOM νŠΈλ¦¬μ— μ™„μ „ μŠ› μ£Όμž…!
92
- this.#tabContainer.innerHTML = totalTabHtml;
93
-
94
- this.#tabContainer.querySelectorAll("nine-diff").forEach((element) => {
95
- trace.log(element);
91
+ // 3. πŸš€ [μˆ˜μ •] 이벀트 μœ„μž„: νƒ­ μ»¨ν…Œμ΄λ„ˆ μžμ²΄μ— 미리 이벀트λ₯Ό κ±Έμ–΄λ‘  (단 ν•œ 번만 등둝)
92
+ // 쀑볡 등둝 λ°©μ§€λ₯Ό μœ„ν•΄ κΈ°μ‘΄ λ¦¬μŠ€λ„ˆκ°€ μžˆλ‹€λ©΄ μ œκ±°ν•˜κ±°λ‚˜, ν˜Ήμ€ μƒμ„±μž/connectedCallbackμ—μ„œ 졜초 1회만 등둝해도 μ’‹μŠ΅λ‹ˆλ‹€.
93
+ this.#tabContainer.removeEventListener('change-dirty', this._onDiffDirtyChange);
94
+ this._onDiffDirtyChange = (e) => {
95
+ const { isDirty } = e.detail;
96
+ trace.log("이벀트 μœ„μž„ 감지 - IsDirty:", isDirty);
97
+
98
+ // λ²„νŠΌ μƒνƒœ μ œμ–΄
99
+ const confirmBtn = this.shadowRoot.querySelector('.btn-confirm');
100
+ if (confirmBtn) {
101
+ confirmBtn.disabled = !isDirty;
102
+ }
103
+ };
104
+ this.#tabContainer.addEventListener('change-dirty', this._onDiffDirtyChange);
96
105
 
97
- element.addEventListener('change-dirty', (e) => {
98
- const { isDirty } = e.detail;
99
- trace.log(isDirty);
106
+ // 4. πŸš€ 단 ν•œ 번의 μ—°μ‚°μœΌλ‘œ Light DOM νŠΈλ¦¬μ— μ™„μ „ μŠ› μ£Όμž…!
107
+ this.#tabContainer.innerHTML = totalTabHtml;
100
108
 
101
- trace.log(this.shadowRoot.querySelector('.btn-confirm'));
102
- this.shadowRoot.querySelector('.btn-confirm').disabled = !isDirty; // μˆ˜μ •λ˜μ—ˆμ„ λ•Œλ§Œ μ €μž₯ λ²„νŠΌ ν™œμ„±ν™”
103
- });
104
- });
105
109
 
106
110
 
107
111
 
@@ -74,7 +74,7 @@ export class NotificationHandler {
74
74
  * μ΅œμ’… 쑰립이 λλ‚˜ μ‹œκ·Έλ„μ΄ λ„λ‹¬ν–ˆμ„ λ•Œ λ”± ν•œ 번 νŒμ—…μ„ μ—΄μ–΄ 일괄 μ£Όμž…
75
75
  */
76
76
  #openDiffPopup = () => {
77
- trace.log("1111111");
77
+
78
78
  if (this.#collectedFiles.length === 0) return;
79
79
 
80
80
  const $oldPopup = this.#owner.shadowRoot.querySelector('nine-diff-popup');
@@ -82,25 +82,19 @@ export class NotificationHandler {
82
82
  $oldPopup.remove();
83
83
  }
84
84
 
85
- trace.log("222222");
86
85
  // DOM 상에 싱글톀 νŒμ—… μΈμŠ€ν„΄μŠ€ λ ˆμ΄μ•„μ›ƒ μΆ”μΆœ 및 λΉŒλ“œ
87
86
 
88
- const $popup = document.createElement('nine-diff-popup');
89
- $popup.setAttribute('package-name', this.#owner.getAttribute('package-name') || '');
90
-
91
- trace.log("33333");
87
+ const $diffPopup = document.createElement('nine-diff-popup');
88
+ $diffPopup.setAttribute('package-name', this.#owner.getAttribute('package-name') || '');
92
89
 
93
90
  const container = this.#owner.shadowRoot.querySelector('.wrapper') || this.#owner.shadowRoot;
94
91
  container.appendChild($diffPopup);
95
92
  //document.body.appendChild($popup);
96
93
 
97
- trace.log("444444");
98
-
99
94
  // νŒμ—… λ‚΄λΆ€ λ§΅ μ €μž₯μ†Œμ— μˆ˜μ§‘λœ λ©€ν‹° νƒ­ μ†ŒμŠ€ 리슀트 μ£Όμž… 및 λͺ¨λ‹¬ λ””μŠ€ν”Œλ ˆμ΄
100
- $popup.data([...this.#collectedFiles]);
101
- $popup.popup();
95
+ $diffPopup.data([...this.#collectedFiles]);
96
+ $diffPopup.popup();
102
97
 
103
- trace.log("55555");
104
98
  // λ‹€μŒ μˆ˜μ • μ„Έμ…˜μ„ λŒ€λΉ„ν•˜μ—¬ ν•Έλ“€λŸ¬ λ‚΄λΆ€ μ „μ—­ 버퍼 μ™„μ „ μ΄ˆκΈ°ν™”
105
99
  this.#collectedFiles = [];
106
100
  };