commitf1901a2e56Author: Reece <reece@stirlingpdf.com> Date: Mon Oct 27 18:23:27 2025 +0000 revert lint commit09b0fbefcdAuthor: Reece <reece@stirlingpdf.com> Date: Mon Oct 27 15:47:38 2025 +0000 Hide file names in posthog commit3497ccd7bdAuthor: Reece <reece@stirlingpdf.com> Date: Mon Oct 27 12:45:31 2025 +0000 remove page break settings modal commit5e27dc88f8Author: Reece <reece@stirlingpdf.com> Date: Mon Oct 27 12:37:00 2025 +0000 retain interleaving commitb276eb5b68Author: Reece <reece@stirlingpdf.com> Date: Mon Oct 27 11:32:31 2025 +0000 Lint commitaec1f97ff8Author: Reece <reece@stirlingpdf.com> Date: Sat Oct 25 14:19:32 2025 +0100 - commitfbe2dc2958Author: Reece <reece@stirlingpdf.com> Date: Sat Oct 25 13:06:10 2025 +0100 Fixed file reordering placeholder commitaaae81c68eAuthor: Reece <reece@stirlingpdf.com> Date: Fri Oct 24 15:57:30 2025 +0100 - commit3aa77819f2Author: Reece <reece@stirlingpdf.com> Date: Fri Oct 24 15:54:30 2025 +0100 - commit28dab07870Author: Reece <reece@stirlingpdf.com> Date: Fri Oct 24 15:51:37 2025 +0100 - commited6199de61Author: Reece <reece@stirlingpdf.com> Date: Fri Oct 24 15:51:29 2025 +0100 lint and revert onboarding commit4d59ebfb2aAuthor: Reece <reece@stirlingpdf.com> Date: Fri Oct 24 15:27:44 2025 +0100 fixed drag and drop when some files aren't selected in context commitea4f37cccfAuthor: Reece <reece@stirlingpdf.com> Date: Fri Oct 24 15:06:21 2025 +0100 Merge history change commitc25131ae9bAuthor: Reece <reece@stirlingpdf.com> Date: Fri Oct 24 14:48:14 2025 +0100 lint commit25df9410cdMerge:494f92421848ff9688Author: Reece <reece@stirlingpdf.com> Date: Fri Oct 24 14:33:27 2025 +0100 Merge branch 'V2' of https://github.com/Stirling-Tools/Stirling-PDF into feature/v2/selected-pageeditor commit494f92421fAuthor: Reece <reece@stirlingpdf.com> Date: Fri Oct 24 13:28:50 2025 +0100 Enhance drag-and-drop functionality with new drop hint resolution and target index calculation; refactor file color mapping in PageEditor and implement dropdown state management for improved file handling. commiteef5dce849Author: Reece <reece@stirlingpdf.com> Date: Fri Oct 24 11:33:31 2025 +0100 Drag and drop improvements basic box select commitddefe81082Author: Reece <reece@stirlingpdf.com> Date: Thu Oct 23 20:46:58 2025 +0100 Enhance DragDropGrid and PageEditor with improved undo manager functionality and scroll handling during drag operations commitbe037b727fAuthor: Reece <reece@stirlingpdf.com> Date: Thu Oct 23 18:15:37 2025 +0100 File reorder logic commit7a56f0504eAuthor: Reece <reece@stirlingpdf.com> Date: Tue Oct 21 17:35:55 2025 +0100 Refactor file handling to support StirlingFileStubs and improve drag-and-drop functionality commitf7c9855489Author: Reece <reece@stirlingpdf.com> Date: Mon Oct 20 21:45:00 2025 +0100 glow scaling commit36a358f907Author: Reece <reece@stirlingpdf.com> Date: Mon Oct 20 21:25:44 2025 +0100 Visual tweaks commit0bcb1810d6Author: Reece <reece@stirlingpdf.com> Date: Mon Oct 20 21:08:18 2025 +0100 tweak commitaee535214dAuthor: Reece <reece@stirlingpdf.com> Date: Mon Oct 20 20:55:45 2025 +0100 Pretty lights commit6d3154a7aeAuthor: Reece <reece@stirlingpdf.com> Date: Mon Oct 20 20:44:48 2025 +0100 Update top bar controls visually commit658ce2dab9Author: Reece <reece@stirlingpdf.com> Date: Mon Oct 20 18:45:14 2025 +0100 add file commit15df5cf168Author: Reece <reece@stirlingpdf.com> Date: Mon Oct 20 18:05:55 2025 +0100 - commit23d7f38100Author: Reece <reece@stirlingpdf.com> Date: Mon Oct 20 17:24:16 2025 +0100 lint commit472fc2939eAuthor: Reece <reece@stirlingpdf.com> Date: Mon Oct 20 15:56:54 2025 +0100 lint 2 commita21047e8b0Merge:8ee03fa1c3e23dc59bAuthor: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Mon Oct 20 15:52:23 2025 +0100 Merge branch 'V2' into feature/v2/selected-pageeditor commit8ee03fa1c6Author: Reece <reece@stirlingpdf.com> Date: Mon Oct 20 15:50:14 2025 +0100 Lint commita22913e1e4Author: Reece <reece@stirlingpdf.com> Date: Mon Oct 20 14:16:41 2025 +0100 page editor fixes post merge commitb3c0c69a7cMerge:2289080f93e6236d95Author: Reece <reece@stirlingpdf.com> Date: Mon Oct 20 13:42:08 2025 +0100 Merge branch 'V2' of https://github.com/Stirling-Tools/Stirling-PDF into feature/v2/selected-pageeditor commit2289080f9cAuthor: Reece <reece@stirlingpdf.com> Date: Fri Oct 17 16:55:29 2025 +0100 remove buttons commita5ec62fa08Author: Reece <reece@stirlingpdf.com> Date: Fri Oct 17 15:24:05 2025 +0100 Performance improvements commite7f7b7e201Author: Reece <reece@stirlingpdf.com> Date: Fri Oct 17 14:15:21 2025 +0100 improved commit74e8388bceAuthor: Reece <reece@stirlingpdf.com> Date: Wed Oct 15 21:33:54 2025 +0100 Working mostly commite7c6db082cAuthor: Reece <reece@stirlingpdf.com> Date: Wed Oct 15 16:31:30 2025 +0100 Rejig arrays commit05a7161412Author: Reece <reece@stirlingpdf.com> Date: Wed Oct 15 00:01:30 2025 +0100 Structural tweaks commit39267e795cAuthor: Reece <reece@stirlingpdf.com> Date: Tue Oct 14 12:41:50 2025 +0100 Reworked page editor - dirty commit commit6acce968a5Author: Reece <reece@stirlingpdf.com> Date: Fri Oct 10 19:32:41 2025 +0100 fix 2 commit0722ecc6c4Author: Reece <reece@stirlingpdf.com> Date: Fri Oct 10 19:27:15 2025 +0100 fix commit3597a8b7bdAuthor: Reece <reece@stirlingpdf.com> Date: Fri Oct 10 19:16:04 2025 +0100 Initial set up commitc260394b95Author: Reece <reece@stirlingpdf.com> Date: Fri Oct 10 17:15:07 2025 +0100 Cleanup commit93fcfb280aAuthor: Reece <reece@stirlingpdf.com> Date: Fri Oct 10 17:09:36 2025 +0100 Remove logs tweak visuals, use fit text component commit69cb8e7aecAuthor: Reece <reece@stirlingpdf.com> Date: Fri Oct 10 16:54:05 2025 +0100 Fix signwith tab based system commit8e8e06628eAuthor: Reece <reece@stirlingpdf.com> Date: Fri Oct 10 15:57:41 2025 +0100 Nav based file select commit5d3710260fAuthor: Reece <reece@stirlingpdf.com> Date: Fri Oct 10 13:37:52 2025 +0100 Lint commitad8789d82aAuthor: Reece <reece@stirlingpdf.com> Date: Fri Oct 10 13:35:18 2025 +0100 remove file that came from nowhere commit749966a197Author: Reece <reece@stirlingpdf.com> Date: Fri Oct 10 13:30:15 2025 +0100 Remove mantine theme commitd9e429aa3aMerge:ad0b6cf2db695e3900Author: Reece <reece@stirlingpdf.com> Date: Fri Oct 10 13:00:56 2025 +0100 Merge branch 'V2' of https://github.com/Stirling-Tools/Stirling-PDF into feature/V2/ViewerTabs commitad0b6cf2d6Author: Reece <reece@stirlingpdf.com> Date: Fri Oct 10 12:55:03 2025 +0100 Viewer tabs, embed update and layout fixes commitb63f2c16a2Author: Reece <reece@stirlingpdf.com> Date: Wed Oct 8 15:12:39 2025 +0100 Remove unused legacy text signing Linting errors commitedcc788d1aMerge:5b47ab5bbfdba336c0Author: Reece <reece@stirlingpdf.com> Date: Wed Oct 8 15:02:39 2025 +0100 Merge branch 'feature/v2/improve-sign' of https://github.com/Stirling-Tools/Stirling-PDF into feature/v2/improve-sign commit5b47ab5bbfAuthor: Reece <reece@stirlingpdf.com> Date: Wed Oct 8 15:02:33 2025 +0100 Remove debug logs commitfdba336c05Author: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Wed Oct 8 14:57:29 2025 +0100 Update frontend/src/components/annotation/shared/DrawingCanvas.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> commit5db6b85fb9Merge:70d941a4013e88943bAuthor: Reece <reece@stirlingpdf.com> Date: Wed Oct 8 14:56:10 2025 +0100 Merge branch 'feature/v2/improve-sign' of https://github.com/Stirling-Tools/Stirling-PDF into feature/v2/improve-sign commit70d941a400Author: Reece <reece@stirlingpdf.com> Date: Wed Oct 8 14:55:43 2025 +0100 translations commit13e88943b7Author: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Wed Oct 8 14:55:04 2025 +0100 Update frontend/src/components/tools/sign/SignSettings.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> commit339e5cfb65Author: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Wed Oct 8 14:54:31 2025 +0100 Update frontend/src/contexts/ViewerContext.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> commit10944d9d57Author: Reece <reece@stirlingpdf.com> Date: Wed Oct 8 14:45:39 2025 +0100 Remove debug logging commit0c9f460fb6Author: Reece <reece@stirlingpdf.com> Date: Wed Oct 8 14:02:43 2025 +0100 Remove arbitrary timers commitfa6e01b46eAuthor: Reece <reece@stirlingpdf.com> Date: Wed Oct 8 12:26:34 2025 +0100 Clean up commit23f85d7267Author: Reece <reece@stirlingpdf.com> Date: Tue Oct 7 22:40:58 2025 +0100 tweaks commitf6290c0238Author: Reece <reece@stirlingpdf.com> Date: Tue Oct 7 21:52:40 2025 +0100 - Refactored signature saving process commit991be9ffa2Author: Reece <reece@stirlingpdf.com> Date: Tue Oct 7 21:38:07 2025 +0100 Add text color and font size options to signature settings and API commit07bf79f3eeAuthor: Reece <reece@stirlingpdf.com> Date: Tue Oct 7 14:54:14 2025 +0100 Improved canvas mode with signaturepad.js commit3a0acd0a21Author: Reece <reece@stirlingpdf.com> Date: Tue Oct 7 12:56:12 2025 +0100 Single canvas commitfff637286fAuthor: Reece <reece@stirlingpdf.com> Date: Tue Oct 7 12:08:32 2025 +0100 Clean up annotation layer and signature API - Remove duplicate imports in LocalEmbedPDF - Remove duplicate setAnnotations state declaration - Rename enableSignature prop to enableAnnotations for consistency - Remove debug console.log statements from SignatureAPIBridge - Remove async image preloading wrapper (was debugging code) - Clean up formatting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> commit8f94c8f57eMerge:708a296f82a29bda34Author: Reece <reece@stirlingpdf.com> Date: Mon Oct 6 22:25:30 2025 +0100 Merge branch 'V2' of https://github.com/Stirling-Tools/Stirling-PDF into feature/v2/improve-sign commit708a296f8dAuthor: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 19:14:40 2025 +0100 Auto update canvas signature commitb486d1270eAuthor: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 19:03:24 2025 +0100 Fix flicker on apply commit80faf0bc1eAuthor: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 18:55:09 2025 +0100 - commit6555a9554aAuthor: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 18:53:16 2025 +0100 Fix even more linting errors (Thanks James) commitfdee719c89Merge:1be48c276fd9fb9b97Author: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 18:14:42 2025 +0100 Merge branch 'feature/v2/sign' of https://github.com/Stirling-Tools/Stirling-PDF into feature/v2/sign commit1be48c276bAuthor: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 18:12:13 2025 +0100 fix text infinite loop commit2b6b7a8e1dAuthor: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 18:04:01 2025 +0100 better error handling and killing logs commitfd9fb9b972Author: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Fri Sep 26 17:58:52 2025 +0100 Update frontend/src/hooks/tools/sign/useSignParameters.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> commitd8d6197008Author: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 17:48:41 2025 +0100 fix page count issue commit1edd133e09Author: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 17:31:44 2025 +0100 license checker use commonJS commit8685bf2a7cAuthor: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 17:26:19 2025 +0100 gap commit36475069deAuthor: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 17:23:16 2025 +0100 lint fix commit3aa8572c9eAuthor: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 17:16:17 2025 +0100 Fix suggestions commit2e2d8477b9Author: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 17:01:06 2025 +0100 Clean up commit90880eddf9Author: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Fri Sep 26 16:51:19 2025 +0100 Update docker/frontend/nginx.conf Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> commit31fd6886dcMerge:3fdbf425babc0988fdAuthor: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Fri Sep 26 16:40:34 2025 +0100 Merge branch 'V2' into feature/v2/sign commit3fdbf425b4Author: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 16:39:38 2025 +0100 Fix lintineg errors commit50e60d4972Author: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 16:27:52 2025 +0100 Simple export block commita22330ebf4Author: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 16:09:20 2025 +0100 Only flatten current annotations commit172f622c5fMerge:cfd00b2c7d82b958d9Author: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 15:10:54 2025 +0100 Merge branch 'feature/v2/sign' of https://github.com/Stirling-Tools/Stirling-PDF into feature/v2/sign commitcfd00b2c71Author: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 15:10:47 2025 +0100 Render signature to pdf commitd82b958d9fMerge:c94ee388f0bdc6466cAuthor: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Fri Sep 26 12:53:54 2025 +0100 Merge branch 'V2' into feature/v2/sign commitc94ee388fcAuthor: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 12:47:32 2025 +0100 Restructure and bug fix commitaa5333dcd9Author: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 03:23:59 2025 +0100 Change to button based placement to avoid performance issue on canvas commita8265efff4Author: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 03:19:05 2025 +0100 Improved performance commitb9b425aba0Author: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 02:18:47 2025 +0100 Fix undo/redo commit51caad636cAuthor: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 01:51:17 2025 +0100 Reduce logs commit023fd43b72Author: Reece <reece@stirlingpdf.com> Date: Fri Sep 26 01:49:33 2025 +0100 Save file commita8a0808274Author: Reece <reece@stirlingpdf.com> Date: Thu Sep 25 09:46:20 2025 +0100 history tweaks commit3d2607f72aAuthor: Reece <reece@stirlingpdf.com> Date: Wed Sep 24 19:01:36 2025 +0100 fixes commitf9542a9257Merge:a12e45757963787316Author: Reece <reece@stirlingpdf.com> Date: Wed Sep 24 18:35:16 2025 +0100 Merge branch 'feature/v2/exportpdf' into feature/v2/sign commit963787316aAuthor: Reece <reece@stirlingpdf.com> Date: Wed Sep 24 17:42:58 2025 +0100 Export with embedpdf commita12e457577Author: Reece Browne <reecebrowne1995@gmail.com> Date: Wed Sep 24 14:58:10 2025 +0100 Add undo/redo functionality and refactor signature settings UI - Introduced HistoryAPIBridge for managing undo/redo actions. - Updated SignSettings component to include undo/redo buttons. - Refactored signature type selection to use Tabs for better UI. - Enhanced SignatureAPIBridge to store image data for annotations. - Integrated history management into SignatureContext for state handling. commitbac61c7e9eAuthor: Reece Browne <reecebrowne1995@gmail.com> Date: Tue Sep 23 18:16:21 2025 +0100 Delete signature commitfc2f34ee15Author: Reece Browne <reecebrowne1995@gmail.com> Date: Tue Sep 23 17:18:39 2025 +0100 fix add image commitd9798badaeAuthor: Reece Browne <reecebrowne1995@gmail.com> Date: Tue Sep 23 14:06:41 2025 +0100 Fix sidebar refresh. Updated UI commitefc0c1aab3Author: Reece Browne <reecebrowne1995@gmail.com> Date: Tue Sep 23 12:24:58 2025 +0100 text and improved drawing commit10672403c9Author: Reece Browne <reecebrowne1995@gmail.com> Date: Mon Sep 22 14:14:35 2025 +0100 Colours on document draw + translations commit32fed96aa7Author: Reece Browne <reecebrowne1995@gmail.com> Date: Mon Sep 22 14:03:49 2025 +0100 Canvas and dosument draw split, drawing improvements commita70472b172Author: Reece Browne <reecebrowne1995@gmail.com> Date: Sat Sep 20 01:59:04 2025 +0100 Initial set up commit3b87ca0c3cMerge:0e1da982b6172351eeAuthor: Reece Browne <reecebrowne1995@gmail.com> Date: Fri Sep 19 11:38:58 2025 +0100 Merge branch 'feature/v2/embed-pdf' of https://github.com/Stirling-Tools/Stirling-PDF into feature/v2/embed-pdf commit0e1da982b6Author: Reece Browne <reecebrowne1995@gmail.com> Date: Fri Sep 19 11:38:53 2025 +0100 Fix vite commit6172351eedMerge:1174b6a4dae7be50ecAuthor: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Fri Sep 19 11:23:28 2025 +0100 Merge branch 'V2' into feature/v2/embed-pdf commit1174b6a4daMerge:a970c44d021a2433ddAuthor: Reece Browne <reecebrowne1995@gmail.com> Date: Fri Sep 19 11:16:22 2025 +0100 Merge branch 'feature/v2/embed-pdf' of https://github.com/Stirling-Tools/Stirling-PDF into feature/v2/embed-pdf commita970c44d03Author: Reece Browne <reecebrowne1995@gmail.com> Date: Fri Sep 19 11:14:58 2025 +0100 improvements commitb574cef54aAuthor: Reece Browne <reecebrowne1995@gmail.com> Date: Fri Sep 19 10:48:29 2025 +0100 improvements commit21a2433dd8Author: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Thu Sep 18 13:14:44 2025 +0100 Remove marginTop style from Workbench component commit07cc250176Author: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Thu Sep 18 13:12:58 2025 +0100 Remove comment regarding EmbedPDF import Removed comment about dynamic import of EmbedPDF. commitdc71b3007bAuthor: Reece Browne <reecebrowne1995@gmail.com> Date: Thu Sep 18 12:32:42 2025 +0100 clean up commit1598057ed0Author: Reece Browne <reecebrowne1995@gmail.com> Date: Thu Sep 18 08:44:57 2025 +0100 Tweaks commit312fc2d615Author: Reece Browne <reecebrowne1995@gmail.com> Date: Thu Sep 18 02:14:31 2025 +0100 Clean up commit72375d89d1Merge:a990ecc027ff1c66d0Author: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Thu Sep 18 01:53:59 2025 +0100 Merge branch 'V2' into feature/v2/embed-pdf commita990ecc02aMerge:da6ecc661b51c2e42aAuthor: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Thu Sep 18 01:53:47 2025 +0100 Merge branch 'V2' into feature/v2/embed-pdf commitda6ecc6619Author: Reece Browne <reecebrowne1995@gmail.com> Date: Wed Sep 17 14:35:44 2025 +0100 Fix scroll page identification commitdac176f0c6Author: Reece Browne <reecebrowne1995@gmail.com> Date: Wed Sep 17 12:07:44 2025 +0100 Fix colours commit41e5a7fbd6Author: Reece Browne <reecebrowne1995@gmail.com> Date: Wed Sep 17 12:00:20 2025 +0100 Restructure to avoid global variables fix zoom commitb81ed9ec2eMerge:9b5c50db081c5d8ff4Author: Reece Browne <reecebrowne1995@gmail.com> Date: Tue Sep 16 19:37:50 2025 +0100 Merge branch 'feature/v2/embed-pdf' of https://github.com/Stirling-Tools/Stirling-PDF into feature/v2/embed-pdf commit9b5c50db07Author: Reece Browne <reecebrowne1995@gmail.com> Date: Tue Sep 16 19:36:36 2025 +0100 Improved Structure with context at root commit81c5d8ff46Author: James Brunton <james@stirlingpdf.com> Date: Tue Sep 16 16:06:40 2025 +0100 Potential fix for mime type issues commita67f5199d3Author: James Brunton <james@stirlingpdf.com> Date: Tue Sep 16 16:06:27 2025 +0100 Improvements for scroll gestures commit3755bfde34Author: Reece Browne <reecebrowne1995@gmail.com> Date: Mon Sep 15 18:20:11 2025 +0100 Set zoom to 140% commit2834eec3beMerge:19d7111cad89e1b5b1Author: Reece Browne <reecebrowne1995@gmail.com> Date: Mon Sep 15 17:31:06 2025 +0100 Merge branch 'feature/v2/embed-pdf' of https://github.com/Stirling-Tools/Stirling-PDF into feature/v2/embed-pdf commitd89e1b5b1eMerge:5d7fb638aa57373b96Author: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Mon Sep 15 17:27:51 2025 +0100 Merge branch 'V2' into feature/v2/embed-pdf commit19d7111cabAuthor: Reece Browne <reecebrowne1995@gmail.com> Date: Mon Sep 15 17:27:22 2025 +0100 Remove unused code commitca9d7ef465Author: Reece Browne <reecebrowne1995@gmail.com> Date: Mon Sep 15 17:03:52 2025 +0100 Remove unused code commitfad4f84c9cAuthor: Reece Browne <reecebrowne1995@gmail.com> Date: Mon Sep 15 16:53:41 2025 +0100 translations commit35863ac610Author: Reece Browne <reecebrowne1995@gmail.com> Date: Mon Sep 15 16:53:32 2025 +0100 remove select mode commitc17dd25069Author: Reece Browne <reecebrowne1995@gmail.com> Date: Mon Sep 15 16:05:19 2025 +0100 Rotate commit5d7fb638afMerge:2fb4710dd7dad484aaAuthor: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Mon Sep 15 15:31:45 2025 +0100 Merge branch 'V2' into feature/v2/embed-pdf commit2fb4710dd7Merge:85a74c1d4cfdb6eaa1Author: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Mon Sep 15 13:34:00 2025 +0100 Merge branch 'V2' into feature/v2/embed-pdf commit85a74c1d46Merge:21a93d6ca9599bca8aAuthor: Reece Browne <reecebrowne1995@gmail.com> Date: Mon Sep 15 13:33:45 2025 +0100 Merge branch 'feature/v2/embed-pdf' of https://github.com/Stirling-Tools/Stirling-PDF into feature/v2/embed-pdf commit21a93d6cacAuthor: Reece Browne <reecebrowne1995@gmail.com> Date: Mon Sep 15 13:33:39 2025 +0100 Context based right rail controls for viewer commit9599bca8a9Author: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Mon Sep 15 12:37:07 2025 +0100 Update frontend/src/components/viewer/ThumbnailSidebar.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> commit1709ca9049Author: Reece Browne <reecebrowne1995@gmail.com> Date: Fri Sep 12 16:38:29 2025 +0100 Rems commit18e4e03220Author: Reece Browne <reecebrowne1995@gmail.com> Date: Fri Sep 12 16:26:05 2025 +0100 rename APIBridge commit9901771572Author: Reece Browne <reecebrowne1995@gmail.com> Date: Fri Sep 12 16:19:07 2025 +0100 improve search commit514956570cAuthor: Reece Browne <reecebrowne1995@gmail.com> Date: Fri Sep 12 15:06:06 2025 +0100 pan state improvements commit423617db52Author: Reece Browne <reecebrowne1995@gmail.com> Date: Fri Sep 12 14:21:31 2025 +0100 thumbnail sidebar commit143f0c5031Author: Reece Browne <reecebrowne1995@gmail.com> Date: Fri Sep 12 01:56:51 2025 +0100 search pdf commit368e9801a1Author: Reece Browne <reecebrowne1995@gmail.com> Date: Fri Sep 12 00:35:27 2025 +0100 Zoom with wheel and +/- commitafc9ca5858Author: Reece Browne <reecebrowne1995@gmail.com> Date: Thu Sep 11 23:52:38 2025 +0100 spread/multipage commit8815575124Author: Reece Browne <reecebrowne1995@gmail.com> Date: Thu Sep 11 22:51:10 2025 +0100 pan commitfb9b01f53bAuthor: Reece Browne <reecebrowne1995@gmail.com> Date: Thu Sep 11 20:07:43 2025 +0100 improved scaling and fix grey void commit93607937f6Author: Reece Browne <reecebrowne1995@gmail.com> Date: Thu Sep 11 19:38:04 2025 +0100 selection also commit687ab39286Author: Reece Browne <reecebrowne1995@gmail.com> Date: Thu Sep 11 19:36:44 2025 +0100 Text selection commit83a3222cf6Author: Reece Browne <reecebrowne1995@gmail.com> Date: Thu Sep 11 19:08:44 2025 +0100 Set up
309 lines
7.4 KiB
TypeScript
309 lines
7.4 KiB
TypeScript
/**
|
|
* FileContext reducer - Pure state management for file operations
|
|
*/
|
|
|
|
import { FileId } from '@app/types/file';
|
|
import {
|
|
FileContextState,
|
|
FileContextAction,
|
|
StirlingFileStub
|
|
} from '@app/types/fileContext';
|
|
|
|
// Initial state
|
|
export const initialFileContextState: FileContextState = {
|
|
files: {
|
|
ids: [],
|
|
byId: {}
|
|
},
|
|
pinnedFiles: new Set(),
|
|
ui: {
|
|
selectedFileIds: [],
|
|
selectedPageNumbers: [],
|
|
isProcessing: false,
|
|
processingProgress: 0,
|
|
hasUnsavedChanges: false,
|
|
errorFileIds: []
|
|
}
|
|
};
|
|
|
|
// Helper function for consume/undo operations
|
|
function processFileSwap(
|
|
state: FileContextState,
|
|
filesToRemove: FileId[],
|
|
filesToAdd: StirlingFileStub[]
|
|
): FileContextState {
|
|
// Only remove unpinned files
|
|
const unpinnedRemoveIds = filesToRemove.filter(id => !state.pinnedFiles.has(id));
|
|
const remainingIds = state.files.ids.filter(id => !unpinnedRemoveIds.includes(id));
|
|
|
|
// Remove unpinned files from state
|
|
const newById = { ...state.files.byId };
|
|
unpinnedRemoveIds.forEach(id => {
|
|
delete newById[id];
|
|
});
|
|
|
|
// Add new files
|
|
const addedIds: FileId[] = [];
|
|
filesToAdd.forEach(record => {
|
|
if (!newById[record.id]) {
|
|
addedIds.push(record.id);
|
|
newById[record.id] = record;
|
|
}
|
|
});
|
|
|
|
// Clear selections that reference removed files and add new files to selection
|
|
const validSelectedFileIds = state.ui.selectedFileIds.filter(id => !unpinnedRemoveIds.includes(id));
|
|
const newSelectedFileIds = [...validSelectedFileIds, ...addedIds];
|
|
|
|
return {
|
|
...state,
|
|
files: {
|
|
ids: [...addedIds, ...remainingIds],
|
|
byId: newById
|
|
},
|
|
ui: {
|
|
...state.ui,
|
|
selectedFileIds: newSelectedFileIds
|
|
}
|
|
};
|
|
}
|
|
|
|
// Pure reducer function
|
|
export function fileContextReducer(state: FileContextState, action: FileContextAction): FileContextState {
|
|
switch (action.type) {
|
|
case 'ADD_FILES': {
|
|
const { stirlingFileStubs } = action.payload;
|
|
const newIds: FileId[] = [];
|
|
const newById: Record<FileId, StirlingFileStub> = { ...state.files.byId };
|
|
let hasInsertionPosition = false;
|
|
|
|
stirlingFileStubs.forEach(record => {
|
|
// Only add if not already present (dedupe by stable ID)
|
|
if (!newById[record.id]) {
|
|
newIds.push(record.id);
|
|
|
|
// Track if any file has an insertion position
|
|
if (record.insertAfterPageId) {
|
|
hasInsertionPosition = true;
|
|
}
|
|
|
|
// Store record WITH insertAfterPageId temporarily
|
|
// PageEditorContext will read it and clear it
|
|
newById[record.id] = record;
|
|
}
|
|
});
|
|
|
|
// Determine final file order
|
|
// NOTE: If files have insertAfterPageId, we just append to end
|
|
// The page-level insertion is handled by usePageDocument
|
|
const finalIds = [...state.files.ids, ...newIds];
|
|
|
|
// Auto-select inserted files
|
|
const newSelectedFileIds = hasInsertionPosition
|
|
? [...state.ui.selectedFileIds, ...newIds]
|
|
: state.ui.selectedFileIds;
|
|
|
|
return {
|
|
...state,
|
|
files: {
|
|
ids: finalIds,
|
|
byId: newById
|
|
},
|
|
ui: {
|
|
...state.ui,
|
|
selectedFileIds: newSelectedFileIds
|
|
}
|
|
};
|
|
}
|
|
|
|
case 'REMOVE_FILES': {
|
|
const { fileIds } = action.payload;
|
|
const remainingIds = state.files.ids.filter(id => !fileIds.includes(id));
|
|
const newById = { ...state.files.byId };
|
|
|
|
// Remove files from state (resource cleanup handled by lifecycle manager)
|
|
fileIds.forEach(id => {
|
|
delete newById[id];
|
|
});
|
|
|
|
// Clear selections that reference removed files
|
|
const validSelectedFileIds = state.ui.selectedFileIds.filter(id => !fileIds.includes(id));
|
|
|
|
return {
|
|
...state,
|
|
files: {
|
|
ids: remainingIds,
|
|
byId: newById
|
|
},
|
|
ui: {
|
|
...state.ui,
|
|
selectedFileIds: validSelectedFileIds
|
|
}
|
|
};
|
|
}
|
|
|
|
case 'UPDATE_FILE_RECORD': {
|
|
const { id, updates } = action.payload;
|
|
const existingRecord = state.files.byId[id];
|
|
|
|
if (!existingRecord) {
|
|
return state; // File doesn't exist, no-op
|
|
}
|
|
|
|
const updatedRecord = {
|
|
...existingRecord,
|
|
...updates
|
|
};
|
|
|
|
return {
|
|
...state,
|
|
files: {
|
|
...state.files,
|
|
byId: {
|
|
...state.files.byId,
|
|
[id]: updatedRecord
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
case 'REORDER_FILES': {
|
|
const { orderedFileIds } = action.payload;
|
|
|
|
// Validate that all IDs exist in current state
|
|
const validIds = orderedFileIds.filter(id => state.files.byId[id]);
|
|
|
|
// Don't touch selectedFileIds - it's just a reference list, order doesn't matter
|
|
return {
|
|
...state,
|
|
files: {
|
|
...state.files,
|
|
ids: validIds
|
|
}
|
|
};
|
|
}
|
|
|
|
case 'SET_SELECTED_FILES': {
|
|
const { fileIds } = action.payload;
|
|
return {
|
|
...state,
|
|
ui: {
|
|
...state.ui,
|
|
selectedFileIds: fileIds
|
|
}
|
|
};
|
|
}
|
|
|
|
case 'SET_SELECTED_PAGES': {
|
|
const { pageNumbers } = action.payload;
|
|
return {
|
|
...state,
|
|
ui: {
|
|
...state.ui,
|
|
selectedPageNumbers: pageNumbers
|
|
}
|
|
};
|
|
}
|
|
|
|
case 'CLEAR_SELECTIONS': {
|
|
return {
|
|
...state,
|
|
ui: {
|
|
...state.ui,
|
|
selectedFileIds: [],
|
|
selectedPageNumbers: []
|
|
}
|
|
};
|
|
}
|
|
|
|
case 'SET_PROCESSING': {
|
|
const { isProcessing, progress } = action.payload;
|
|
return {
|
|
...state,
|
|
ui: {
|
|
...state.ui,
|
|
isProcessing,
|
|
processingProgress: progress
|
|
}
|
|
};
|
|
}
|
|
|
|
case 'SET_UNSAVED_CHANGES': {
|
|
return {
|
|
...state,
|
|
ui: {
|
|
...state.ui,
|
|
hasUnsavedChanges: action.payload.hasChanges
|
|
}
|
|
};
|
|
}
|
|
|
|
case 'MARK_FILE_ERROR': {
|
|
const { fileId } = action.payload;
|
|
if (state.ui.errorFileIds.includes(fileId)) return state;
|
|
return {
|
|
...state,
|
|
ui: { ...state.ui, errorFileIds: [...state.ui.errorFileIds, fileId] }
|
|
};
|
|
}
|
|
|
|
case 'CLEAR_FILE_ERROR': {
|
|
const { fileId } = action.payload;
|
|
return {
|
|
...state,
|
|
ui: { ...state.ui, errorFileIds: state.ui.errorFileIds.filter(id => id !== fileId) }
|
|
};
|
|
}
|
|
|
|
case 'CLEAR_ALL_FILE_ERRORS': {
|
|
return {
|
|
...state,
|
|
ui: { ...state.ui, errorFileIds: [] }
|
|
};
|
|
}
|
|
|
|
case 'PIN_FILE': {
|
|
const { fileId } = action.payload;
|
|
const newPinnedFiles = new Set(state.pinnedFiles);
|
|
newPinnedFiles.add(fileId);
|
|
|
|
return {
|
|
...state,
|
|
pinnedFiles: newPinnedFiles
|
|
};
|
|
}
|
|
|
|
case 'UNPIN_FILE': {
|
|
const { fileId } = action.payload;
|
|
const newPinnedFiles = new Set(state.pinnedFiles);
|
|
newPinnedFiles.delete(fileId);
|
|
|
|
return {
|
|
...state,
|
|
pinnedFiles: newPinnedFiles
|
|
};
|
|
}
|
|
|
|
case 'CONSUME_FILES': {
|
|
const { inputFileIds, outputStirlingFileStubs } = action.payload;
|
|
|
|
return processFileSwap(state, inputFileIds, outputStirlingFileStubs);
|
|
}
|
|
|
|
|
|
case 'UNDO_CONSUME_FILES': {
|
|
const { inputStirlingFileStubs, outputFileIds } = action.payload;
|
|
|
|
return processFileSwap(state, outputFileIds, inputStirlingFileStubs);
|
|
}
|
|
|
|
case 'RESET_CONTEXT': {
|
|
// Reset UI state to clean slate (resource cleanup handled by lifecycle manager)
|
|
return { ...initialFileContextState };
|
|
}
|
|
|
|
default:
|
|
return state;
|
|
}
|
|
}
|