@nine-lab/nine-mu 0.1.71 → 0.1.73
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 +43 -37
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +1 -1
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +2 -1
- package/src/components/NineDiffPopup.js +23 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nine-lab/nine-mu",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.73",
|
|
4
4
|
"description": "AI-Driven Full-Stack Code Fabrication Engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/nine-mu.umd.js",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@nine-lab/nine-ai": "^0.1.78",
|
|
29
|
+
"@nine-lab/nine-nomenu": "^0.1.15",
|
|
29
30
|
"@nine-lab/nine-util": "^0.9.43",
|
|
30
31
|
"@nine-lab/nine-ux": "^0.1.125"
|
|
31
32
|
},
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { trace } from '@nine-lab/nine-util';
|
|
1
|
+
import { trace, api, nine } from '@nine-lab/nine-util';
|
|
2
2
|
import '@nine-lab/nine-util';
|
|
3
3
|
|
|
4
4
|
export class NineDiffPopup extends HTMLElement {
|
|
5
5
|
#dialog = null;
|
|
6
6
|
#diffView = null; // Container 대신 직접 에디터 뷰를 참조
|
|
7
|
-
#resolve = null;
|
|
8
7
|
#asisBackup = "";
|
|
8
|
+
#host;
|
|
9
9
|
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
@@ -13,10 +13,15 @@ export class NineDiffPopup extends HTMLElement {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
connectedCallback() {
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
this.#host = this.getRootNode().host;
|
|
18
|
+
|
|
19
|
+
//console.log("찾은 호스트:", this.#host);
|
|
20
|
+
|
|
21
|
+
this.#render();
|
|
17
22
|
}
|
|
18
23
|
|
|
19
|
-
render() {
|
|
24
|
+
#render() {
|
|
20
25
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
21
26
|
|
|
22
27
|
this.shadowRoot.innerHTML = `
|
|
@@ -32,7 +37,7 @@ export class NineDiffPopup extends HTMLElement {
|
|
|
32
37
|
</div>
|
|
33
38
|
<div class="footer">
|
|
34
39
|
<button class="btn btn-cancel">취소</button>
|
|
35
|
-
<button class="btn btn-confirm"
|
|
40
|
+
<button class="btn btn-confirm">저장</button>
|
|
36
41
|
</div>
|
|
37
42
|
</div>
|
|
38
43
|
</nine-dialog>
|
|
@@ -98,15 +103,23 @@ export class NineDiffPopup extends HTMLElement {
|
|
|
98
103
|
#handleConfirm() {
|
|
99
104
|
// 에디터에서 직접 콘텐츠 추출
|
|
100
105
|
const finalContent = this.#diffView ? this.#diffView.getContents() : this.#asisBackup;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
106
|
+
|
|
107
|
+
console.log(finalContent);
|
|
108
|
+
|
|
109
|
+
const params = {
|
|
110
|
+
packageName: this.#host.getAttribute('package-name'),
|
|
111
|
+
contents: finalContent,
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
api.post(`/nine-ai/source/generateJsonFile`, params).then(res => {
|
|
115
|
+
nine.alert("소스를 변경하였습니다.").then(res => {
|
|
116
|
+
this.#dialog.close();
|
|
117
|
+
});
|
|
118
|
+
});
|
|
104
119
|
}
|
|
105
120
|
|
|
106
121
|
#handleCancel() {
|
|
107
122
|
this.#dialog.close();
|
|
108
|
-
if (this.#resolve) this.#resolve(null);
|
|
109
|
-
this.remove();
|
|
110
123
|
}
|
|
111
124
|
}
|
|
112
125
|
|