@nine-lab/nine-mu 0.1.26 → 0.1.27
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/css/nine-mu.css +148 -0
- package/dist/nine-mu.js +9 -21
- 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 +1 -1
- package/public/css/nine-mu.css +148 -0
- package/src/components/NineDiff.js +0 -6
- package/src/components/NineDiffContainer.js +6 -17
package/dist/css/nine-mu.css
CHANGED
|
@@ -793,4 +793,152 @@
|
|
|
793
793
|
object-fit: contain; /* 비율 유지하며 꽉 채우기 */
|
|
794
794
|
filter: invert(0.8);
|
|
795
795
|
}
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
:host(nine-diff-popup) {
|
|
801
|
+
|
|
802
|
+
div.buttons {
|
|
803
|
+
position: absolute;
|
|
804
|
+
right: 16px;
|
|
805
|
+
/* width: 100px; */
|
|
806
|
+
display: flex;
|
|
807
|
+
flex-direction: row;
|
|
808
|
+
justify-content: flex-end;
|
|
809
|
+
z-index: 1;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
button.save {
|
|
813
|
+
cursor: pointer;
|
|
814
|
+
outline: none;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
:host(nine-diff-container) {
|
|
819
|
+
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
:host(nine-diff) {
|
|
823
|
+
width: 100%;
|
|
824
|
+
height: 100%;
|
|
825
|
+
|
|
826
|
+
.wrapper {
|
|
827
|
+
display: flex;
|
|
828
|
+
position: relative;
|
|
829
|
+
--gap: 8px;
|
|
830
|
+
--font-family: monospace;
|
|
831
|
+
height: 100%;
|
|
832
|
+
}
|
|
833
|
+
.panel {
|
|
834
|
+
width: 50%;
|
|
835
|
+
border: 1px solid #ccc;
|
|
836
|
+
--padding: 8px;
|
|
837
|
+
overflow: auto;
|
|
838
|
+
white-space: pre-wrap;
|
|
839
|
+
text-align: left;
|
|
840
|
+
display: flex;
|
|
841
|
+
justify-content: flex-start; /* 좌측 정렬 */
|
|
842
|
+
align-items: flex-start; /* 상단 정렬 */
|
|
843
|
+
flex-direction: column;
|
|
844
|
+
box-sizing: border-box;
|
|
845
|
+
}
|
|
846
|
+
.panel pre {
|
|
847
|
+
margin: 0;
|
|
848
|
+
--padding: 8px;
|
|
849
|
+
text-align: left;
|
|
850
|
+
white-space: pre-wrap;
|
|
851
|
+
word-break: break-word;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
.cm-editor {
|
|
855
|
+
height: 100%;
|
|
856
|
+
width: 100%;
|
|
857
|
+
--padding-left: 80px;
|
|
858
|
+
}
|
|
859
|
+
.cm-content { /* CodeMirror 텍스트 내용을 감싸는 내부 div */
|
|
860
|
+
}
|
|
861
|
+
/* 각 라인에 버튼 공간 확보 */
|
|
862
|
+
|
|
863
|
+
/* ideDiff.css */
|
|
864
|
+
|
|
865
|
+
/* 기본적인 CodeMirror 라인 포지셔닝 */
|
|
866
|
+
.cm-line {
|
|
867
|
+
position: relative;
|
|
868
|
+
--display: flex;
|
|
869
|
+
padding-left: 18px;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
/* 병합 버튼 컨테이너 */
|
|
873
|
+
.cm-merge-button-container {
|
|
874
|
+
position: absolute;
|
|
875
|
+
height: 16px;
|
|
876
|
+
width: 16px; /* 버튼 너비 고정으로 겹침 방지 */
|
|
877
|
+
left: 2px; /* 라인 번호 영역 바로 옆에 배치. 필요에 따라 조절하세요. */
|
|
878
|
+
top: 50%;
|
|
879
|
+
transform: translateY(-50%);
|
|
880
|
+
--z-index: 1; /* 다른 요소 위에 표시되도록 Z-index를 높게 설정 */
|
|
881
|
+
display: flex;
|
|
882
|
+
--gap: 5px;
|
|
883
|
+
justify-content: center; /* 버튼 중앙 정렬 */
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
/* 병합 버튼 기본 스타일 */
|
|
887
|
+
.cm-merge-button {
|
|
888
|
+
--margin: 2px 0;
|
|
889
|
+
width: 100%;
|
|
890
|
+
border: none;
|
|
891
|
+
border-radius: 3px;
|
|
892
|
+
cursor: pointer;
|
|
893
|
+
opacity: 0.7; /* 기본적으로 약간 투명하게 */
|
|
894
|
+
transition: opacity 0.2s ease-in-out; /* 호버 시 부드러운 전환 */
|
|
895
|
+
background-repeat: no-repeat;
|
|
896
|
+
background-position: center;
|
|
897
|
+
background-size: auto;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
/* 호버 시 버튼 불투명도 증가 */
|
|
901
|
+
.cm-merge-button:hover {
|
|
902
|
+
opacity: 1;
|
|
903
|
+
background-color: #e0e0e0;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
/* AI 추천을 현재 소스에 '적용'하는 버튼 (오른쪽 TOBE 에디터에 붙음) */
|
|
907
|
+
.cm-merge-button.accept {
|
|
908
|
+
background-color: #4CAF50; /* 녹색 */
|
|
909
|
+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-arrow-left-short" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M12 8a.5.5 0 0 1-.5.5H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H11.5a.5.5 0 0 1 .5.5"/></svg>');
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
/* AI의 삭제를 현재 소스 기준으로 '되돌리는' 버튼 (왼쪽 ASIS 에디터에 붙음) */
|
|
913
|
+
.cm-merge-button.revert {
|
|
914
|
+
background-color: #f44336; /* 빨간색 */
|
|
915
|
+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-x" viewBox="0 0 16 16"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"/></svg>');
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
/* 삽입된 라인 (AI 추천 소스에 새로 추가된 라인) 배경색 및 경계선 */
|
|
919
|
+
.cm-inserted-line-bg {
|
|
920
|
+
background-color: #e6ffed; /* 연한 녹색 */
|
|
921
|
+
--border-left: 3px solid #66bb6a; /* 진한 녹색 */
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
/* 삭제된 라인 (현재 소스에서 AI가 삭제한 것으로 판단된 라인) 배경색 및 경계선 */
|
|
925
|
+
.cm-deleted-line-bg {
|
|
926
|
+
background-color: #ffebe9; /* 연한 빨간색 */
|
|
927
|
+
--border-left: 3px solid #ef5350; /* 진한 빨간색 */
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
/* CodeMirror 선택 영역 배경색 */
|
|
931
|
+
.cm-selectionBackground {
|
|
932
|
+
background-color: #d7d4f9 !important; /* 보라색 계열 */
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/* 텍스트 선택 시 배경색 (브라우저 기본 선택색 재정의) */
|
|
936
|
+
.cm-editor ::selection {
|
|
937
|
+
background-color: #d7d4f9 !important;
|
|
938
|
+
color: inherit !important; /* 텍스트 색상은 유지 */
|
|
939
|
+
}
|
|
940
|
+
.cm-editor::-moz-selection { /* Firefox를 위한 접두사 */
|
|
941
|
+
background-color: #d7d4f9 !important;
|
|
942
|
+
color: inherit !important;
|
|
943
|
+
}
|
|
796
944
|
}
|
package/dist/nine-mu.js
CHANGED
|
@@ -178,7 +178,7 @@ render_fn = function() {
|
|
|
178
178
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
179
179
|
this.shadowRoot.innerHTML = `
|
|
180
180
|
<style>
|
|
181
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
181
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.26"}/dist/css/nine-mu.css";
|
|
182
182
|
${customImport}
|
|
183
183
|
</style>
|
|
184
184
|
<div class="wrapper">
|
|
@@ -26378,7 +26378,7 @@ class NineDiff extends HTMLElement {
|
|
|
26378
26378
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
26379
26379
|
this.shadowRoot.innerHTML = `
|
|
26380
26380
|
<style>
|
|
26381
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
26381
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.26"}/dist/css/nine-mu.css";
|
|
26382
26382
|
${customImport}
|
|
26383
26383
|
</style>
|
|
26384
26384
|
|
|
@@ -26446,25 +26446,13 @@ class NineDiffContainer extends HTMLElement {
|
|
|
26446
26446
|
this.attachShadow({ mode: "open" });
|
|
26447
26447
|
}
|
|
26448
26448
|
render() {
|
|
26449
|
+
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
26449
26450
|
this.shadowRoot.innerHTML = `
|
|
26450
|
-
|
|
26451
|
-
|
|
26452
|
-
|
|
26453
|
-
width: 100%;
|
|
26454
|
-
height: 100%;
|
|
26455
|
-
border: 1px solid #ddd;
|
|
26456
|
-
background: #fff;
|
|
26457
|
-
}
|
|
26458
|
-
.diff-wrapper {
|
|
26459
|
-
width: 100%;
|
|
26460
|
-
height: 100%;
|
|
26461
|
-
overflow: hidden;
|
|
26462
|
-
}
|
|
26463
|
-
nine-diff {
|
|
26464
|
-
width: 100%;
|
|
26465
|
-
height: 100%;
|
|
26466
|
-
}
|
|
26451
|
+
<style>
|
|
26452
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.26"}/dist/css/nine-mu.css";
|
|
26453
|
+
${customImport}
|
|
26467
26454
|
</style>
|
|
26455
|
+
|
|
26468
26456
|
<div class="diff-wrapper">
|
|
26469
26457
|
<nine-diff id="single-diff"></nine-diff>
|
|
26470
26458
|
</div>
|
|
@@ -26497,7 +26485,7 @@ class NineDiffPopup extends HTMLElement {
|
|
|
26497
26485
|
render() {
|
|
26498
26486
|
this.shadowRoot.innerHTML = `
|
|
26499
26487
|
<style>
|
|
26500
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ai@${"0.1.
|
|
26488
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ai@${"0.1.26"}/dist/css/nine-ai.css";
|
|
26501
26489
|
/* nx-dialog 내부 스타일 조정 */
|
|
26502
26490
|
nx-dialog { --dialog-width: 90vw; --dialog-height: 85vh; }
|
|
26503
26491
|
.footer {
|
|
@@ -26652,7 +26640,7 @@ if (!customElements.get("nine-dialog")) {
|
|
|
26652
26640
|
customElements.define("nine-dialog", NineDialog);
|
|
26653
26641
|
}
|
|
26654
26642
|
const NineMu = {
|
|
26655
|
-
version: "0.1.
|
|
26643
|
+
version: "0.1.26",
|
|
26656
26644
|
init: (config) => {
|
|
26657
26645
|
trace.log("🛠️ Nine-Mu Engine initialized", config);
|
|
26658
26646
|
}
|