ide-assi 0.325.0 → 0.326.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 +20 -8
- package/dist/bundle.esm.js +20 -8
- package/dist/components/ideDiff.js +20 -8
- package/package.json +1 -1
- package/src/components/ideDiff.js +20 -8
package/dist/bundle.cjs.js
CHANGED
|
@@ -196585,9 +196585,9 @@ class IdeDiff extends HTMLElement
|
|
|
196585
196585
|
</style>
|
|
196586
196586
|
|
|
196587
196587
|
<div class="wrapper">
|
|
196588
|
-
<div class="asis"></div>
|
|
196588
|
+
<div class="panel asis"><pre></pre></div>
|
|
196589
196589
|
<nx-splitter></nx-splitter>
|
|
196590
|
-
<div class="tobe"></div>
|
|
196590
|
+
<div class="panel tobe"><pre></pre></div>
|
|
196591
196591
|
</div>
|
|
196592
196592
|
`;
|
|
196593
196593
|
|
|
@@ -196604,17 +196604,29 @@ class IdeDiff extends HTMLElement
|
|
|
196604
196604
|
const diffs = dmp.diff_main(this.#asisSrc, this.#tobeSrc);
|
|
196605
196605
|
dmp.diff_cleanupSemantic(diffs);
|
|
196606
196606
|
|
|
196607
|
-
const
|
|
196607
|
+
const asisHtml = [];
|
|
196608
|
+
const tobeHtml = [];
|
|
196609
|
+
|
|
196610
|
+
for (const [op, text] of diffs) {
|
|
196608
196611
|
switch (op) {
|
|
196609
|
-
case diffMatchPatchExports.diff_match_patch.DIFF_INSERT:
|
|
196610
|
-
|
|
196611
|
-
|
|
196612
|
+
case diffMatchPatchExports.diff_match_patch.DIFF_INSERT:
|
|
196613
|
+
tobeHtml.push(`<ins>${text}</ins>`);
|
|
196614
|
+
break;
|
|
196615
|
+
case diffMatchPatchExports.diff_match_patch.DIFF_DELETE:
|
|
196616
|
+
asisHtml.push(`<del>${text}</del>`);
|
|
196617
|
+
break;
|
|
196618
|
+
case diffMatchPatchExports.diff_match_patch.DIFF_EQUAL:
|
|
196619
|
+
asisHtml.push(`<span>${text}</span>`);
|
|
196620
|
+
tobeHtml.push(`<span>${text}</span>`);
|
|
196621
|
+
break;
|
|
196612
196622
|
}
|
|
196613
|
-
}
|
|
196623
|
+
}
|
|
196614
196624
|
|
|
196615
|
-
this.shadowRoot.querySelector('.
|
|
196625
|
+
this.shadowRoot.querySelector('.asis pre').innerHTML = asisHtml.join('');
|
|
196626
|
+
this.shadowRoot.querySelector('.tobe pre').innerHTML = tobeHtml.join('');
|
|
196616
196627
|
};
|
|
196617
196628
|
|
|
196629
|
+
|
|
196618
196630
|
initialize = (src1, src2) => {
|
|
196619
196631
|
console.log(src1, src2);
|
|
196620
196632
|
|
package/dist/bundle.esm.js
CHANGED
|
@@ -196581,9 +196581,9 @@ class IdeDiff extends HTMLElement
|
|
|
196581
196581
|
</style>
|
|
196582
196582
|
|
|
196583
196583
|
<div class="wrapper">
|
|
196584
|
-
<div class="asis"></div>
|
|
196584
|
+
<div class="panel asis"><pre></pre></div>
|
|
196585
196585
|
<nx-splitter></nx-splitter>
|
|
196586
|
-
<div class="tobe"></div>
|
|
196586
|
+
<div class="panel tobe"><pre></pre></div>
|
|
196587
196587
|
</div>
|
|
196588
196588
|
`;
|
|
196589
196589
|
|
|
@@ -196600,17 +196600,29 @@ class IdeDiff extends HTMLElement
|
|
|
196600
196600
|
const diffs = dmp.diff_main(this.#asisSrc, this.#tobeSrc);
|
|
196601
196601
|
dmp.diff_cleanupSemantic(diffs);
|
|
196602
196602
|
|
|
196603
|
-
const
|
|
196603
|
+
const asisHtml = [];
|
|
196604
|
+
const tobeHtml = [];
|
|
196605
|
+
|
|
196606
|
+
for (const [op, text] of diffs) {
|
|
196604
196607
|
switch (op) {
|
|
196605
|
-
case diffMatchPatchExports.diff_match_patch.DIFF_INSERT:
|
|
196606
|
-
|
|
196607
|
-
|
|
196608
|
+
case diffMatchPatchExports.diff_match_patch.DIFF_INSERT:
|
|
196609
|
+
tobeHtml.push(`<ins>${text}</ins>`);
|
|
196610
|
+
break;
|
|
196611
|
+
case diffMatchPatchExports.diff_match_patch.DIFF_DELETE:
|
|
196612
|
+
asisHtml.push(`<del>${text}</del>`);
|
|
196613
|
+
break;
|
|
196614
|
+
case diffMatchPatchExports.diff_match_patch.DIFF_EQUAL:
|
|
196615
|
+
asisHtml.push(`<span>${text}</span>`);
|
|
196616
|
+
tobeHtml.push(`<span>${text}</span>`);
|
|
196617
|
+
break;
|
|
196608
196618
|
}
|
|
196609
|
-
}
|
|
196619
|
+
}
|
|
196610
196620
|
|
|
196611
|
-
this.shadowRoot.querySelector('.
|
|
196621
|
+
this.shadowRoot.querySelector('.asis pre').innerHTML = asisHtml.join('');
|
|
196622
|
+
this.shadowRoot.querySelector('.tobe pre').innerHTML = tobeHtml.join('');
|
|
196612
196623
|
};
|
|
196613
196624
|
|
|
196625
|
+
|
|
196614
196626
|
initialize = (src1, src2) => {
|
|
196615
196627
|
console.log(src1, src2);
|
|
196616
196628
|
|
|
@@ -21,9 +21,9 @@ export class IdeDiff extends HTMLElement
|
|
|
21
21
|
</style>
|
|
22
22
|
|
|
23
23
|
<div class="wrapper">
|
|
24
|
-
<div class="asis"></div>
|
|
24
|
+
<div class="panel asis"><pre></pre></div>
|
|
25
25
|
<nx-splitter></nx-splitter>
|
|
26
|
-
<div class="tobe"></div>
|
|
26
|
+
<div class="panel tobe"><pre></pre></div>
|
|
27
27
|
</div>
|
|
28
28
|
`;
|
|
29
29
|
|
|
@@ -40,17 +40,29 @@ export class IdeDiff extends HTMLElement
|
|
|
40
40
|
const diffs = dmp.diff_main(this.#asisSrc, this.#tobeSrc);
|
|
41
41
|
dmp.diff_cleanupSemantic(diffs);
|
|
42
42
|
|
|
43
|
-
const
|
|
43
|
+
const asisHtml = [];
|
|
44
|
+
const tobeHtml = [];
|
|
45
|
+
|
|
46
|
+
for (const [op, text] of diffs) {
|
|
44
47
|
switch (op) {
|
|
45
|
-
case diff_match_patch.DIFF_INSERT:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
case diff_match_patch.DIFF_INSERT:
|
|
49
|
+
tobeHtml.push(`<ins>${text}</ins>`);
|
|
50
|
+
break;
|
|
51
|
+
case diff_match_patch.DIFF_DELETE:
|
|
52
|
+
asisHtml.push(`<del>${text}</del>`);
|
|
53
|
+
break;
|
|
54
|
+
case diff_match_patch.DIFF_EQUAL:
|
|
55
|
+
asisHtml.push(`<span>${text}</span>`);
|
|
56
|
+
tobeHtml.push(`<span>${text}</span>`);
|
|
57
|
+
break;
|
|
48
58
|
}
|
|
49
|
-
}
|
|
59
|
+
}
|
|
50
60
|
|
|
51
|
-
this.shadowRoot.querySelector('.
|
|
61
|
+
this.shadowRoot.querySelector('.asis pre').innerHTML = asisHtml.join('');
|
|
62
|
+
this.shadowRoot.querySelector('.tobe pre').innerHTML = tobeHtml.join('');
|
|
52
63
|
};
|
|
53
64
|
|
|
65
|
+
|
|
54
66
|
initialize = (src1, src2) => {
|
|
55
67
|
console.log(src1, src2);
|
|
56
68
|
|
package/package.json
CHANGED
|
@@ -21,9 +21,9 @@ export class IdeDiff extends HTMLElement
|
|
|
21
21
|
</style>
|
|
22
22
|
|
|
23
23
|
<div class="wrapper">
|
|
24
|
-
<div class="asis"></div>
|
|
24
|
+
<div class="panel asis"><pre></pre></div>
|
|
25
25
|
<nx-splitter></nx-splitter>
|
|
26
|
-
<div class="tobe"></div>
|
|
26
|
+
<div class="panel tobe"><pre></pre></div>
|
|
27
27
|
</div>
|
|
28
28
|
`;
|
|
29
29
|
|
|
@@ -40,17 +40,29 @@ export class IdeDiff extends HTMLElement
|
|
|
40
40
|
const diffs = dmp.diff_main(this.#asisSrc, this.#tobeSrc);
|
|
41
41
|
dmp.diff_cleanupSemantic(diffs);
|
|
42
42
|
|
|
43
|
-
const
|
|
43
|
+
const asisHtml = [];
|
|
44
|
+
const tobeHtml = [];
|
|
45
|
+
|
|
46
|
+
for (const [op, text] of diffs) {
|
|
44
47
|
switch (op) {
|
|
45
|
-
case diff_match_patch.DIFF_INSERT:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
case diff_match_patch.DIFF_INSERT:
|
|
49
|
+
tobeHtml.push(`<ins>${text}</ins>`);
|
|
50
|
+
break;
|
|
51
|
+
case diff_match_patch.DIFF_DELETE:
|
|
52
|
+
asisHtml.push(`<del>${text}</del>`);
|
|
53
|
+
break;
|
|
54
|
+
case diff_match_patch.DIFF_EQUAL:
|
|
55
|
+
asisHtml.push(`<span>${text}</span>`);
|
|
56
|
+
tobeHtml.push(`<span>${text}</span>`);
|
|
57
|
+
break;
|
|
48
58
|
}
|
|
49
|
-
}
|
|
59
|
+
}
|
|
50
60
|
|
|
51
|
-
this.shadowRoot.querySelector('.
|
|
61
|
+
this.shadowRoot.querySelector('.asis pre').innerHTML = asisHtml.join('');
|
|
62
|
+
this.shadowRoot.querySelector('.tobe pre').innerHTML = tobeHtml.join('');
|
|
52
63
|
};
|
|
53
64
|
|
|
65
|
+
|
|
54
66
|
initialize = (src1, src2) => {
|
|
55
67
|
console.log(src1, src2);
|
|
56
68
|
|