ide-assi 0.336.0 → 0.338.0
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/bundle.cjs.js +10 -2236
- package/dist/bundle.esm.js +10 -2236
- package/dist/components/ideDiff.js +10 -7
- package/package.json +1 -1
- package/src/components/ideDiff.js +10 -7
|
@@ -4,17 +4,17 @@ import ninegrid from "ninegrid2";
|
|
|
4
4
|
import {
|
|
5
5
|
EditorView, lineNumbers, highlightSpecialChars, drawSelection,
|
|
6
6
|
dropCursor, keymap, highlightActiveLine, highlightActiveLineGutter,
|
|
7
|
-
// 데코레이션을 위한 Decoration 클래스 임포트
|
|
8
7
|
Decoration
|
|
9
8
|
} from "@codemirror/view";
|
|
10
9
|
import {
|
|
11
10
|
EditorState, Compartment, StateField,
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
RangeSetBuilder,
|
|
12
|
+
StateEffect
|
|
14
13
|
} from "@codemirror/state";
|
|
15
14
|
import { history, historyKeymap, indentWithTab } from "@codemirror/commands";
|
|
16
15
|
import { defaultKeymap, selectAll } from "@codemirror/commands";
|
|
17
16
|
import { searchKeymap, highlightSelectionMatches } from "@codemirror/search";
|
|
17
|
+
// ⭐️ 이 부분이 수정되었습니다: => 가 아니라 from 입니다.
|
|
18
18
|
import { bracketMatching } from "@codemirror/language";
|
|
19
19
|
import { javascript } from "@codemirror/lang-javascript";
|
|
20
20
|
import { indentOnInput, syntaxHighlighting, defaultHighlightStyle } from "@codemirror/language";
|
|
@@ -22,7 +22,9 @@ import { lintKeymap } from "@codemirror/lint";
|
|
|
22
22
|
import { autocompletion, completionKeymap } from "@codemirror/autocomplete";
|
|
23
23
|
|
|
24
24
|
// Diff 로직을 위해 diff-match-patch 사용
|
|
25
|
-
import { diff_match_patch } from 'diff-
|
|
25
|
+
import { diff_match_patch } from 'diff-match_patch';
|
|
26
|
+
|
|
27
|
+
// ... (나머지 코드는 동일) ...
|
|
26
28
|
|
|
27
29
|
// --- 여기서부터 수정된 부분 ---
|
|
28
30
|
|
|
@@ -55,13 +57,14 @@ const tobeDiffDecorations = StateField.define({
|
|
|
55
57
|
});
|
|
56
58
|
|
|
57
59
|
// 데코레이션 업데이트를 위한 Effect (트랜잭션에 포함시켜 상태 변경 알림)
|
|
58
|
-
// ⭐️
|
|
59
|
-
const setAsisDecorationsEffect =
|
|
60
|
-
const setTobeDecorationsEffect =
|
|
60
|
+
// ⭐️ StateEffect.define()을 사용하여 이펙트를 정의합니다.
|
|
61
|
+
const setAsisDecorationsEffect = StateEffect.define();
|
|
62
|
+
const setTobeDecorationsEffect = StateEffect.define();
|
|
61
63
|
|
|
62
64
|
// --- 여기까지 수정된 부분 ---
|
|
63
65
|
|
|
64
66
|
export class IdeDiff extends HTMLElement {
|
|
67
|
+
|
|
65
68
|
#asisEditorView;
|
|
66
69
|
#tobeEditorView;
|
|
67
70
|
#asisEditorEl;
|
package/package.json
CHANGED
|
@@ -4,17 +4,17 @@ import ninegrid from "ninegrid2";
|
|
|
4
4
|
import {
|
|
5
5
|
EditorView, lineNumbers, highlightSpecialChars, drawSelection,
|
|
6
6
|
dropCursor, keymap, highlightActiveLine, highlightActiveLineGutter,
|
|
7
|
-
// 데코레이션을 위한 Decoration 클래스 임포트
|
|
8
7
|
Decoration
|
|
9
8
|
} from "@codemirror/view";
|
|
10
9
|
import {
|
|
11
10
|
EditorState, Compartment, StateField,
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
RangeSetBuilder,
|
|
12
|
+
StateEffect
|
|
14
13
|
} from "@codemirror/state";
|
|
15
14
|
import { history, historyKeymap, indentWithTab } from "@codemirror/commands";
|
|
16
15
|
import { defaultKeymap, selectAll } from "@codemirror/commands";
|
|
17
16
|
import { searchKeymap, highlightSelectionMatches } from "@codemirror/search";
|
|
17
|
+
// ⭐️ 이 부분이 수정되었습니다: => 가 아니라 from 입니다.
|
|
18
18
|
import { bracketMatching } from "@codemirror/language";
|
|
19
19
|
import { javascript } from "@codemirror/lang-javascript";
|
|
20
20
|
import { indentOnInput, syntaxHighlighting, defaultHighlightStyle } from "@codemirror/language";
|
|
@@ -22,7 +22,9 @@ import { lintKeymap } from "@codemirror/lint";
|
|
|
22
22
|
import { autocompletion, completionKeymap } from "@codemirror/autocomplete";
|
|
23
23
|
|
|
24
24
|
// Diff 로직을 위해 diff-match-patch 사용
|
|
25
|
-
import { diff_match_patch } from 'diff-
|
|
25
|
+
import { diff_match_patch } from 'diff-match_patch';
|
|
26
|
+
|
|
27
|
+
// ... (나머지 코드는 동일) ...
|
|
26
28
|
|
|
27
29
|
// --- 여기서부터 수정된 부분 ---
|
|
28
30
|
|
|
@@ -55,13 +57,14 @@ const tobeDiffDecorations = StateField.define({
|
|
|
55
57
|
});
|
|
56
58
|
|
|
57
59
|
// 데코레이션 업데이트를 위한 Effect (트랜잭션에 포함시켜 상태 변경 알림)
|
|
58
|
-
// ⭐️
|
|
59
|
-
const setAsisDecorationsEffect =
|
|
60
|
-
const setTobeDecorationsEffect =
|
|
60
|
+
// ⭐️ StateEffect.define()을 사용하여 이펙트를 정의합니다.
|
|
61
|
+
const setAsisDecorationsEffect = StateEffect.define();
|
|
62
|
+
const setTobeDecorationsEffect = StateEffect.define();
|
|
61
63
|
|
|
62
64
|
// --- 여기까지 수정된 부분 ---
|
|
63
65
|
|
|
64
66
|
export class IdeDiff extends HTMLElement {
|
|
67
|
+
|
|
65
68
|
#asisEditorView;
|
|
66
69
|
#tobeEditorView;
|
|
67
70
|
#asisEditorEl;
|