@nine-lab/nine-mu 0.1.310 → 0.1.312

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.310",
3
+ "version": "0.1.312",
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,20 @@ 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
+ trace.log(element);
96
+
97
+ element.addEventListener('change-dirty', (e) => {
98
+ const { isDirty } = e.detail;
99
+ trace.log(isDirty);
100
+
101
+ trace.log(this.shadowRoot.querySelector('.btn-confirm'));
102
+ this.shadowRoot.querySelector('.btn-confirm').disabled = !isDirty; // 수정되었을 때만 저장 버튼 활성화
103
+ });
104
+ });
105
+
106
+
107
+
94
108
  // 4. ⚙️ 주입이 끝났으므로 nine-tab의 오리지널 기동 초기화 로직(#init)을 강제로 다시 깨웁니다.
95
109
  if (this.#tabContainer && typeof this.#tabContainer.connectedCallback === 'function') {
96
110
  this.#tabContainer.connectedCallback();
@@ -130,7 +144,7 @@ export class NineDiffPopup extends HTMLElement {
130
144
  for (const file of this.#fileList) {
131
145
  const { layer, full_path, asis_source } = file;
132
146
  const diff = this.#tabContainer.shadowRoot.querySelector(`nine-diff.${layer}`);
133
- const currentContent = diff ? diff.getContents() : asis_source;
147
+ const currentContent = diff ? diff.getAsisContents() : asis_source;
134
148
 
135
149
  payloadList.push({
136
150
  layer,
@@ -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
  }