@meistrari/tela-build 1.24.0 → 1.25.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.
@@ -4,6 +4,8 @@ import { nextTick, ref, toValue } from 'vue'
4
4
  export interface CitationTarget {
5
5
  file: string
6
6
  page: number
7
+ literal?: string
8
+ rationale?: string
7
9
  }
8
10
 
9
11
  export function useCitationNavigation(options: {
@@ -40,7 +42,7 @@ export function useCitationNavigation(options: {
40
42
  return null
41
43
 
42
44
  if ('file' in current && current.file)
43
- return { file: current.file, page: current.page }
45
+ return { file: current.file, page: current.page, literal: current.literal, rationale: current.rationale }
44
46
 
45
47
  return null
46
48
  }
@@ -62,9 +64,8 @@ export function useCitationNavigation(options: {
62
64
  nextTick(() => {
63
65
  activeFile.value = citation.file
64
66
  highlightPage.value = citation.page
65
- highlightText.value = value != null
66
- ? (typeof value === 'string' ? value : String(value))
67
- : null
67
+ highlightText.value = citation.literal
68
+ ?? (value != null ? (typeof value === 'string' ? value : String(value)) : null)
68
69
  highlightExact.value = true
69
70
  })
70
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.24.0",
3
+ "version": "1.25.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",