ide-assi 0.325.0 → 0.327.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.
@@ -194318,7 +194318,14 @@ class IdeDiffPopup extends HTMLElement
194318
194318
  </style>
194319
194319
 
194320
194320
  <nx-dialog>
194321
- <ide-diff></ide-diff>
194321
+ <nx-tab theme="theme-3" ref={tabRef}>
194322
+ <nx-tab-page caption="1">
194323
+ <ide-diff></ide-diff>
194324
+ </nx-tab-page>
194325
+ <nx-tab-page caption="2">
194326
+ <ide-diff></ide-diff>
194327
+ </nx-tab-page>
194328
+ </nx-tab>
194322
194329
  </nx-dialog>
194323
194330
  `;
194324
194331
  }
@@ -196585,9 +196592,9 @@ class IdeDiff extends HTMLElement
196585
196592
  </style>
196586
196593
 
196587
196594
  <div class="wrapper">
196588
- <div class="asis"></div>
196595
+ <div class="panel asis"><pre></pre></div>
196589
196596
  <nx-splitter></nx-splitter>
196590
- <div class="tobe"></div>
196597
+ <div class="panel tobe"><pre></pre></div>
196591
196598
  </div>
196592
196599
  `;
196593
196600
 
@@ -196604,17 +196611,29 @@ class IdeDiff extends HTMLElement
196604
196611
  const diffs = dmp.diff_main(this.#asisSrc, this.#tobeSrc);
196605
196612
  dmp.diff_cleanupSemantic(diffs);
196606
196613
 
196607
- const html = diffs.map(([op, text]) => {
196614
+ const asisHtml = [];
196615
+ const tobeHtml = [];
196616
+
196617
+ for (const [op, text] of diffs) {
196608
196618
  switch (op) {
196609
- case diffMatchPatchExports.diff_match_patch.DIFF_INSERT: return `<ins>${text}</ins>`;
196610
- case diffMatchPatchExports.diff_match_patch.DIFF_DELETE: return `<del>${text}</del>`;
196611
- case diffMatchPatchExports.diff_match_patch.DIFF_EQUAL: return `<span>${text}</span>`;
196619
+ case diffMatchPatchExports.diff_match_patch.DIFF_INSERT:
196620
+ tobeHtml.push(`<ins>${text}</ins>`);
196621
+ break;
196622
+ case diffMatchPatchExports.diff_match_patch.DIFF_DELETE:
196623
+ asisHtml.push(`<del>${text}</del>`);
196624
+ break;
196625
+ case diffMatchPatchExports.diff_match_patch.DIFF_EQUAL:
196626
+ asisHtml.push(`<span>${text}</span>`);
196627
+ tobeHtml.push(`<span>${text}</span>`);
196628
+ break;
196612
196629
  }
196613
- }).join('');
196630
+ }
196614
196631
 
196615
- this.shadowRoot.querySelector('.tobe').innerHTML = html;
196632
+ this.shadowRoot.querySelector('.asis pre').innerHTML = asisHtml.join('');
196633
+ this.shadowRoot.querySelector('.tobe pre').innerHTML = tobeHtml.join('');
196616
196634
  };
196617
196635
 
