flipbookengine 0.6.5 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/CHANGELOG.md +115 -75
  2. package/README.md +429 -295
  3. package/dist/components/AnnotationPlacement.d.ts +5 -0
  4. package/dist/components/AnnotationPopover.d.ts +10 -0
  5. package/dist/components/App.d.ts +26 -0
  6. package/dist/components/HotspotLayer.d.ts +14 -0
  7. package/dist/components/NoteEditor.d.ts +13 -0
  8. package/dist/components/NotePlacementLayer.d.ts +11 -0
  9. package/dist/components/NotesPanel.d.ts +17 -0
  10. package/dist/components/PluginPanels.d.ts +5 -0
  11. package/dist/components/ReaderHelp.d.ts +3 -0
  12. package/dist/components/ReaderShortcuts.d.ts +16 -0
  13. package/dist/components/SearchPanel.d.ts +11 -0
  14. package/dist/components/TableOfContents.d.ts +1 -0
  15. package/dist/components/TextLayer.d.ts +8 -0
  16. package/dist/components/Toolbar.d.ts +7 -1
  17. package/dist/components/ToolbarMore.d.ts +6 -0
  18. package/dist/components/Viewer.d.ts +8 -0
  19. package/dist/core/LayoutManager.d.ts +1 -1
  20. package/dist/core/PdfRenderer.d.ts +11 -0
  21. package/dist/core/TextLayerLoader.d.ts +5 -0
  22. package/dist/core/domSignal.d.ts +2 -0
  23. package/dist/core-entry.d.ts +14 -0
  24. package/dist/core.d.ts +1 -0
  25. package/dist/embed.d.ts +80 -0
  26. package/dist/engine-DD5qEHLm.js +4657 -0
  27. package/dist/engine-DD5qEHLm.js.map +1 -0
  28. package/dist/engine.d.ts +124 -0
  29. package/dist/feature-Cicli9ie.js +17 -0
  30. package/dist/feature-Cicli9ie.js.map +1 -0
  31. package/dist/flipbook-engine.core.js +8 -0
  32. package/dist/flipbook-engine.core.js.map +1 -0
  33. package/dist/flipbook-engine.css +1 -1
  34. package/dist/flipbook-engine.iife.js +51 -55
  35. package/dist/flipbook-engine.iife.js.map +1 -1
  36. package/dist/flipbook-engine.js +10 -6
  37. package/dist/flipbook-engine.js.map +1 -1
  38. package/dist/flipbook-engine.plugins-annotations.js +14 -0
  39. package/dist/flipbook-engine.plugins-annotations.js.map +1 -0
  40. package/dist/flipbook-engine.plugins-bookmarks.js +16 -0
  41. package/dist/flipbook-engine.plugins-bookmarks.js.map +1 -0
  42. package/dist/flipbook-engine.plugins-deep-link.js +14 -0
  43. package/dist/flipbook-engine.plugins-deep-link.js.map +1 -0
  44. package/dist/flipbook-engine.plugins-hotspots.js +15 -0
  45. package/dist/flipbook-engine.plugins-hotspots.js.map +1 -0
  46. package/dist/flipbook-engine.plugins-notes.js +16 -0
  47. package/dist/flipbook-engine.plugins-notes.js.map +1 -0
  48. package/dist/flipbook-engine.plugins-search.js +15 -0
  49. package/dist/flipbook-engine.plugins-search.js.map +1 -0
  50. package/dist/flipbook-engine.plugins-share.js +13 -0
  51. package/dist/flipbook-engine.plugins-share.js.map +1 -0
  52. package/dist/flipbook-engine.plugins-toc.js +14 -0
  53. package/dist/flipbook-engine.plugins-toc.js.map +1 -0
  54. package/dist/flipbook-engine.plugins.js +5 -0
  55. package/dist/flipbook-engine.plugins.js.map +1 -0
  56. package/dist/flipbook-engine.react.js +1 -1
  57. package/dist/flipbook-engine.vue.js +1 -1
  58. package/dist/i18n/locales/en.d.ts +39 -0
  59. package/dist/i18n/locales/tr.d.ts +39 -0
  60. package/dist/i18n/service.d.ts +117 -0
  61. package/dist/index-BhTR2SK6.js +366 -0
  62. package/dist/index-BhTR2SK6.js.map +1 -0
  63. package/dist/index.d.ts +10 -0
  64. package/dist/model/annotations.d.ts +15 -0
  65. package/dist/model/backend.d.ts +8 -0
  66. package/dist/model/hotspots.d.ts +40 -0
  67. package/dist/model/note-editor.d.ts +22 -0
  68. package/dist/model/search.d.ts +25 -0
  69. package/dist/model/text-layer.d.ts +21 -0
  70. package/dist/plugins/annotations.d.ts +4 -0
  71. package/dist/plugins/bookmarks.d.ts +4 -0
  72. package/dist/plugins/deep-link.d.ts +4 -0
  73. package/dist/plugins/feature.d.ts +5 -0
  74. package/dist/plugins/hotspots.d.ts +4 -0
  75. package/dist/plugins/index.d.ts +65 -0
  76. package/dist/plugins/notes.d.ts +4 -0
  77. package/dist/plugins/search.d.ts +4 -0
  78. package/dist/plugins/share.d.ts +4 -0
  79. package/dist/plugins/toc.d.ts +4 -0
  80. package/dist/plugins-annotations.d.ts +1 -0
  81. package/dist/plugins-bookmarks.d.ts +1 -0
  82. package/dist/plugins-deep-link.d.ts +1 -0
  83. package/dist/plugins-hotspots.d.ts +1 -0
  84. package/dist/plugins-notes.d.ts +1 -0
  85. package/dist/plugins-search.d.ts +1 -0
  86. package/dist/plugins-share.d.ts +1 -0
  87. package/dist/plugins-toc.d.ts +1 -0
  88. package/dist/plugins.d.ts +1 -0
  89. package/dist/state/store.d.ts +35 -5
  90. package/dist/vue/index.d.ts +1 -1
  91. package/docs/api-reference.md +228 -0
  92. package/docs/backend-text-layers.md +40 -0
  93. package/docs/frameworks.md +73 -0
  94. package/docs/getting-started.md +128 -0
  95. package/docs/i18n.md +47 -0
  96. package/docs/migration-0.4.0.md +24 -0
  97. package/docs/migration-0.5.0.md +25 -0
  98. package/docs/migration-1.0.0.md +59 -0
  99. package/docs/plugin-architecture.md +103 -0
  100. package/docs/release-checklist.md +37 -0
  101. package/docs/theming.md +61 -0
  102. package/package.json +52 -1
  103. package/dist/engine-DhQ2zxpm.js +0 -3535
  104. package/dist/engine-DhQ2zxpm.js.map +0 -1
