Commit Graph

4135 Commits

Author SHA1 Message Date
Ludy87
e75d997ec8
Prefer using nullish coalescing operator (??) instead of a logical or (||), as it is a safer operator 2025-09-26 09:16:42 +02:00
Ludy87
4e2beab35b
Refactor array type annotations to use shorthand syntax
Replaces verbose Array<T> type annotations with the shorthand T[] across multiple frontend files for consistency and readability. Also includes minor improvements such as using optional chaining, simplifying type casts, and updating dependency versions in package.json.
2025-09-26 08:47:31 +02:00
Ludy
bde0ec5ece
Merge branch 'V2' into add_eslint_plugins 2025-09-26 08:36:33 +02:00
EthanHealy01
fd52dc0226
Feature/toasts and error handling (#4496)
# Description of Changes

- Added error handling and toast notifications

---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
2025-09-25 21:03:53 +01:00
EthanHealy01
21b1428ab5
Feature/v2/fuzzy tool search (#4482)
# Description of Changes

<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## Checklist

### General

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [x] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
2025-09-25 16:32:30 +01:00
Ludy
4ee2030ef8
Merge branch 'V2' into add_eslint_plugins 2025-09-25 15:07:58 +02:00
Anthony Stirling
1219cebd07
Language stuff (#4490)
# Description of Changes

<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
2025-09-25 12:50:19 +01:00
Ludy87
966d80b0fc
Fix parameter type definitions and metadata validation
Updated parameter types in AutomationOperation and AutomationTool to allow undefined values. Fixed logic in useChangeMetadataParameters to use logical OR instead of nullish coalescing for metadata validation.
2025-09-25 10:05:49 +02:00
Ludy87
c3b604791a
Refactor refs to use RefObject and improve type safety
Updated various components, hooks, and context files to use React.RefObject instead of React.Ref for improved type safety and consistency. Enhanced type definitions for automation parameters, fixed minor bugs, and improved error handling in tool operations and automation execution. Also updated utility functions and test files to align with these changes.
2025-09-25 09:54:25 +02:00
Ludy87
ac5c4043db
Update thumbnailUtils.ts 2025-09-25 08:56:43 +02:00
Ludy87
6f4c2613b5
Update dependencies and improve editor components
Upgraded several frontend dependencies including @embedpdf and @vue packages to their latest versions. Made improvements and fixes to page editor components, shared overlays, tool workflow title, tool flow creation, sidebar context, and tool error handling utilities.
2025-09-25 08:53:12 +02:00
Ludy87
0e1a42bbb1
Update AutomationRun.tsx 2025-09-25 07:49:17 +02:00
Ludy87
1c95c6a2e8
Replace empty arrow functions with explicit comments
Updated all empty arrow functions and constructors to include an explicit '/* empty */' comment for clarity and consistency. Also fixed a minor HTML entity in SwaggerUI and removed unnecessary async/Promise usage in some service methods.
2025-09-25 07:46:23 +02:00
Ludy87
4c8ae23652
Fix scroll element fallback in DragDropGrid virtualization
Updated the getScrollElement function to fall back to containerRef.current if no scrolling container is found. This improves compatibility and prevents potential errors when the expected scrolling container is not present.
2025-09-25 07:37:53 +02:00
Ludy87
490c7c1018
Refactor to use nullish coalescing and add missing React imports
Replaced many uses of logical OR (||) with nullish coalescing (??) for more accurate handling of undefined/null values. Added missing explicit React imports to various component files to ensure compatibility with tooling and future React versions. Also updated some async function calls to use 'void' for better type safety and intent clarity. Minor whitespace and formatting adjustments included.
2025-09-25 07:36:19 +02:00
Ludy
906dc9bd8f
Merge branch 'V2' into add_eslint_plugins 2025-09-25 07:27:56 +02:00
Ludy87
b11a82f1c9
Refactor type usage and nullish coalescing in frontend
Replaces type aliases with interfaces for props and options, updates array type syntax, and consistently uses nullish coalescing (??) instead of logical OR (||) for default values. Also refactors some test and component code to improve type safety and clarity, and updates function signatures and destructuring for better maintainability.
2025-09-24 22:32:58 +02:00
Anthony Stirling
166f6d2d98
path (#4488)
# Description of Changes

<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
2025-09-24 20:37:51 +01:00
Ludy87
dc0b812214
Refactor base URL access to use hook in HomePage
Replaced direct usage of getBaseUrl with the useBaseUrl hook in HomePage.tsx for improved React integration. Updated app constants to clarify usage and added a newline for readability.
2025-09-24 20:01:56 +02:00
Ludy87
38d10e7c06
Update useSplitSettingsTips.ts 2025-09-24 19:50:56 +02:00
Ludy87
6625479765
Update SidebarContext.tsx 2025-09-24 19:47:37 +02:00
Ludy87
c6cf5bccf0
Refactor tooltips, context, and update dependencies
Refactored tooltip and context usage for improved flexibility and error handling. Updated dependency versions for posthog-js and react-router-dom. Improved i18n usage in tool step components, restructured FileContext for better persistence management, and enhanced hooks for parameter handling. Minor code cleanups and optimizations throughout.
2025-09-24 19:44:30 +02:00
Ludy87
885d0d4404
Rename generate-licenses script to .mjs
Renamed generate-licenses.js to generate-licenses.mjs and updated the package.json script to use the new file extension, reflecting a switch to ES module format.
2025-09-24 16:06:37 +02:00
Ludy
9727237831
Merge branch 'V2' into add_eslint_plugins 2025-09-24 16:02:08 +02:00
Anthony Stirling
6441dc1d6f
fixes V2 (#4483)
# Description of Changes

<!--
Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)
-->

---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
2025-09-24 15:01:18 +01:00
Ludy
9628aca87c
Merge branch 'V2' into add_eslint_plugins 2025-09-24 15:59:30 +02:00
Ludy
25bedf064f
Update PDF.js integration and dependencies (#4360)
Co-authored-by: ConnorYoh <40631091+ConnorYoh@users.noreply.github.com>
Co-authored-by: Reece Browne <74901996+reecebrowne@users.noreply.github.com>
2025-09-24 13:07:27 +01:00
EthanHealy01
13eff6b333
Addition of the Add Stamp to PDF tool (#4440) 2025-09-23 14:01:42 +01:00
Anthony Stirling
46a4a978fc
Booklet and server sign (#4371)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: a <a>
Co-authored-by: ConnorYoh <40631091+ConnorYoh@users.noreply.github.com>
Co-authored-by: Reece Browne <74901996+reecebrowne@users.noreply.github.com>
2025-09-23 11:24:48 +01:00
Ludy
539b8b7d91
Update frontend/eslint.config.mjs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-22 22:17:27 +02:00
Ludy87
3517f22c23
Add React and hooks ESLint plugins and config
Enhanced the ESLint configuration to include 'eslint-plugin-react', 'eslint-plugin-react-hooks', and 'globals' for improved React and browser environment linting. Updated rules and overrides for React files, test files, and Node.js scripts. Updated dependencies in package.json and package-lock.json to include the new plugins and bumped several related packages.
2025-09-22 22:14:45 +02:00
James Brunton
c76edebf0f
Add Crop to V2 (#4471)
# Description of Changes
Add Crop to V2

---------

Co-authored-by: EthanHealy01 <80844253+EthanHealy01@users.noreply.github.com>
Co-authored-by: Connor Yoh <connor@stirlingpdf.com>
Co-authored-by: ConnorYoh <40631091+ConnorYoh@users.noreply.github.com>
2025-09-22 14:06:20 +01:00
James Brunton
f6df414425
Make Viewer always accessible (#4468)
# Description of Changes
Make Viewer always accessible. Also deletes some dead code I noticed
while I was working.

---------

Co-authored-by: EthanHealy01 <80844253+EthanHealy01@users.noreply.github.com>
Co-authored-by: Reece Browne <74901996+reecebrowne@users.noreply.github.com>
2025-09-22 12:11:34 +01:00
Anthony Stirling
28177d9509
API Cleanup (#4459)
Co-authored-by: ConnorYoh <40631091+ConnorYoh@users.noreply.github.com>
2025-09-22 11:56:07 +01:00
James Brunton
64beb4d076
Disable language selection for everything other than English GB (#4467)
# Description of Changes
For the first release of V2, we'll not have any reasonable translations
for anything other than English GB, so with that in mind, this PR
disables language selection for anything other than English GB, with a
tooltip saying the other languages are coming soon. I also split the JSX
up a little bit while I was at it to make it easier to manage.

---------

Co-authored-by: EthanHealy01 <80844253+EthanHealy01@users.noreply.github.com>
2025-09-22 10:50:49 +00:00
James Brunton
9cbd1f7f0c
Normalise tool IDs and fix file history to render IDs properly (#4470)
# Description of Changes
Normalise tool IDs and fix file history to render IDs properly
2025-09-22 11:46:56 +01:00
Reece Browne
065bb46c1e
Feature/v2/embed pdf (#4437)
Switched to Embed pdf for viewer

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: James Brunton <james@stirlingpdf.com>
2025-09-19 15:35:51 +01:00
Anthony Stirling
f29bbfd15b
update some langs in V2 (#4469) 2025-09-19 12:43:11 +01:00
James Brunton
ae7be50ec2
Make accordion hook (#4464)
# Description of Changes
Make accordion hook, which controls step collapsed state, enforcing only
one step being open at any time
2025-09-18 13:33:54 +01:00
EthanHealy01
d2de8e54aa
change bulk selection panel to allow more versatile input (#4394)
# Description of Changes

- Add features to BulkSelectionPanel to allow more versatility when
selecting pages
- Make changes to Tooltip to: Remove non-existent props delayAppearance,
fixed defaults no hardcoded maxWidth, and documented new props
(closeOnOutside, containerStyle, minWidth). Clarify pinned vs. unpinned
outside-click logic, hover/focus interactions, and event/ref
preservation.
- Made top controls show full text always rather than dynamically
display the text only for the selected items
---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
2025-09-18 10:19:52 +00:00
James Brunton
06e5205302
V2 rotate (#4452)
# Description of Changes
Add Rotate tool to V2
2025-09-18 11:04:12 +01:00
James Brunton
a5693ee116
V2 change metadata (#4433)
# Description of Changes
Add Change Metadata tool
2025-09-18 09:41:39 +00:00
EthanHealy01
756cbc4780
Feature/v2/remove pages (#4445)
# Description of Changes

- Addition of the remove pages tool
- Addition of the remove blank pages tool

---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
2025-09-18 09:51:55 +01:00
James Brunton
7ff1c66d09
Remove custom response handler from Merge (#4457)
# Description of Changes
Remove custom response handler from Merge. Also make `filePrefix`
mandatory for `multiFile` tools to make the output more visually
different since you get a new 'V1' file rather than 'V2' of the current
file.
2025-09-17 15:11:36 +01:00
ConnorYoh
b51c2e42a6
Removed optionality for 'onDownloadFile', removed fallback in fileEditorThumbnail. (#4456)
Removed optionality for 'onDownloadFile', removed fallback in
fileEditorThumbnail.

Co-authored-by: Connor Yoh <connor@stirlingpdf.com>
2025-09-17 11:53:04 +01:00
James Brunton
6a94e10e30
Delete Claude local settings (#4455)
# Description of Changes
Delete Claude local settings, which shouldn't really be in the repo.
Note that this is already in the `.gitignore` file, so there's no need
to change that as well.
2025-09-17 11:43:06 +01:00
Anthony Stirling
49a10a3865
Change fallback base URL to 'https://stirling.com' 2025-09-17 08:34:55 +01:00
ConnorYoh
190178a471
Feature/v2/filehistory (#4370)
File History

---------

Co-authored-by: Connor Yoh <connor@stirlingpdf.com>
2025-09-16 15:08:11 +01:00
ConnorYoh
8e8b417f5e
V2 Tool - Auto split (#4446)
integrated auto split, with flattened split tool

---------

Co-authored-by: Connor Yoh <connor@stirlingpdf.com>
2025-09-16 13:08:54 +01:00
ConnorYoh
a57373b968
V2 Flatten split options to remove layers of drop downs (#4439)
Co-authored-by: Connor Yoh <connor@stirlingpdf.com>
2025-09-15 16:11:29 +00:00