196636
+
196618
196637
  initialize = (src1, src2) => {
196619
196638
  console.log(src1, src2);
196620
196639
 
@@ -194314,7 +194314,14 @@ class IdeDiffPopup extends HTMLElement
194314
194314
  </style>
194315
194315
 
194316
194316
  <nx-dialog>
194317
- <ide-diff></ide-diff>
194317
+ <nx-tab theme="theme-3" ref={tabRef}>
194318
+ <nx-tab-page caption="1">
194319
+ <ide-diff></ide-diff>
194320
+ </nx-tab-page>
194321
+ <nx-tab-page caption="2">
194322
+ <ide-diff></ide-diff>
194323
+ </nx-tab-page>
194324
+ </nx-tab>
194318
194325
  </nx-dialog>
194319
194326
  `;
194320
194327
  }
@@ -196581,9 +196588,9 @@ class IdeDiff extends HTMLElement
196581
196588
  </style>
196582
196589
 
196583
196590
  <div class="wrapper">
196584
- <div class="asis"></div>
196591
+ <div class="panel asis"><pre></pre></div>
196585
196592
  <nx-splitter></nx-splitter>
196586
- <div class="tobe"></div>
196593
+ <div class="panel tobe"><pre></pre></div>
196587
196594
  </div>
196588
196595
  `;
196589
196596
 
@@ -196600,17 +196607,29 @@ class IdeDiff extends HTMLElement
196600
196607
  const diffs = dmp.diff_main(this.#asisSrc, this.#tobeSrc);
196601
196608
  dmp.diff_cleanupSemantic(diffs);
196602
196609
 
196603
- const html = diffs.map(([op, text]) => {
196610
+ const asisHtml = [];
196611
+ const tobeHtml = [];
196612
+
196613
+ for (const [op, text] of diffs) {
196604
196614
  switch (op) {
196605
- case diffMatchPatchExports.diff_match_patch.DIFF_INSERT: return `<ins>${text}</ins>`;
196606
- case diffMatchPatchExports.diff_match_patch.DIFF_DELETE: return `<del>${text}</del>`;
196607
- case diffMatchPatchExports.diff_match_patch.DIFF_EQUAL: return `<span>${text}</span>`;
196615
+ case diffMatchPatchExports.diff_match_patch.DIFF_INSERT:
196616
+ tobeHtml.push(`<ins>${text}</ins>`);
196617
+ break;
196618
+ case diffMatchPatchExports.diff_match_patch.DIFF_DELETE:
196619
+ asisHtml.push(`<del>${text}</del>`);
196620
+ break;
196621
+ case diffMatchPatchExports.diff_match_patch.DIFF_EQUAL:
196622
+ asisHtml.push(`<span>${text}</span>`);
196623
+ tobeHtml.push(`<span>${text}</span>`);
196624
+ break;
196608
196625
  }
196609
- }).join('');
196626
+ }
196610
196627
 
196611
- this.shadowRoot.querySelector('.tobe').innerHTML = html;
196628
+ this.shadowRoot.querySelector('.asis pre').innerHTML = asisHtml.join('');
196629
+ this.shadowRoot.querySelector('.tobe pre').innerHTML = tobeHtml.join('');
196612
196630
  };
196613
196631
 
196632
+
196614
196633
  initialize = (src1, src2) => {
196615
196634
  console.log(src1, src2);
196616
196635
 
@@ -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
 
@@ -19,7 +19,14 @@ class IdeDiffPopup extends HTMLElement
19
19
  </style>
20
20
 
21
21
  <nx-dialog>
22
- <ide-diff></ide-diff>
22
+ <nx-tab theme="theme-3" ref={tabRef}>
23
+ <nx-tab-page caption="1">
24
+ <ide-diff></ide-diff>
25
+ </nx-tab-page>
26
+ <nx-tab-page caption="2">
27
+ <ide-diff></ide-diff>
28
+ </nx-tab-page>
29
+ </nx-tab>
23
30
  </nx-dialog>
24
31
  `;
25
32
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.325.0",
4
+ "version": "0.327.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -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
 
@@ -19,7 +19,14 @@ class IdeDiffPopup extends HTMLElement
19
19
  </style>
20
20
 
21
21
  <nx-dialog>
22
- <ide-diff></ide-diff>
22
+ <nx-tab theme="theme-3" ref={tabRef}>
23
+ <nx-tab-page caption="1">
24
+ <ide-diff></ide-diff>
25
+ </nx-tab-page>
26
+ <nx-tab-page caption="2">
27
+ <ide-diff></ide-diff>
28
+ </nx-tab-page>
29
+ </nx-tab>
23
30
  </nx-dialog>
24
31
  `;
25
32
  }