@@ -0,0 +1,5 @@
1
+ import { FlipbookStore } from '../state/store';
2
+
3
+ export declare function AnnotationPlacement(props: {
4
+ store: FlipbookStore;
5
+ }): import('@serenity-is/domwise').JSXElement;
@@ -0,0 +1,10 @@
1
+ import { FlipbookAnnotation } from '../model/annotations';
2
+ import { FlipbookStore } from '../state/store';
3
+
4
+ export declare function AnnotationPopover(props: {
5
+ store: FlipbookStore;
6
+ signal: AbortSignal;
7
+ onSave: (note: FlipbookAnnotation) => Promise<boolean>;
8
+ onDelete: (note: FlipbookAnnotation) => Promise<boolean>;
9
+ onClose: () => void;
10
+ }): import('@serenity-is/domwise').JSXElement;
@@ -1,6 +1,11 @@
1
+ import { FlipbookNoteDocument } from '../model/note-editor';
2
+ import { FlipbookSearchOptions } from '../model/search';
3
+ import { FlipbookHotspot } from '../model/hotspots';
4
+ import { FlipbookAnnotation } from '../model/annotations';
1
5
  import { FlipbookStore } from '../state/store';
2
6
  import { PageFlipAdapter } from '../adapters/PageFlipAdapter';
3
7
  import { InteractionManager } from '../core/InteractionManager';
8
+ import { FlipbookPluginRegistry } from '../plugins';
4
9
 
