ide-assi 0.324.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.
@@ -194025,7 +194025,6 @@ class IdeAssi extends HTMLElement
194025
194025
 
194026
194026
  <div class="wrapper">
194027
194027
  <ide-assi-settings></ide-assi-settings>
194028
- <ide-diff-popup></ide-diff-popup>
194029
194028
 
194030
194029
  <div class="container">
194031
194030
  <div class="head">
@@ -196586,9 +196585,9 @@ class IdeDiff extends HTMLElement
196586
196585
  </style>
196587
196586
 
196588
196587
  <div class="wrapper">
196589
- <div class="asis"></div>
196588
+ <div class="panel asis"><pre></pre></div>
196590
196589
  <nx-splitter></nx-splitter>
196591
- <div class="tobe"></div>
196590
+ <div class="panel tobe"><pre></pre></div>
196592
196591
  </div>
196593
196592
  `;
196594
196593
 
@@ -196605,17 +196604,29 @@ class IdeDiff extends HTMLElement
196605
196604
  const diffs = dmp.diff_main(this.#asisSrc, this.#tobeSrc);
196606
196605
  dmp.diff_cleanupSemantic(diffs);
196607
196606
 
196608
- const html = diffs.map(([op, text]) => {
196607
+ const asisHtml = [];
196608
+ const tobeHtml = [];
196609
+
196610
+ for (const [op, text] of diffs) {
196609
196611
  switch (op) {
196610
- case diffMatchPatchExports.diff_match_patch.DIFF_INSERT: return `<ins>${text}</ins>`;
196611
- case diffMatchPatchExports.diff_match_patch.DIFF_DELETE: return `<del>${text}</del>`;
196612
- case diffMatchPatchExports.diff_match_patch.DIFF_EQUAL: return `<span>${text}</span>`;
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;
196613
196622
  }
196614
- }).join('');
196623
+ }
196615
196624
 
196616
- this.shadowRoot.querySelector('.tobe').innerHTML = html;
196625
+ this.shadowRoot.querySelector('.asis pre').innerHTML = asisHtml.join('');
196626
+ this.shadowRoot.querySelector('.tobe pre').innerHTML = tobeHtml.join('');
196617
196627
  };
196618
196628
 
196629
+
196619
196630
  initialize = (src1, src2) => {
196620
196631
  console.log(src1, src2);
196621
196632
 
@@ -194021,7 +194021,6 @@ class IdeAssi extends HTMLElement
194021
194021
 
194022
194022
  <div class="wrapper">
194023
194023
  <ide-assi-settings></ide-assi-settings>
194024
- <ide-diff-popup></ide-diff-popup>
194025
194024
 
194026
194025
  <div class="container">
194027
194026
  <div class="head">
@@ -196582,9 +196581,9 @@ class IdeDiff extends HTMLElement
196582
196581
  </style>
196583
196582
 
196584
196583
  <div class="wrapper">
196585
- <div class="asis"></div>
196584
+ <div class="panel asis"><pre></pre></div>
196586
196585
  <nx-splitter></nx-splitter>
196587
- <div class="tobe"></div>
196586
+ <div class="panel tobe"><pre></pre></div>
196588
196587
  </div>
196589
196588
  `;
196590
196589
 
@@ -196601,17 +196600,29 @@ class IdeDiff extends HTMLElement
196601
196600
  const diffs = dmp.diff_main(this.#asisSrc, this.#tobeSrc);
196602
196601
  dmp.diff_cleanupSemantic(diffs);
196603
196602
 
196604
- const html = diffs.map(([op, text]) => {
196603
+ const asisHtml = [];
196604
+ const tobeHtml = [];
196605
+
196606
+ for (const [op, text] of diffs) {
196605
196607
  switch (op) {
196606
- case diffMatchPatchExports.diff_match_patch.DIFF_INSERT: return `<ins>${text}</ins>`;
196607
- case diffMatchPatchExports.diff_match_patch.DIFF_DELETE: return `<del>${text}</del>`;
196608
- case diffMatchPatchExports.diff_match_patch.DIFF_EQUAL: return `<span>${text}</span>`;
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;
196609
196618
  }
196610
- }).join('');
196619
+ }
196611
196620
 
196612
- this.shadowRoot.querySelector('.tobe').innerHTML = html;
196621
+ this.shadowRoot.querySelector('.asis pre').innerHTML = asisHtml.join('');
196622
+ this.shadowRoot.querySelector('.tobe pre').innerHTML = tobeHtml.join('');
196613
196623
  };
196614
196624
 
196625
+
196615
196626
  initialize = (src1, src2) => {
196616
196627
  console.log(src1, src2);
196617
196628
 
@@ -29,7 +29,6 @@ export class IdeAssi extends HTMLElement
29
29
 
30
30
  <div class="wrapper">
31
31
  <ide-assi-settings></ide-assi-settings>
32
- <ide-diff-popup></ide-diff-popup>
33
32
 
34
33
  <div class="container">
35
34
  <div class="head">
@@ -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 html = diffs.map(([op, text]) => {
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: return `<ins>${text}</ins>`;
46
- case diff_match_patch.DIFF_DELETE: return `<del>${text}</del>`;
47
- case diff_match_patch.DIFF_EQUAL: return `<span>${text}</span>`;
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
- }).join('');
59
+ }
50
60
 
51
- this.shadowRoot.querySelector('.tobe').innerHTML = html;
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.324.0",
4
+ "version": "0.326.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -29,7 +29,6 @@ export class IdeAssi extends HTMLElement
29
29
 
30
30
  <div class="wrapper">
31
31
  <ide-assi-settings></ide-assi-settings>
32
- <ide-diff-popup></ide-diff-popup>
33
32
 
34
33
  <div class="container">
35
34
  <div class="head">
@@ -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 html = diffs.map(([op, text]) => {
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: return `<ins>${text}</ins>`;
46
- case diff_match_patch.DIFF_DELETE: return `<del>${text}</del>`;
47
- case diff_match_patch.DIFF_EQUAL: return `<span>${text}</span>`;
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
- }).join('');
59
+ }
50
60
 
51
- this.shadowRoot.querySelector('.tobe').innerHTML = html;
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