@emeryld/rrroutes-contract 2.7.12 → 2.7.13
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
|
@@ -978,37 +978,24 @@
|
|
|
978
978
|
return `vscode://file/${encodeURI(vscodePath)}:${line}:${column}`
|
|
979
979
|
}
|
|
980
980
|
|
|
981
|
-
function
|
|
982
|
-
if (!source || !source.file) return '—'
|
|
983
|
-
const line = Number.isFinite(source.line) ? source.line : 1
|
|
984
|
-
const column = Number.isFinite(source.column) ? source.column : 1
|
|
985
|
-
return `${source.file}:${line}:${column}`
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
function createSourceRow(key, source, engine) {
|
|
981
|
+
function createSourceRow(label, source, engine) {
|
|
989
982
|
const box = el('div', 'kv')
|
|
990
|
-
const
|
|
991
|
-
const valueNode = el('div', 'v mono')
|
|
983
|
+
const labelNode = el('div', 'v mono')
|
|
992
984
|
|
|
993
985
|
if (!source || !source.file) {
|
|
994
|
-
setHighlighted(
|
|
995
|
-
box.appendChild(
|
|
996
|
-
setHighlighted(valueNode, '—', engine)
|
|
997
|
-
box.appendChild(valueNode)
|
|
986
|
+
setHighlighted(labelNode, label, engine)
|
|
987
|
+
box.appendChild(labelNode)
|
|
998
988
|
return box
|
|
999
989
|
}
|
|
1000
990
|
|
|
1001
991
|
const href = sourceHref(source)
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
setHighlighted(valueNode, sourceDisplay(source), engine)
|
|
1010
|
-
box.appendChild(keyNode)
|
|
1011
|
-
box.appendChild(valueNode)
|
|
992
|
+
const link = document.createElement('a')
|
|
993
|
+
link.href = href
|
|
994
|
+
link.target = '_blank'
|
|
995
|
+
link.rel = 'noopener noreferrer'
|
|
996
|
+
link.innerHTML = engine.highlight(label)
|
|
997
|
+
labelNode.appendChild(link)
|
|
998
|
+
box.appendChild(labelNode)
|
|
1012
999
|
return box
|
|
1013
1000
|
}
|
|
1014
1001
|
|
|
@@ -1055,6 +1042,11 @@
|
|
|
1055
1042
|
}
|
|
1056
1043
|
}
|
|
1057
1044
|
|
|
1045
|
+
function resolveSchemaSourceLabel(schemaKey, sourceValue) {
|
|
1046
|
+
if (!sourceValue || typeof sourceValue !== 'object') return schemaKey || 'schema'
|
|
1047
|
+
return sourceValue.sourceName || sourceValue.tag || schemaKey || 'schema'
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1058
1050
|
function createTreeNode(name = '') {
|
|
1059
1051
|
return {
|
|
1060
1052
|
name,
|
|
@@ -1174,7 +1166,10 @@
|
|
|
1174
1166
|
if (schemaSource.sourceValue) {
|
|
1175
1167
|
block.appendChild(
|
|
1176
1168
|
createSourceRow(
|
|
1177
|
-
|
|
1169
|
+
resolveSchemaSourceLabel(
|
|
1170
|
+
schemaSource.schemaKey || `${sectionName}Schema`,
|
|
1171
|
+
schemaSource.sourceValue,
|
|
1172
|
+
),
|
|
1178
1173
|
schemaSource.sourceValue,
|
|
1179
1174
|
engine,
|
|
1180
1175
|
),
|