5
10
  interface AppProps {
6
11
  pageFlipAdapterRef: {
@@ -14,8 +19,29 @@ interface AppProps {
14
19
  bookContainerRef: (el: HTMLElement) => void;
15
20
  className?: string;
16
21
  onDownload: () => void;
22
+ onShare: () => void;
23
+ onToggleBookmark: () => void;
24
+ onToggleNotes: () => void;
25
+ onSelectNote: (pageIndex: number) => void;
26
+ onBeginAnnotation: () => void;
27
+ onPlaceAnnotation: (pageIndex: number, x: number, y: number) => void;
28
+ onSaveAnnotation: (annotation: FlipbookAnnotation) => Promise<boolean>;
29
+ onDeleteAnnotation: (annotation: FlipbookAnnotation) => Promise<boolean>;
30
+ onSaveNote: (note: string, document?: FlipbookNoteDocument) => Promise<boolean>;
31
+ onClearNote: () => Promise<boolean>;
32
+ onCloseNotes: () => void;
33
+ onSearch: (query: string, options?: FlipbookSearchOptions) => void;
34
+ onClearSearch: () => void;
35
+ onCloseSearch: () => void;
36
+ onSelectSearchResult: (pageIndex: number) => void;
37
+ onHotspotActivate: (hotspot: FlipbookHotspot) => void;
38
+ onHotspotClose: () => void;
39
+ onAnnotationActivate: (annotation: FlipbookAnnotation) => void;
40
+ onAnnotationClose: () => void;
17
41
  onToggleFullscreen: () => void;
18
42
  store: FlipbookStore;
43
+ pluginRegistry?: FlipbookPluginRegistry;
44
+ signal: AbortSignal;
19
45
  }
20
46
  export declare function App(props: AppProps): import('@serenity-is/domwise').JSXElement;
21
47
  export {};
@@ -0,0 +1,14 @@
1
+ import { FlipbookHotspot } from '../model/hotspots';
2
+ import { FlipbookAnnotation } from '../model/annotations';
3
+ import { FlipbookStore } from '../state/store';
4
+
5
+ interface HotspotLayerProps {
6
+ store: FlipbookStore;
7
+ pageIndex: number;
8
+ onActivate: (hotspot: FlipbookHotspot) => void;
9
+ onClose: () => void;
10
+ onAnnotationActivate: (annotation: FlipbookAnnotation) => void;
11
+ onAnnotationClose: () => void;
12
+ }
13
+ export declare function HotspotLayer(props: HotspotLayerProps): import('@serenity-is/domwise').JSXElement;
14
+ export {};
@@ -0,0 +1,13 @@
1
+ import { FlipbookNoteEditor, FlipbookNoteEditorFactory, FlipbookNoteValue } from '../model/note-editor';
2
+
3
+ export declare function NoteEditor(props: {
4
+ value: FlipbookNoteValue;
5
+ factory?: FlipbookNoteEditorFactory;
6
+ signal: AbortSignal;
7
+ label: string;
8
+ view: {
9
+ current: FlipbookNoteEditor | null;
10
+ };
11
+ onReady: (ready: boolean) => void;
12
+ onDraft?: (value: FlipbookNoteValue) => void;
13
+ }): HTMLDivElement;
@@ -0,0 +1,11 @@
1
+ import { FlipbookStore } from '../state/store';
2
+
3
+ type Place = (page: number, x: number, y: number) => void;
4
+ export declare function NotePlacementLayer(props: {
5
+ store: FlipbookStore;
6
+ pageIndex: number;
7
+ onPlace: Place;
8
+ }): import('@serenity-is/domwise').JSXElement;
9
+ /** Long press tolerates small finger movement; dragging/pinching always cancels it. */
10
+ export declare function bindNoteGestures(element: HTMLElement, store: FlipbookStore, place: Place, signal: AbortSignal): void;
11
+ export {};
@@ -0,0 +1,17 @@
1
+ import { FlipbookStore } from '../state/store';
2
+ import { FlipbookAnnotation } from '../model/annotations';
3
+ import { FlipbookNoteDocument } from '../model/note-editor';
4
+
5
+ interface NotesPanelProps {
6
+ store: FlipbookStore;
7
+ onSave: (note: string, document?: FlipbookNoteDocument) => Promise<boolean>;
8
+ onClear: () => Promise<boolean>;
9
+ onClose: () => void;
10
+ onSelect: (pageIndex: number) => void;
11
+ onAnnotation: (annotation: FlipbookAnnotation) => void;
12
+ onAdd: () => void;
13
+ signal: AbortSignal;
14
+ }
15
+ /** The editor keeps its draft until the host confirms persistence. */
16
+ export declare function NotesPanel(props: NotesPanelProps): import('@serenity-is/domwise').JSXElement;
17
+ export {};
@@ -0,0 +1,5 @@
1
+ import { FlipbookPluginRegistry } from '../plugins';
2
+
3
+ export declare function PluginPanels(props: {
4
+ registry: FlipbookPluginRegistry;
5
+ }): import('@serenity-is/domwise').JSXElement;
@@ -0,0 +1,3 @@
1
+ import { FlipbookStore } from '../state/store';
2
+
3
+ export declare function showReaderHelp(root: HTMLElement, store: FlipbookStore): void;
@@ -0,0 +1,16 @@
1
+ import { FlipbookStore } from '../state/store';
2
+ import { InteractionManager } from '../core/InteractionManager';
3
+ import { PageFlipAdapter } from '../adapters/PageFlipAdapter';
4
+
5
+ export declare function ReaderShortcuts(root: HTMLElement, store: FlipbookStore, commands: {
6
+ pageFlipAdapterRef: {
7
+ current: PageFlipAdapter | null;
8
+ };
9
+ interactionManagerRef: {
10
+ current: InteractionManager | null;
11
+ };
12
+ onBeginAnnotation: () => void;
13
+ onToggleNotes: () => void;
14
+ onToggleFullscreen: () => void;
15
+ onAnnotationClose: () => void;
16
+ }, signal: AbortSignal): void;
@@ -0,0 +1,11 @@
1
+ import { FlipbookStore } from '../state/store';
2
+
3
+ interface SearchPanelProps {
4
+ store: FlipbookStore;
5
+ onSearch: (query: string) => void;
6
+ onClear: () => void;
7
+ onClose: () => void;
8
+ onSelect: (pageIndex: number) => void;
9
+ }
10
+ export declare function SearchPanel(props: SearchPanelProps): import('@serenity-is/domwise').JSXElement;
11
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { FlipbookStore } from '../state/store';
2
2
 
3
3
  interface TableOfContentsProps {
4
+ onClose?: () => void;
4
5
  store: FlipbookStore;
5
6
  onEntryClick: (pageIndex: number) => void;
6
7
  }
@@ -0,0 +1,8 @@
1
+ import { FlipbookStore } from '../state/store';
2
+
3
+ /** Transparent text is loaded independently of the PDF and page image resolution. */
4
+ export declare function TextLayer(props: {
5
+ store: FlipbookStore;
6
+ pageIndex: number;
7
+ signal: AbortSignal;
8
+ }): import('@serenity-is/domwise').JSXElement;
@@ -1,18 +1,24 @@
1
1
  import { FlipbookStore } from '../state/store';
2
+ import { FlipbookPluginRegistry } from '../plugins';
2
3
 
3
4
  interface ToolbarProps {
4
5
  store: FlipbookStore;
5
6
  onToggleThumbs: () => void;
6
7
  onToggleToc: () => void;
8
+ onToggleSearch: () => void;
7
9
  onToggleSingleMode: () => void;
8
10
  onZoomIn: () => void;
9
11
  onZoomOut: () => void;
10
12
  onDownload?: () => void;
13
+ onShare: () => void;
14
+ onToggleBookmark: () => void;
15
+ onToggleNotes: () => void;
11
16
  onSoundToggle: () => void;
12
17
  onNextPage: () => void;
13
18
  onPrevPage: () => void;
14
19
  onToggleAutoPlay: () => void;
15
20
  onToggleFullscreen: () => void;
21
+ pluginRegistry?: FlipbookPluginRegistry;
16
22
  }
17
- export declare function Toolbar(props: ToolbarProps): import('@serenity-is/domwise').JSXElement;
23
+ export declare function Toolbar(props: ToolbarProps): HTMLElement;
18
24
  export {};
@@ -0,0 +1,6 @@
1
+ import { ReadonlySignal } from '@preact/signals-core';
2
+ import { FlipbookMessages } from '../i18n/service';
3
+ import { FlipbookStore } from '../state/store';
4
+
5
+ /** Secondary commands retain their original handlers and reactive icons. */
6
+ export declare function attachToolbarMore(toolbar: HTMLElement, messages: ReadonlySignal<FlipbookMessages>, store: FlipbookStore): void;
@@ -1,10 +1,18 @@
1
1
  import { FlipbookStore } from '../state/store';
2
+ import { FlipbookHotspot } from '../model/hotspots';
3
+ import { FlipbookAnnotation } from '../model/annotations';
2
4
 
3
5
  interface ViewerProps {
4
6
  store: FlipbookStore;
5
7
  bookWrapperRef: (el: HTMLElement) => void;
6
8
  bookSizerRef: (el: HTMLElement) => void;
7
9
  bookContainerRef: (el: HTMLElement) => void;
10
+ onHotspotActivate: (hotspot: FlipbookHotspot) => void;
11
+ onHotspotClose: () => void;
12
+ onAnnotationActivate: (annotation: FlipbookAnnotation) => void;
13
+ onAnnotationClose: () => void;
14
+ onPlaceAnnotation: (pageIndex: number, x: number, y: number) => void;
15
+ signal: AbortSignal;
8
16
  }
9
17
  export declare function Viewer(props: ViewerProps): import('@serenity-is/domwise').JSXElement;
10
18
  export {};
@@ -1,7 +1,7 @@
1
1
  import { FlipbookStore } from '../state/store';
2
2
 
3
3
  /**
4
- * @license FlipbookEngine v0.6.5
4
+ * @license FlipbookEngine v1.0.0
5
5
  * Copyright (c) 2026 Murat Dogan
6
6
  *
7
7
  * This source code is dual-licensed under the AGPLv3 and a Commercial License.
@@ -1,4 +1,5 @@
1
1
  import { NormalizedFlipbookPage } from '../model/pages';
2
+ import { FlipbookSearchOptions, FlipbookSearchHighlight } from '../model/search';
2
3
 
3
4
  export interface PdfRenderProgress {
4
5
  completed: number;
@@ -25,11 +26,21 @@ export declare class PdfRenderer {
25
26
  private loadingTask;
26
27
  private options;
27
28
  private readonly cache;
29
+ private readonly textCache;
28
30
  constructor(options?: PdfRenderOptions);
29
31
  /** Loads a PDF document and cancels PDF.js loading when the signal aborts. */
30
32
  loadDocument(pdfUrl: string, signal?: AbortSignal): Promise<number>;
31
33
  /** Renders a specific page to a Data URL. The page index is 1-based. */
32
34
  renderPageToDataUrl(pageIndex: number, signal?: AbortSignal): Promise<string>;
35
+ /** Extracts text from a 1-based PDF source page using PDF.js text content. */
36
+ extractPageText(pageNumber: number): Promise<string>;
37
+ /** Searches all PDF source pages and returns normalized rectangles for matched text. */
38
+ searchText(query: string, options?: FlipbookSearchOptions): Promise<Array<{
39
+ sourcePageNumber: number;
40
+ matches: number;
41
+ snippet: string;
42
+ highlights?: FlipbookSearchHighlight[];
43
+ }>>;
33
44
  /** Returns source page dimensions and whether the page should be split. */
34
45
  getPageLayouts(mode?: PdfPageMode): Promise<PdfPageLayout[]>;
35
46
  /** Calculates the best viewport dimensions based on the first logical page. */
@@ -0,0 +1,5 @@
1
+ import { FlipbookStore } from '../state/store';
2
+ import { FlipbookTextLayerProvider } from '../model/text-layer';
3
+
4
+ /** At most three visible/adjacent pages; stale requests cannot update a new session. */
5
+ export declare function loadTextLayers(store: FlipbookStore, provider: FlipbookTextLayerProvider, lifetime: AbortSignal): () => void;
@@ -0,0 +1,2 @@
1
+ /** DOM event listeners require the AbortSignal from their own document realm. */
2
+ export declare function domSignal(element: HTMLElement, session: AbortSignal): AbortSignal;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license FlipbookEngine v1.0.0
3
+ * Copyright (c) 2026 Murat Dogan
4
+ * SPDX-License-Identifier: AGPL-3.0-or-later
5
+ */
6
+ export { FlipbookEngine, type FlipbookEngineOptions, type FlipbookLocaleMessages, type PageImages, type FlipbookEngineEventMap, type FlipbookEngineEventName } from './engine';
7
+ export type { FlipbookPageAsset, FlipbookPageKind, FlipbookCropMode, FlipbookSplitDirection, NormalizedFlipbookPage } from './model/pages';
8
+ export { normalizeFlipbookPages, isFlipbookPageAsset } from './model/pages';
9
+ export type { FlipbookLocale, FlipbookMessages, PartialFlipbookMessages } from './i18n/service';
10
+ export type { FlipbookThemeMode, FlipbookBackgroundStyle, FlipbookBackgrounds } from './theme/theme';
11
+ export type { PdfPageMode, PdfPageLayout } from './core/PdfRenderer';
12
+ export { isA3Landscape } from './core/PdfRenderer';
13
+ export type { FlipbookHotspot, FlipbookHotspotKind, FlipbookHotspotMedia, FlipbookHotspotMediaType, FlipbookHotspotGalleryItem } from './model/hotspots';
14
+ export type { FlipbookTextRun, FlipbookTextPage, FlipbookTextLayerProvider } from './model/text-layer';
package/dist/core.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './core-entry'
@@ -0,0 +1,80 @@
1
+ import { FlipbookEngine, FlipbookEngineEventMap, FlipbookEngineEventName, FlipbookEngineOptions } from './engine';
2
+ import { FlipbookSearchOptions, FlipbookSearchResult } from './model/search';
3
+ import { FlipbookTocEntry } from './model/toc';
4
+
5
+ export type FlipbookEmbedCommandName = 'goToPage' | 'nextPage' | 'prevPage' | 'setZoom' | 'setSingleMode' | 'updateOptions' | 'toggleFullscreen' | 'search' | 'clearSearch' | 'getSearchResults' | 'getToc' | 'setToc' | 'getState';
6
+ export interface FlipbookEmbedOptions {
7
+ /**
8
+ * Origins allowed to send commands. Defaults to the current origin.
9
+ * Use an explicit origin for cross-origin iframe integrations.
10
+ */
11
+ allowedOrigins?: string[];
12
+ /** Origin used for messages sent to the embedding parent. */
13
+ targetOrigin?: string;
14
+ /** Response timeout for the parent-side controller. */
15
+ responseTimeout?: number;
16
+ }
17
+ export interface FlipbookEmbedCommand {
18
+ type: 'flipbook:command';
19
+ command: FlipbookEmbedCommandName;
20
+ requestId?: string;
21
+ payload?: unknown;
22
+ }
23
+ export interface FlipbookEmbedEvent<T extends FlipbookEngineEventName = FlipbookEngineEventName> {
24
+ type: 'flipbook:event';
25
+ event: T;
26
+ payload: FlipbookEngineEventMap[T];
27
+ }
28
+ export interface FlipbookEmbedResponse {
29
+ type: 'flipbook:response';
30
+ requestId?: string;
31
+ ok: boolean;
32
+ result?: unknown;
33
+ error?: string;
34
+ }
35
+ export interface FlipbookEmbedState {
36
+ currentPage: number;
37
+ totalPages: number;
38
+ zoom: number;
39
+ }
40
+ /**
41
+ * Runs inside an iframe and exposes a restricted postMessage command bridge.
42
+ * Commands are accepted only from window.parent and configured origins.
43
+ */
44
+ export declare class FlipbookEmbedBridge {
45
+ private readonly engine;
46
+ private readonly options;
47
+ private readonly listener;
48
+ private readonly unsubs;
49
+ private connected;
50
+ private parentOrigin;
51
+ constructor(engine: FlipbookEngine, options?: FlipbookEmbedOptions);
52
+ connect(): this;
53
+ disconnect(): void;
54
+ private readonly engineEventNames;
55
+ private isAllowedOrigin;
56
+ private post;
57
+ private postEvent;
58
+ private respond;
59
+ private handleMessage;
60
+ private getState;
61
+ }
62
+ export interface FlipbookEmbedController {
63
+ send(command: FlipbookEmbedCommandName, payload?: unknown): Promise<unknown>;
64
+ goToPage(pageIndex: number): Promise<FlipbookEmbedState>;
65
+ nextPage(): Promise<FlipbookEmbedState>;
66
+ prevPage(): Promise<FlipbookEmbedState>;
67
+ setZoom(zoom: number): Promise<FlipbookEmbedState>;
68
+ setSingleMode(isSingle: boolean): Promise<FlipbookEmbedState>;
69
+ updateOptions(options: Partial<FlipbookEngineOptions>): Promise<FlipbookEmbedState>;
70
+ toggleFullscreen(): Promise<FlipbookEmbedState>;
71
+ search(query: string, options?: FlipbookSearchOptions): Promise<FlipbookSearchResult[]>;
72
+ clearSearch(): Promise<FlipbookEmbedState>;
73
+ getSearchResults(): Promise<FlipbookSearchResult[]>;
74
+ getToc(): Promise<FlipbookTocEntry[]>;
75
+ setToc(entries: FlipbookTocEntry[], show?: boolean): Promise<FlipbookEmbedState>;
76
+ getState(): Promise<FlipbookEmbedState>;
77
+ on<T extends FlipbookEngineEventName>(event: T, handler: (payload: FlipbookEngineEventMap[T]) => void): () => void;
78
+ destroy(): void;
79
+ }
80
+ export declare function createFlipbookEmbedController(iframe: HTMLIFrameElement, options?: FlipbookEmbedOptions): FlipbookEmbedController;