flipbookengine 0.5.4 → 0.6.0
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.
- package/CHANGELOG.md +62 -57
- package/README.md +284 -281
- package/dist/components/TableOfContents.d.ts +8 -0
- package/dist/components/Toolbar.d.ts +1 -0
- package/dist/core/LayoutManager.d.ts +1 -1
- package/dist/{engine-7jWE07Zq.js → engine-MdZzt6R9.js} +733 -652
- package/dist/engine-MdZzt6R9.js.map +1 -0
- package/dist/engine.d.ts +6 -0
- package/dist/flipbook-engine.css +1 -1
- package/dist/flipbook-engine.iife.js +34 -34
- package/dist/flipbook-engine.iife.js.map +1 -1
- package/dist/flipbook-engine.js +5 -4
- package/dist/flipbook-engine.react.js +1 -1
- package/dist/flipbook-engine.vue.js +1 -1
- package/dist/i18n/locales/en.d.ts +1 -0
- package/dist/i18n/locales/tr.d.ts +1 -0
- package/dist/i18n/service.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/model/toc.d.ts +13 -0
- package/dist/state/store.d.ts +5 -2
- package/package.json +1 -1
- package/dist/engine-7jWE07Zq.js.map +0 -1
package/dist/flipbook-engine.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { F as
|
|
1
|
+
import { F as i, i as s, n as e, a as l } from "./engine-MdZzt6R9.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
e as normalizeFlipbookPages
|
|
3
|
+
i as FlipbookEngine,
|
|
4
|
+
s as isFlipbookPageAsset,
|
|
5
|
+
e as normalizeFlipbookPages,
|
|
6
|
+
l as normalizeFlipbookToc
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=flipbook-engine.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as P, useRef as g, useImperativeHandle as x, useEffect as c } from "react";
|
|
3
|
-
import { F as d } from "./engine-
|
|
3
|
+
import { F as d } from "./engine-MdZzt6R9.js";
|
|
4
4
|
const v = P(({
|
|
5
5
|
className: a,
|
|
6
6
|
style: f,
|
package/dist/i18n/service.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface FlipbookMessages {
|
|
|
18
18
|
downloadCatalog: string;
|
|
19
19
|
play: string;
|
|
20
20
|
pause: string;
|
|
21
|
+
tableOfContents: string;
|
|
21
22
|
}
|
|
22
23
|
export declare const builtInMessages: {
|
|
23
24
|
readonly en: {
|
|
@@ -34,6 +35,7 @@ export declare const builtInMessages: {
|
|
|
34
35
|
readonly downloadCatalog: "Download Catalog";
|
|
35
36
|
readonly play: "Play";
|
|
36
37
|
readonly pause: "Pause";
|
|
38
|
+
readonly tableOfContents: "Table of Contents";
|
|
37
39
|
};
|
|
38
40
|
readonly tr: {
|
|
39
41
|
readonly emptyStateTitle: "Veri bulunamadi.";
|
|
@@ -49,6 +51,7 @@ export declare const builtInMessages: {
|
|
|
49
51
|
readonly downloadCatalog: "Kataloğu İndir";
|
|
50
52
|
readonly play: "Otomatik Oynat";
|
|
51
53
|
readonly pause: "Duraklat";
|
|
54
|
+
readonly tableOfContents: "İçindekiler";
|
|
52
55
|
};
|
|
53
56
|
};
|
|
54
57
|
export type FlipbookLocale = keyof typeof builtInMessages;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export { FlipbookEngine, type FlipbookEngineOptions, type FlipbookLocaleMessages, type PageImages, type FlipbookEngineEventMap, type FlipbookEngineEventName } from './engine';
|
|
8
8
|
export type { FlipbookPageAsset, FlipbookPageKind, FlipbookCropMode, FlipbookSplitDirection, NormalizedFlipbookPage } from './model/pages';
|
|
9
|
+
export type { FlipbookTocEntry } from './model/toc';
|
|
10
|
+
export { normalizeFlipbookToc } from './model/toc';
|
|
9
11
|
export { normalizeFlipbookPages, isFlipbookPageAsset } from './model/pages';
|
|
10
12
|
export type { FlipbookLocale, FlipbookMessages, PartialFlipbookMessages } from './i18n/service';
|
|
11
13
|
export type { FlipbookThemeMode } from './theme/theme';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlipbookEngine
|
|
3
|
+
* Copyright (c) 2026 Murat Dogan
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
5
|
+
* https://flipbookengine.com
|
|
6
|
+
*/
|
|
7
|
+
export interface FlipbookTocEntry {
|
|
8
|
+
id?: string;
|
|
9
|
+
title: string;
|
|
10
|
+
pageIndex: number;
|
|
11
|
+
children?: FlipbookTocEntry[];
|
|
12
|
+
}
|
|
13
|
+
export declare function normalizeFlipbookToc(entries: FlipbookTocEntry[], totalPages: number): FlipbookTocEntry[];
|
package/dist/state/store.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Signal, ReadonlySignal } from '@preact/signals-core';
|
|
2
2
|
import { FlipbookThemeMode } from '../theme/theme';
|
|
3
3
|
import { NormalizedFlipbookPage } from '../model/pages';
|
|
4
|
+
import { FlipbookTocEntry } from '../model/toc';
|
|
4
5
|
import { FlipbookEngineOptions } from '../engine';
|
|
5
6
|
import { PartialFlipbookMessages } from '../i18n/service';
|
|
6
7
|
|
|
@@ -18,6 +19,7 @@ export interface FlipbookStore {
|
|
|
18
19
|
totalPages: Signal<number>;
|
|
19
20
|
isSingleMode: Signal<boolean>;
|
|
20
21
|
showThumbs: Signal<boolean>;
|
|
22
|
+
showToc: Signal<boolean>;
|
|
21
23
|
showArrows: Signal<boolean>;
|
|
22
24
|
orientation: Signal<Orientation>;
|
|
23
25
|
flipState: Signal<FlipState>;
|
|
@@ -34,6 +36,7 @@ export interface FlipbookStore {
|
|
|
34
36
|
messages: Signal<Partial<Record<string, PartialFlipbookMessages>>>;
|
|
35
37
|
zoomState: Signal<ZoomState>;
|
|
36
38
|
pages: Signal<NormalizedFlipbookPage[]>;
|
|
39
|
+
toc: Signal<FlipbookTocEntry[]>;
|
|
37
40
|
isDoublePageLayout: ReadonlySignal<boolean>;
|
|
38
41
|
isFrontCover: ReadonlySignal<boolean>;
|
|
39
42
|
isBackCover: ReadonlySignal<boolean>;
|
|
@@ -43,10 +46,10 @@ export interface FlipbookStore {
|
|
|
43
46
|
/** Creates an isolated reactive state container for one FlipbookEngine instance. */
|
|
44
47
|
export declare function createFlipbookStore(): FlipbookStore;
|
|
45
48
|
export declare const currentPage: Signal<number>, totalPages: Signal<number>, isSingleMode: Signal<boolean>;
|
|
46
|
-
export declare const showThumbs: Signal<boolean>, showArrows: Signal<boolean>, orientation: Signal<Orientation>;
|
|
49
|
+
export declare const showThumbs: Signal<boolean>, showToc: Signal<boolean>, showArrows: Signal<boolean>, orientation: Signal<Orientation>;
|
|
47
50
|
export declare const flipState: Signal<FlipState>, themeMode: Signal<FlipbookThemeMode>, allowDownload: Signal<boolean>;
|
|
48
51
|
export declare const hasDownloadUrl: Signal<boolean>, primaryColor: Signal<string>, whiteLabel: Signal<boolean>;
|
|
49
52
|
export declare const isZoomed: Signal<boolean>, isAutoPlaying: Signal<boolean>, autoPlayInterval: Signal<number>;
|
|
50
|
-
export declare const soundEnabled: Signal<boolean>, locale: Signal<string>, messages: Signal<Partial<Record<string, Partial<import('..').FlipbookMessages>>>>, zoomState: Signal<ZoomState>, pages: Signal<NormalizedFlipbookPage[]>;
|
|
53
|
+
export declare const soundEnabled: Signal<boolean>, locale: Signal<string>, messages: Signal<Partial<Record<string, Partial<import('..').FlipbookMessages>>>>, zoomState: Signal<ZoomState>, pages: Signal<NormalizedFlipbookPage[]>, toc: Signal<FlipbookTocEntry[]>;
|
|
51
54
|
export declare const isDoublePageLayout: ReadonlySignal<boolean>, isFrontCover: ReadonlySignal<boolean>, isBackCover: ReadonlySignal<boolean>;
|
|
52
55
|
export declare function initStore(options: FlipbookEngineOptions, total: number, mappedPages: NormalizedFlipbookPage[], hasPdfUrl: boolean): void;
|