mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-14 18:44:05 +02:00
# Description of Changes Move frontend code into `core` folder and add infrastructure for `proprietary` folder to include premium, non-OSS features
24 lines
657 B
TypeScript
24 lines
657 B
TypeScript
import { useEffect } from 'react';
|
|
import { useThumbnailCapability } from '@embedpdf/plugin-thumbnail/react';
|
|
import { useViewer } from '@app/contexts/ViewerContext';
|
|
|
|
/**
|
|
* ThumbnailAPIBridge provides thumbnail generation functionality.
|
|
* Exposes thumbnail API to UI components without managing state.
|
|
*/
|
|
export function ThumbnailAPIBridge() {
|
|
const { provides: thumbnail } = useThumbnailCapability();
|
|
const { registerBridge } = useViewer();
|
|
|
|
useEffect(() => {
|
|
if (thumbnail) {
|
|
registerBridge('thumbnail', {
|
|
state: null, // No state - just provides API
|
|
api: thumbnail
|
|
});
|
|
}
|
|
}, [thumbnail]);
|
|
|
|
return null;
|
|
}
|