feat: separate AGPL libraries and add dynamic WASM loading
- Add WASM settings page for configuring external AGPL modules - Implement dynamic loading for PyMuPDF, Ghostscript, and CoherentPDF - Add Cloudflare Worker proxy for serving WASM files with CORS - Update all affected tool pages to check WASM availability - Add showWasmRequiredDialog for missing module configuration Documentation: - Update README, licensing.html, and docs to clarify AGPL components are not bundled and must be configured separately - Add WASM-PROXY.md deployment guide with recommended source URLs - Rename "CPDF" to "CoherentPDF" for consistency
This commit is contained in:
25
public/workers/edit-attachments.worker.d.ts
vendored
25
public/workers/edit-attachments.worker.d.ts
vendored
@@ -4,6 +4,7 @@ interface GetAttachmentsMessage {
|
||||
command: 'get-attachments';
|
||||
fileBuffer: ArrayBuffer;
|
||||
fileName: string;
|
||||
cpdfUrl?: string;
|
||||
}
|
||||
|
||||
interface EditAttachmentsMessage {
|
||||
@@ -11,13 +12,21 @@ interface EditAttachmentsMessage {
|
||||
fileBuffer: ArrayBuffer;
|
||||
fileName: string;
|
||||
attachmentsToRemove: number[];
|
||||
cpdfUrl?: string;
|
||||
}
|
||||
|
||||
type EditAttachmentsWorkerMessage = GetAttachmentsMessage | EditAttachmentsMessage;
|
||||
type EditAttachmentsWorkerMessage =
|
||||
| GetAttachmentsMessage
|
||||
| EditAttachmentsMessage;
|
||||
|
||||
interface GetAttachmentsSuccessResponse {
|
||||
status: 'success';
|
||||
attachments: Array<{ index: number; name: string; page: number; data: ArrayBuffer }>;
|
||||
attachments: Array<{
|
||||
index: number;
|
||||
name: string;
|
||||
page: number;
|
||||
data: ArrayBuffer;
|
||||
}>;
|
||||
fileName: string;
|
||||
}
|
||||
|
||||
@@ -37,6 +46,12 @@ interface EditAttachmentsErrorResponse {
|
||||
message: string;
|
||||
}
|
||||
|
||||
type GetAttachmentsResponse = GetAttachmentsSuccessResponse | GetAttachmentsErrorResponse;
|
||||
type EditAttachmentsResponse = EditAttachmentsSuccessResponse | EditAttachmentsErrorResponse;
|
||||
type EditAttachmentsWorkerResponse = GetAttachmentsResponse | EditAttachmentsResponse;
|
||||
type GetAttachmentsResponse =
|
||||
| GetAttachmentsSuccessResponse
|
||||
| GetAttachmentsErrorResponse;
|
||||
type EditAttachmentsResponse =
|
||||
| EditAttachmentsSuccessResponse
|
||||
| EditAttachmentsErrorResponse;
|
||||
type EditAttachmentsWorkerResponse =
|
||||
| GetAttachmentsResponse
|
||||
| EditAttachmentsResponse;
|
||||
|
||||
Reference in New Issue
Block a user