/** * @embedpdf/viewer-vue/core: the engine-agnostic Vue door. * * ```vue * * * * ``` * * The same as the main entry, but with no default engine, so * `engine` is required and takes only a real implementation (an `Engine`, or a * factory the viewer owns the lifetime of). In exchange the local PDFium engine * (wasm, worker source, main-thread recipe) never enters your module graph: * nothing is stubbed or aliased away, it is not imported. Its options bag is * absent from the type for the same reason (there is no built-in engine here * for `{ assetsUrl }` to configure). * * App code that wants the batteries-included viewer imports * `@embedpdf/viewer-vue`; this entry is for builds that always pass their own * engine, and is what the CloudPDF Vue wrapper is built on. */ import '@embedpdf/viewer/core'; import type { ViewerConfig } from '@embedpdf/viewer/core'; import { defineComponent } from 'vue'; import { PDF_VIEWER_OPTIONS, setupPDFViewer, type PDFViewerComponent, type PDFViewerEmits, type PDFViewerPropsOf, type PDFViewerSlots, } from './parts'; export * from '@embedpdf/viewer/core'; export * from './parts'; /** Props on this door: `engine` is required, and only a real engine satisfies it. */ export type PDFViewerProps = PDFViewerPropsOf; /** * The full viewer. The shared setup takes the widest config, so it serves this door's narrower * props as they are; the type adds what a template ref reads (`elementRef`). */ export const PDFViewer = defineComponent( setupPDFViewer, PDF_VIEWER_OPTIONS, ) as PDFViewerComponent;