mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-09-24 12:36:13 +00:00
Merge branch 'V2' into V2-eslint-ban-ts-comment
This commit is contained in:
commit
1c8e1da11d
@ -15,16 +15,12 @@ export default defineConfig(
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
rules: {
|
rules: {
|
||||||
"no-empty": "off", // Temporarily disabled until codebase conformant
|
|
||||||
"no-empty-pattern": "off", // Temporarily disabled until codebase conformant
|
"no-empty-pattern": "off", // Temporarily disabled until codebase conformant
|
||||||
"no-undef": "off", // Temporarily disabled until codebase conformant
|
"no-undef": "off", // Temporarily disabled until codebase conformant
|
||||||
"no-useless-escape": "off", // Temporarily disabled until codebase conformant
|
|
||||||
"no-case-declarations": "off", // Temporarily disabled until codebase conformant
|
"no-case-declarations": "off", // Temporarily disabled until codebase conformant
|
||||||
"prefer-const": "off", // Temporarily disabled until codebase conformant
|
|
||||||
"@typescript-eslint/no-empty-object-type": "off", // Temporarily disabled until codebase conformant
|
"@typescript-eslint/no-empty-object-type": "off", // Temporarily disabled until codebase conformant
|
||||||
"@typescript-eslint/no-explicit-any": "off", // Temporarily disabled until codebase conformant
|
"@typescript-eslint/no-explicit-any": "off", // Temporarily disabled until codebase conformant
|
||||||
"@typescript-eslint/no-require-imports": "off", // Temporarily disabled until codebase conformant
|
"@typescript-eslint/no-require-imports": "off", // Temporarily disabled until codebase conformant
|
||||||
"@typescript-eslint/no-unused-expressions": "off", // Temporarily disabled until codebase conformant
|
|
||||||
"@typescript-eslint/no-unused-vars": "off", // Temporarily disabled until codebase conformant
|
"@typescript-eslint/no-unused-vars": "off", // Temporarily disabled until codebase conformant
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ function getLicenseUrl(licenseType) {
|
|||||||
// Handle complex SPDX expressions like "(MIT AND Zlib)" or "(MIT OR CC0-1.0)"
|
// Handle complex SPDX expressions like "(MIT AND Zlib)" or "(MIT OR CC0-1.0)"
|
||||||
if (licenseType.includes('AND') || licenseType.includes('OR')) {
|
if (licenseType.includes('AND') || licenseType.includes('OR')) {
|
||||||
// Extract the first license from compound expressions for URL
|
// Extract the first license from compound expressions for URL
|
||||||
const match = licenseType.match(/\(?\s*([A-Za-z0-9\-\.]+)/);
|
const match = licenseType.match(/\(?\s*([A-Za-z0-9\-.]+)/);
|
||||||
if (match && licenseUrls[match[1]]) {
|
if (match && licenseUrls[match[1]]) {
|
||||||
return licenseUrls[match[1]];
|
return licenseUrls[match[1]];
|
||||||
}
|
}
|
||||||
|
@ -82,8 +82,8 @@ export function adjustFontSizeToFit(
|
|||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
cancelAnimationFrame(raf);
|
cancelAnimationFrame(raf);
|
||||||
try { ro.disconnect(); } catch {}
|
try { ro.disconnect(); } catch { /* Ignore errors */ }
|
||||||
try { mo.disconnect(); } catch {}
|
try { mo.disconnect(); } catch { /* Ignore errors */ }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ const ToolSearch = ({
|
|||||||
key={id}
|
key={id}
|
||||||
variant="subtle"
|
variant="subtle"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onToolSelect && onToolSelect(id);
|
onToolSelect?.(id);
|
||||||
setDropdownOpen(false);
|
setDropdownOpen(false);
|
||||||
}}
|
}}
|
||||||
leftSection={<div style={{ color: "var(--tools-text-and-icon-color)" }}>{tool.icon}</div>}
|
leftSection={<div style={{ color: "var(--tools-text-and-icon-color)" }}>{tool.icon}</div>}
|
||||||
|
@ -35,8 +35,11 @@ function updatePosthogConsent(){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const optIn = (window.CookieConsent as any).acceptedCategory('analytics');
|
const optIn = (window.CookieConsent as any).acceptedCategory('analytics');
|
||||||
optIn?
|
if (optIn) {
|
||||||
posthog.opt_in_capturing() : posthog.opt_out_capturing();
|
posthog.opt_in_capturing();
|
||||||
|
} else {
|
||||||
|
posthog.opt_out_capturing();
|
||||||
|
}
|
||||||
|
|
||||||
console.log("Updated analytics consent: ", optIn? "opted in" : "opted out");
|
console.log("Updated analytics consent: ", optIn? "opted in" : "opted out");
|
||||||
}
|
}
|
||||||
|
@ -519,10 +519,7 @@ export class EnhancedPDFProcessingService {
|
|||||||
this.notifyListeners();
|
this.notifyListeners();
|
||||||
|
|
||||||
// Force memory cleanup hint
|
// Force memory cleanup hint
|
||||||
if (typeof window !== 'undefined' && window.gc) {
|
setTimeout(() => window.gc?.(), 100);
|
||||||
let gc = window.gc;
|
|
||||||
setTimeout(() => gc(), 100);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -92,8 +92,6 @@ class IndexedDBManager {
|
|||||||
|
|
||||||
// Create or update object stores
|
// Create or update object stores
|
||||||
config.stores.forEach(storeConfig => {
|
config.stores.forEach(storeConfig => {
|
||||||
let store: IDBObjectStore;
|
|
||||||
|
|
||||||
if (db.objectStoreNames.contains(storeConfig.name)) {
|
if (db.objectStoreNames.contains(storeConfig.name)) {
|
||||||
// Store exists - for now, just continue (could add migration logic here)
|
// Store exists - for now, just continue (could add migration logic here)
|
||||||
console.log(`Object store '${storeConfig.name}' already exists`);
|
console.log(`Object store '${storeConfig.name}' already exists`);
|
||||||
@ -109,7 +107,7 @@ class IndexedDBManager {
|
|||||||
options.autoIncrement = storeConfig.autoIncrement;
|
options.autoIncrement = storeConfig.autoIncrement;
|
||||||
}
|
}
|
||||||
|
|
||||||
store = db.createObjectStore(storeConfig.name, options);
|
const store = db.createObjectStore(storeConfig.name, options);
|
||||||
console.log(`Created object store '${storeConfig.name}'`);
|
console.log(`Created object store '${storeConfig.name}'`);
|
||||||
|
|
||||||
// Create indexes
|
// Create indexes
|
||||||
|
@ -94,6 +94,7 @@ class PDFWorkerManager {
|
|||||||
try {
|
try {
|
||||||
loadingTask.destroy();
|
loadingTask.destroy();
|
||||||
} catch (destroyError) {
|
} catch (destroyError) {
|
||||||
|
// Ignore errors
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw error;
|
throw error;
|
||||||
@ -166,6 +167,7 @@ class PDFWorkerManager {
|
|||||||
try {
|
try {
|
||||||
pdf.destroy();
|
pdf.destroy();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
// Ignore errors
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user