@@ -43,11 +43,11 @@ function BookTitleInput({
4343 ...props
4444} : React . PropsWithChildren < React . ComponentProps < typeof Input > > ) {
4545 const inputProps = useLiveInputField (
46- ( ) => $project . valueOrThrow . bibliography . title ,
46+ ( ) => $project . valueOrThrow ( ) . bibliography . title ,
4747 {
4848 onSave : ( value ) => {
4949 const title = value . trim ( ) ;
50- $project . valueOrThrow . bibliography . title = title ;
50+ $project . valueOrThrow ( ) . bibliography . title = title ;
5151 return title ;
5252 } ,
5353 } ,
@@ -66,11 +66,11 @@ function AuthorInput({
6666 ...props
6767} : React . PropsWithChildren < React . ComponentProps < typeof Input > > ) {
6868 const inputProps = useLiveInputField (
69- ( ) => $project . valueOrThrow . bibliography . author ,
69+ ( ) => $project . valueOrThrow ( ) . bibliography . author ,
7070 {
7171 onSave : ( value ) => {
7272 const author = value . trim ( ) ;
73- $project . valueOrThrow . bibliography . author = author ;
73+ $project . valueOrThrow ( ) . bibliography . author = author ;
7474 return author ;
7575 } ,
7676 } ,
@@ -89,10 +89,10 @@ function UseTocSwitch({
8989 ...props
9090} : React . PropsWithChildren < React . ComponentProps < typeof Switch > > ) {
9191 const inputProps = useLiveCheckboxField (
92- ( ) => $project . valueOrThrow . toc . enabled ,
92+ ( ) => $project . valueOrThrow ( ) . toc . enabled ,
9393 {
9494 onSave : ( value ) => {
95- $project . valueOrThrow . toc . enabled = value ;
95+ $project . valueOrThrow ( ) . toc . enabled = value ;
9696 } ,
9797 } ,
9898 ) ;
@@ -109,13 +109,16 @@ function TocTitleInput({
109109 children,
110110 ...props
111111} : React . PropsWithChildren < React . ComponentProps < typeof Input > > ) {
112- const inputProps = useLiveInputField ( ( ) => $project . valueOrThrow . toc . title , {
113- onSave : ( value ) => {
114- const title = value . trim ( ) ;
115- $project . valueOrThrow . toc . title = title ;
116- return title ;
112+ const inputProps = useLiveInputField (
113+ ( ) => $project . valueOrThrow ( ) . toc . title ,
114+ {
115+ onSave : ( value ) => {
116+ const title = value . trim ( ) ;
117+ $project . valueOrThrow ( ) . toc . title = title ;
118+ return title ;
119+ } ,
117120 } ,
118- } ) ;
121+ ) ;
119122
120123 return (
121124 < label className = "contents" >
@@ -130,10 +133,10 @@ function TocSectionDepthSelect({
130133 ...props
131134} : React . PropsWithChildren < React . ComponentProps < typeof Select > > ) {
132135 const inputProps = useLiveSelectField (
133- ( ) => `${ $project . valueOrThrow . toc . sectionDepth } ` ,
136+ ( ) => `${ $project . valueOrThrow ( ) . toc . sectionDepth } ` ,
134137 {
135138 onSave : ( value ) => {
136- $project . valueOrThrow . toc . sectionDepth = value ? Number ( value ) : 0 ;
139+ $project . valueOrThrow ( ) . toc . sectionDepth = value ? Number ( value ) : 0 ;
137140 } ,
138141 } ,
139142 ) ;
@@ -160,7 +163,7 @@ function TocSectionDepthSelect({
160163}
161164
162165function Content ( _ : BibliographyPaneProperty ) {
163- const projectSnap = useSnapshot ( $project ) . valueOrThrow ;
166+ const projectSnap = useSnapshot ( $project ) . valueOrThrow ( ) ;
164167
165168 return (
166169 < div className = "grid gap-4" >
0 commit comments