File tree Expand file tree Collapse file tree 6 files changed +30
-6
lines changed
packages/viewer/src/components Expand file tree Collapse file tree 6 files changed +30
-6
lines changed Original file line number Diff line number Diff line change 22 import { Formula } from ' @/components/Shared'
33 import { Table as Theorems } from ' @/components/Theorems'
44 import type { Formula as F , Property , Theorem } from ' @/models'
5+ import { formula as coreFormula } from ' @pi-base/core'
56
67 export let formula: F <Property >
78 export let proof: Theorem [] | ' tautology'
1415 <Formula value ={formula } />
1516 is impossible by
1617
17- <Theorems theorems ={proof } />
18+ <Theorems
19+ theorems ={proof }
20+ emphasizedProperties ={coreFormula .properties (formula )}
21+ />
1822{/if }
Original file line number Diff line number Diff line change 77 export let value: Formula <Property >
88 export let link = true
99 export let subformula = false
10+ export let emphasizedProperties: Set <Property > = new Set ()
1011 </script >
1112
12- {#if value .kind === ' atom' }<Atom {value } {link } />{:else }<Compound
13+ {#if value .kind === ' atom' }<Atom
14+ {value }
15+ {link }
16+ {emphasizedProperties }
17+ />{:else }<Compound
1318 {value }
1419 {link }
1520 grouped ={subformula }
21+ {emphasizedProperties }
1622 />{/if }
Original file line number Diff line number Diff line change 66
77 export let value: Atom <Property >
88 export let link: boolean = true
9+ export let emphasizedProperties: Set <Property > = new Set ()
10+ let emphasized = emphasizedProperties .has (value .property )
911 </script >
1012
1113{value .value === null ? ' ?' : value .value ? ' ' : ' ¬' }{#if link }<Link .Property
1214 property ={value .property }
15+ {emphasized }
1316 />{:else }<Typeset body ={value .property .name } />{/if }
Original file line number Diff line number Diff line change 88 export let value: And <Property > | Or <Property >
99 export let link = true
1010 export let grouped = true
11+ export let emphasizedProperties: Set <Property > = new Set ()
1112
1213 $ : connector = value .kind === ' and' ? ' ∧' : ' ∨'
1314 </script >
1617 value ={f }
1718 {link }
1819 subformula
20+ {emphasizedProperties }
1921 />{i === value .subs .length - 1
2022 ? ' '
2123 : ` ${connector } ` }{/each }{#if grouped }){/if }
Original file line number Diff line number Diff line change 44
55 export let property: { id: number ; name: string }
66 export let content: ' id' | ' idLong' | ' name' = ' name'
7+ export let emphasized: boolean = false
78 </script >
89
9- <a href ="/properties/ {Id .format (' P' , property .id )}" >
10+ <a href ="/properties/ {Id .format (' P' , property .id )}" class:emphasized >
1011 <slot >
1112 {#if content === ' name' }
1213 <Typeset body ={property .name } />
1718 {/if }
1819 </slot >
1920</a >
21+
22+ <style >
23+ .emphasized {
24+ font-weight : bold ;
25+ color : #b032ff ;
26+ }
27+ </style >
Original file line number Diff line number Diff line change 11<script lang =" ts" >
2- import type { Theorem } from ' @/models'
2+ import type { Theorem , Property } from ' @/models'
33 import { Formula , Link } from ' ../Shared'
44
55 export let theorems: Theorem [] = []
6+ export let emphasizedProperties: Set <Property > = new Set ()
67 </script >
78
89<table class =" table" >
2021 <Link .Theorem {theorem } />
2122 </td >
2223 <td >
23- <Formula value ={theorem .when } />
24+ <Formula value ={theorem .when } { emphasizedProperties } />
2425 </td >
2526 <td >
26- <Formula value ={theorem .then } />
27+ <Formula value ={theorem .then } { emphasizedProperties } />
2728 </td >
2829 </tr >
2930 {/each }
You can’t perform that action at this time.
0 commit comments