@rogatio/cli 6.10.0 → 6.11.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.
@@ -214,9 +214,9 @@
214
214
  }
215
215
  .rogatio-editor [data-search-wrap] {
216
216
  margin-left: auto;
217
- flex: 1 1 12rem;
217
+ flex: 0 0 auto;
218
+ width: min(18rem, 100%);
218
219
  min-width: 0;
219
- max-width: 100%;
220
220
  }
221
221
  .rogatio-editor [data-editor-main] {
222
222
  min-width: 0;
@@ -830,6 +830,21 @@
830
830
  .rogatio-editor [data-test-misses] summary {
831
831
  cursor: pointer;
832
832
  }
833
+ .rogatio-editor [data-test-matches] summary {
834
+ cursor: pointer;
835
+ }
836
+ .rogatio-editor [data-test-matches] summary::before {
837
+ content: "\2713";
838
+ color: var(--rogatio-success);
839
+ font-weight: 700;
840
+ margin-right: 0.4em;
841
+ }
842
+ .rogatio-editor [data-test-misses] summary::before {
843
+ content: "\d7";
844
+ color: var(--rogatio-danger);
845
+ font-weight: 700;
846
+ margin-right: 0.4em;
847
+ }
833
848
  .rogatio-editor [data-test-miss-reason] {
834
849
  color: var(--rogatio-muted);
835
850
  }
@@ -3549,8 +3549,8 @@ var EditorControllerImpl = class {
3549
3549
  const matches = urlResult.rules.filter((rule) => rule.matched);
3550
3550
  const misses = urlResult.rules.filter((rule) => !rule.matched);
3551
3551
  card.dataset.matched = matches.length > 0 ? "true" : "false";
3552
- for (const rule of matches) {
3553
- card.append(this.renderTestOutcome(urlResult.url, rule));
3552
+ if (matches.length > 0) {
3553
+ card.append(this.renderTestMatches(urlResult.url, matches));
3554
3554
  }
3555
3555
  if (misses.length > 0) {
3556
3556
  card.append(this.renderTestMisses(misses));
@@ -3605,6 +3605,22 @@ var EditorControllerImpl = class {
3605
3605
  outcome.append(lead, ruleButton, tail);
3606
3606
  return outcome;
3607
3607
  }
3608
+ /**
3609
+ * Matching rules sit under an open disclosure headed by their count, mirroring
3610
+ * the closed misses disclosure so both lists are labeled the same way.
3611
+ */
3612
+ renderTestMatches(url, matches) {
3613
+ const details = this.document.createElement("details");
3614
+ details.dataset.testMatches = "true";
3615
+ details.open = true;
3616
+ const summary = this.document.createElement("summary");
3617
+ summary.textContent = matches.length === 1 ? "1 rule matched" : `${matches.length} rules matched`;
3618
+ details.append(summary);
3619
+ for (const rule of matches) {
3620
+ details.append(this.renderTestOutcome(url, rule));
3621
+ }
3622
+ return details;
3623
+ }
3608
3624
  renderTestMisses(misses) {
3609
3625
  const details = this.document.createElement("details");
3610
3626
  details.dataset.testMisses = "true";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rogatio/cli",
3
- "version": "6.10.0",
3
+ "version": "6.11.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Local-first browser request and response rules — editor host, file verification, test runner, and runtime dispatch.",