@nine-lab/nine-mu 0.1.309 → 0.1.311

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.309",
3
+ "version": "0.1.311",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -36,7 +36,7 @@ export class NineDiffPopup extends HTMLElement {
36
36
 
37
37
  <div class="footer">
38
38
  <button class="btn btn-cancel">취소</button>
39
- <button class="btn btn-confirm">모두 저장</button>
39
+ <button class="btn btn-confirm" disabled>모두 저장</button>
40
40
  </div>
41
41
  </nine-dialog>
42
42
  `;
@@ -91,6 +91,17 @@ export class NineDiffPopup extends HTMLElement {
91
91
  // 3. 🚀 단 한 번의 연산으로 Light DOM 트리에 완전 슛 주입!
92
92
  this.#tabContainer.innerHTML = totalTabHtml;
93
93
 
94
+ this.#tabContainer.querySelectorAll("nine-diff").forEach((element) => {
95
+ element.addEventListener('change-dirty', (e) => {
96
+ const { isDirty } = e.detail;
97
+ trace.log(isDirty);
98
+
99
+ this.shadowRoot.querySelector('.btn-confirm').disabled = !isDirty; // 수정되었을 때만 저장 버튼 활성화
100
+ });
101
+ });
102
+
103
+
104
+
94
105
  // 4. ⚙️ 주입이 끝났으므로 nine-tab의 오리지널 기동 초기화 로직(#init)을 강제로 다시 깨웁니다.
95
106
  if (this.#tabContainer && typeof this.#tabContainer.connectedCallback === 'function') {
96
107
  this.#tabContainer.connectedCallback();
@@ -130,7 +141,7 @@ export class NineDiffPopup extends HTMLElement {
130
141
  for (const file of this.#fileList) {
131
142
  const { layer, full_path, asis_source } = file;
132
143
  const diff = this.#tabContainer.shadowRoot.querySelector(`nine-diff.${layer}`);
133
- const currentContent = diff ? diff.getContents() : asis_source;
144
+ const currentContent = diff ? diff.getAsisContents() : asis_source;
134
145
 
135
146
  payloadList.push({
136
147
  layer,
@@ -39,7 +39,7 @@ export class NineMenuDiffPopup extends HTMLElement {
39
39
  </div>
40
40
  <div class="footer">
41
41
  <button class="btn btn-cancel">취소</button>
42
- <button class="btn btn-confirm">저장</button>
42
+ <button class="btn btn-confirm" disabled>저장</button>
43
43
  </div>
44
44
  </div>
45
45
  </nine-dialog>
@@ -55,7 +55,6 @@ export class NineMenuDiffPopup extends HTMLElement {
55
55
 
56
56
  this.#diffView.addEventListener('change-dirty', (e) => {
57
57
  const { isDirty } = e.detail;
58
- console.log(e);
59
58
  $btnConfirm.disabled = !isDirty; // 수정되었을 때만 저장 버튼 활성화
60
59
  });
61
60
  }