File tree 3 files changed +19
-2
lines changed
templates/types/streaming/nextjs
app/components/ui/chat/widgets
3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " create-llama " : patch
3
+ ---
4
+
5
+ Upgrade pdf viewer
Original file line number Diff line number Diff line change 1
- import { PDFViewer , PdfFocusProvider } from "@llamaindex/pdf-viewer " ;
1
+ import dynamic from "next/dynamic " ;
2
2
import { Button } from "../../button" ;
3
3
import {
4
4
Drawer ,
@@ -16,6 +16,18 @@ export interface PdfDialogProps {
16
16
trigger : React . ReactNode ;
17
17
}
18
18
19
+ // Dynamic imports for client-side rendering only
20
+ const PDFViewer = dynamic (
21
+ ( ) => import ( "@llamaindex/pdf-viewer" ) . then ( ( module ) => module . PDFViewer ) ,
22
+ { ssr : false } ,
23
+ ) ;
24
+
25
+ const PdfFocusProvider = dynamic (
26
+ ( ) =>
27
+ import ( "@llamaindex/pdf-viewer" ) . then ( ( module ) => module . PdfFocusProvider ) ,
28
+ { ssr : false } ,
29
+ ) ;
30
+
19
31
export default function PdfDialog ( props : PdfDialogProps ) {
20
32
return (
21
33
< Drawer direction = "left" >
Original file line number Diff line number Diff line change 12
12
"dependencies" : {
13
13
"@apidevtools/swagger-parser" : " ^10.1.0" ,
14
14
"@e2b/code-interpreter" : " ^0.0.5" ,
15
- "@llamaindex/pdf-viewer" : " ^1.1.1 " ,
15
+ "@llamaindex/pdf-viewer" : " ^1.1.3 " ,
16
16
"@radix-ui/react-collapsible" : " ^1.0.3" ,
17
17
"@radix-ui/react-hover-card" : " ^1.0.7" ,
18
18
"@radix-ui/react-slot" : " ^1.0.2" ,
You can’t perform that action at this time.
0 commit comments