text-compare-vue3
Version:
A powerful text comparison plugin for Vue.js with character-level diff support
40 lines (36 loc) • 720 B
text/typescript
export interface DiffPart {
value: string
added?: boolean
removed?: boolean
}
export interface DiffResult {
oldParts: DiffPart[]
newParts: DiffPart[]
statistics?: {
additions: number
deletions: number
changes: number
duplicates?: number
}
}
export interface DiffOptions {
ignoreCase?: boolean
ignoreSpace?: boolean
timeout?: number
ignoreRepeat?: boolean
}
export interface TextDiffProps {
oldText: string
newText: string
isDifferent?: boolean
mode?: 'diff' | 'full'
options?: TextComparisonOptions
showSimilarity?: boolean
}
export interface TextComparisonOptions {
customColors?: {
commonColor?: string
removedColor?: string
addedColor?: string
}
}