import type { EngineAdapter } from "../EngineAdapter"; /** A page-local click resolved to own-render PAGE px + the page index (for the workspace to hit-test). * `meta` folds in the additive/toggle modifier (⌘ on macOS, Ctrl elsewhere) so the selection model can * branch replace vs. toggle/union without re-reading the event; `client` carries the raw screen point * so the workspace can measure the 4px drag threshold in true CSS px (independent of zoom). */ /** `shift` 는 글자 캐럿의 **Shift+클릭 범위 선택**용(선택 모델은 `meta` 만 본다 — 충돌 없음). */ export type PageClick = { page: number; x: number; y: number; meta: boolean; shift: boolean; client: { x: number; y: number; }; }; /** DEV/test helper: how many times any document sheet has rendered since the last reset. */ export declare function __getSheetRenderCount(): number; /** DEV/test helper: zero the sheet render counter (call right before a measured gesture). */ export declare function __resetSheetRenderCount(): void; /** DEV/test helper: how many pages were sanitized+injected (i.e. changed) since the last reset. */ export declare function __getPageInjectCount(): number; /** DEV/test helper: how many pages were skipped (raw svg unchanged) since the last reset. */ export declare function __getPageSkipCount(): number; /** DEV/test helper: zero the page inject/skip counters (call right before a measured refresh). */ export declare function __resetPageRefreshCounts(): void; export interface HwpPageViewProps { adapter: EngineAdapter; /** Number of pages to render (from the workspace's open result / live count). */ pageCount: number; /** Zoom factor: 1 = 100%. The A4 base width scales by this. */ zoom?: number; /** A monotonically-bumped token; when it changes, every page's SVG is re-fetched (post-edit). */ refreshToken?: number; /** A page-local click, already converted to own-render PAGE px (§4.5 lives in the component). */ onPageClick?: (click: PageClick) => void; /** A page-local DOUBLE-click (issue 027: open the inline text popover). Same page-px conversion. */ onPageDoubleClick?: (click: PageClick) => void; /** Pointer lifecycle for the selection model (issue 021): each carries the same page-local px + the * modifier + the raw client point. On pointerdown the sheet captures the pointer so a drag that * leaves the page still reports move/up here (marquee clips to the start page). Optional — a backend * that only wants clicks can omit them. */ onPagePointerDown?: (click: PageClick, ev: React.PointerEvent) => void; onPagePointerMove?: (click: PageClick, ev: React.PointerEvent) => void; onPagePointerUp?: (click: PageClick, ev: React.PointerEvent) => void; /** Per-page overlay layer (SelectionOverlay marks). `scale` = rendered px / viewBox px, so marks * positioned as `pageBox * scale` track zoom exactly. Rendered inside a position:relative sheet. */ /** `visible` — false for a virtualized placeholder page (no SVG mounted): overlays that measure the engine (#511) skip it. */ renderOverlay?: (page: number, scale: number, visible: boolean) => React.ReactNode; /** #482 — receives a stable `PageViewHandle` (null on unmount): scroll to a page and read page sizes * without querying this view's DOM. */ handleRef?: React.Ref; } /** #482 — imperative access to one page view. Identity is stable while mounted. */ export interface PageViewHandle { /** Scroll the nearest scrollable ancestor so page `page` (0-based) starts at the top. Works for a * virtualized (placeholder) page too. No-op for a page outside `pageCount`. */ scrollToPage(page: number, behavior?: ScrollBehavior): void; /** CSS px size of page `page` at zoom 1 (the rendered size is this × `zoom`). Before the page's SVG * has arrived the height uses the A4 aspect. `null` for a page outside `pageCount`. */ getPageSize(page: number): { width: number; height: number; } | null; } export declare function HwpPageView(props: HwpPageViewProps): import("react").JSX.Element; //# sourceMappingURL=HwpPageView.d.ts.map