Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ff6e0a0
Use embedpdf for reading metadata now
InfinityBowman Jan 5, 2026
2571470
Apply Prettier formatting
actions-user Jan 5, 2026
b47caff
Merge branch '215-embedpdf-for-main-viewer' of https://github.com/Inf…
InfinityBowman Jan 5, 2026
4a2735e
Apply Prettier formatting
actions-user Jan 5, 2026
572654f
get preact example working headless
InfinityBowman Jan 5, 2026
52eb15c
Merge branch '215-embedpdf-for-main-viewer' of https://github.com/Inf…
InfinityBowman Jan 5, 2026
fa075a9
format
InfinityBowman Jan 5, 2026
c9557cb
Apply Prettier formatting
actions-user Jan 5, 2026
6d0c398
starting to work sort of
InfinityBowman Jan 5, 2026
3d4c2f9
Merge branch '215-embedpdf-for-main-viewer' of https://github.com/Inf…
InfinityBowman Jan 5, 2026
9606187
Apply Prettier formatting
actions-user Jan 5, 2026
7493c6f
success! pdf viewer is working
InfinityBowman Jan 5, 2026
25da136
fixing errors
InfinityBowman Jan 5, 2026
235f0d2
Apply Prettier formatting
actions-user Jan 5, 2026
7f74281
add pinch zoom
InfinityBowman Jan 5, 2026
74a33db
Merge branch '215-embedpdf-for-main-viewer' of https://github.com/Inf…
InfinityBowman Jan 5, 2026
39b5950
add document props
InfinityBowman Jan 5, 2026
f6ced6c
remove split view
InfinityBowman Jan 5, 2026
f03687b
fix thumbnail panel visibility
InfinityBowman Jan 5, 2026
bc5a3a5
Add pdf picker, remove unused files, fix translations, hide redact bu…
InfinityBowman Jan 5, 2026
c3a152d
remove old pdfjs stuff and replace everything with embedpdf
InfinityBowman Jan 5, 2026
4a76bac
remove pdfjs dependency
InfinityBowman Jan 5, 2026
38bdcaa
Apply Prettier formatting
actions-user Jan 5, 2026
576a135
Organize, lint, format
InfinityBowman Jan 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,27 @@ export default [
},
},
},
{
// Preact components - disable SolidJS rules
files: ['**/preact/**/*.{js,jsx,ts,tsx}'],
languageOptions: {
globals: {
React: 'readonly',
HTMLAnchorElement: 'readonly',
HTMLFormElement: 'readonly',
Node: 'readonly',
NodeJS: 'readonly',
},
},
rules: {
'solid/reactivity': 'off',
'solid/no-destructure': 'off',
'solid/prefer-for': 'off',
'solid/components-return-once': 'off',
'solid/no-react-specific-props': 'off',
'solid/style-prop': 'off',
},
},
{
ignores: [
'**/node_modules/**',
Expand Down
1 change: 1 addition & 0 deletions packages/web/jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"@components/*": ["src/components/*"],
"@auth/*": ["src/components/auth/*"],
"@checklist/*": ["src/components/checklist/*"],
"@pdf/*": ["src/components/pdf/*"],
"@project/*": ["src/components/project/*"],
"@routes/*": ["src/routes/*"],
"@primitives/*": ["src/primitives/*"],
Expand Down
32 changes: 31 additions & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,50 @@
"dependencies": {
"@corates/shared": "workspace:*",
"@corates/ui": "workspace:*",
"@embedpdf/core": "^2.1.1",
"@embedpdf/engines": "^2.1.1",
"@embedpdf/models": "^2.1.1",
"@embedpdf/pdfium": "^2.1.1",
"@embedpdf/plugin-annotation": "^2.1.1",
"@embedpdf/plugin-capture": "^2.1.1",
"@embedpdf/plugin-commands": "^2.1.1",
"@embedpdf/plugin-document-manager": "^2.1.1",
"@embedpdf/plugin-export": "^2.1.1",
"@embedpdf/plugin-fullscreen": "^2.1.1",
"@embedpdf/plugin-history": "^2.1.1",
"@embedpdf/plugin-i18n": "^2.1.1",
"@embedpdf/plugin-interaction-manager": "^2.1.1",
"@embedpdf/plugin-pan": "^2.1.1",
"@embedpdf/plugin-print": "^2.1.1",
"@embedpdf/plugin-redaction": "^2.1.1",
"@embedpdf/plugin-render": "^2.1.1",
"@embedpdf/plugin-rotate": "^2.1.1",
"@embedpdf/plugin-scroll": "^2.1.1",
"@embedpdf/plugin-search": "^2.1.1",
"@embedpdf/plugin-selection": "^2.1.1",
"@embedpdf/plugin-spread": "^2.1.1",
"@embedpdf/plugin-thumbnail": "^2.1.1",
"@embedpdf/plugin-tiling": "^2.1.1",
"@embedpdf/plugin-ui": "^2.1.1",
"@embedpdf/plugin-view-manager": "^2.1.1",
"@embedpdf/plugin-viewport": "^2.1.1",
"@embedpdf/plugin-zoom": "^2.1.1",
"@embedpdf/snippet": "^2.0.0",
"@solidjs/router": "^0.15.4",
"@tanstack/solid-query": "^5.90.18",
"better-auth": "^1.4.9",
"d3": "^7.9.0",
"idb": "^8.0.3",
"pdfjs-dist": "^5.4.530",
"preact": "^10.28.1",
"solid-icons": "^1.1.0",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.4.0",
"y-indexeddb": "^9.0.12",
"y-websocket": "^3.0.0",
"yjs": "^13.6.28"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.0",
"@solidjs/testing-library": "^0.8.10",
"@tailwindcss/vite": "^4.1.18",
"@testing-library/jest-dom": "^6.9.1",
Expand Down
30 changes: 3 additions & 27 deletions packages/web/src/components/checklist/ChecklistWithPdf.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
*/

import GenericChecklist from '@/components/checklist/GenericChecklist.jsx';
import PdfViewer from '@/components/checklist/pdf/PdfViewer.jsx';
import EmbedPdfViewer from '@/components/checklist/embedpdf/EmbedPdfViewer.jsx';
import EmbedPdfViewer from '@pdf/embedpdf/EmbedPdfViewer.jsx';
import SplitScreenLayout from '@/components/checklist/SplitScreenLayout.jsx';
import { PDF_VIEWER_MODE } from '@config/pdfViewer.js';
import { createMemo, Show } from 'solid-js';
import { Show } from 'solid-js';

export default function ChecklistWithPdf(props) {
// props.checklistType - the type of checklist ('AMSTAR2', 'ROBINS_I', etc.)
Expand All @@ -19,21 +17,14 @@ export default function ChecklistWithPdf(props) {
// props.headerContent - optional content to show in the header bar (left side)
// props.pdfData - saved PDF ArrayBuffer (optional)
// props.pdfFileName - saved PDF file name (optional)
// props.onPdfChange - callback when PDF changes: (data, fileName) => void
// props.onPdfClear - callback when PDF is cleared
// props.readOnly - if true, disables checklist updates and PDF uploads
// props.allowDelete - if true, shows PDF delete button (only applies when !readOnly)
// props.pdfs - array of PDFs for multi-PDF selection
// props.selectedPdfId - currently selected PDF ID
// props.onPdfSelect - handler for PDF selection change
// props.getQuestionNote - function to get Y.Text for a question note
// props.getRobinsText - function to get Y.Text for a ROBINS-I free-text field
// props.pdfUrl - optional PDF URL (for server-hosted PDFs)

// Use EmbedPDF viewer when mode is 'snippet' and we have pdfData
// Note: EmbedPDF viewer only works with pdfData (blob URLs), not direct pdfUrl
const useEmbedPdf = createMemo(() => PDF_VIEWER_MODE === 'snippet' && !!props.pdfData);

return (
<div class='flex h-full flex-col bg-blue-50'>
{/* Split screen with checklist and PDF */}
Expand All @@ -56,22 +47,7 @@ export default function ChecklistWithPdf(props) {
/>

{/* Second panel: PDF Viewer */}
<Show
when={useEmbedPdf()}
fallback={
<PdfViewer
pdfData={props.pdfData}
pdfFileName={props.pdfFileName}
onPdfChange={props.onPdfChange}
onPdfClear={props.onPdfClear}
readOnly={props.readOnly}
allowDelete={props.allowDelete}
pdfs={props.pdfs}
selectedPdfId={props.selectedPdfId}
onPdfSelect={props.onPdfSelect}
/>
}
>
<Show when={props.pdfData}>
<EmbedPdfViewer
pdfData={props.pdfData}
pdfFileName={props.pdfFileName}
Expand Down
44 changes: 0 additions & 44 deletions packages/web/src/components/checklist/embedpdf/EmbedPdfViewer.jsx

This file was deleted.

This file was deleted.

Loading