@emeryld/rrroutes-contract 2.7.6 → 2.7.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@emeryld/rrroutes-contract",
3
3
  "description": "TypeScript contract definitions for RRRoutes",
4
- "version": "2.7.6",
4
+ "version": "2.7.7",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "main": "dist/index.cjs",
@@ -156,6 +156,12 @@
156
156
  color: var(--muted);
157
157
  }
158
158
 
159
+ .kv .k a {
160
+ color: inherit;
161
+ text-decoration: underline;
162
+ text-underline-offset: 2px;
163
+ }
164
+
159
165
  .kv .v {
160
166
  margin-top: 2px;
161
167
  word-break: break-word;
@@ -726,22 +732,27 @@
726
732
 
727
733
  function createSourceRow(key, source, engine) {
728
734
  const box = el('div', 'kv')
729
- box.appendChild(el('div', 'k', key))
735
+ const keyNode = el('div', 'k')
730
736
  const valueNode = el('div', 'v mono')
731
737
 
732
738
  if (!source || !source.file) {
739
+ setHighlighted(keyNode, key, engine)
740
+ box.appendChild(keyNode)
733
741
  setHighlighted(valueNode, '—', engine)
734
742
  box.appendChild(valueNode)
735
743
  return box
736
744
  }
737
745
 
738
746
  const href = sourceHref(source)
739
- const link = document.createElement('a')
740
- link.href = href
741
- link.target = '_blank'
742
- link.rel = 'noopener noreferrer'
743
- link.textContent = `${source.file}:${source.line}:${source.column}`
744
- valueNode.appendChild(link)
747
+ const keyLink = document.createElement('a')
748
+ keyLink.href = href
749
+ keyLink.target = '_blank'
750
+ keyLink.rel = 'noopener noreferrer'
751
+ keyLink.textContent = key
752
+ keyNode.appendChild(keyLink)
753
+
754
+ setHighlighted(valueNode, `${source.file}:${source.line}:${source.column}`, engine)
755
+ box.appendChild(keyNode)
745
756
  box.appendChild(valueNode)
746
757
  return box
747
758
  }