html-flip-book-react 0.0.0-alpha.34 → 0.0.0-alpha.36

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.
@@ -1 +1 @@
1
- {"version":3,"file":"FlipBook.d.ts","sourceRoot":"","sources":["../src/FlipBook.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,MAAM,WAAW,cAAc;IAE9B,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9B,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9B,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjD,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAE5B,mBAAmB,EAAE,MAAM,MAAM,CAAC;IAElC,aAAa,EAAE,MAAM,MAAM,CAAC;IAE5B,KAAK,EAAE,MAAM,MAAM,GAAG,MAAM,CAAC;IAE7B,WAAW,EAAE,MAAM,OAAO,CAAC;IAE3B,UAAU,EAAE,MAAM,OAAO,CAAC;IAE1B,iBAAiB,EAAE,MAAM,cAAc,GAAG,SAAS,CAAC;IAEpD,eAAe,EAAE,MAAM,MAAM,CAAC;CAC9B;AAKD,MAAM,WAAW,WAAW;IAM3B,UAAU,CAAC,EAAE,OAAO,CAAC;IAKrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAMnB,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAMjC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAIhC,2BAA2B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AOrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAK7B,aAAa,CAAC,EAAE,OAAO,CAAC;IAKxB,cAAc,CAAC,EAAE,OAAO,CAAC;CACzB;AAsBD,QAAA,MAAM,aAAa,sFAsRlB,CAAC;AAIF,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,CAAC;AACrC,YAAY,EACX,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,aAAa,GACb,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -1 +1 @@
1
- .toc-page{background-color:#fffef8;font-family:inherit;line-height:1.6;height:100%;box-sizing:border-box;overflow:hidden;display:flex;flex-direction:column;padding:8% 6%}.toc-page__scroll{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto}.toc-heading{text-align:center;margin-bottom:24px;color:#2c1810;font-size:1.4rem;border-bottom:none}.toc-list{list-style:none;padding:0;margin:0}.toc-list li{margin-bottom:8px}.toc-link{display:flex;flex-direction:row;align-items:baseline;width:100%;padding:8px 4px;background:none;border:none;cursor:pointer;font-family:inherit;font-size:.75em;text-align:inherit;color:inherit;transition:background-color .15s ease}.toc-link:hover{background-color:#0000000d}.toc-link:focus{outline:2px solid #1a3a5c;outline-offset:2px}.toc-title{flex:0 1 auto;min-width:0;max-width:85%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toc-dots{flex-grow:1;border-bottom:1px dotted #999;margin:0 8px;min-width:20px}.toc-page-num{flex-shrink:0;font-weight:600;color:#1a3a5c}.flipbook-toolbar-download-wrap{position:relative;display:inline-flex}.flipbook-toolbar-download-trigger{display:flex;align-items:center;justify-content:center}.flipbook-toolbar-download-menu{position:absolute;top:100%;inset-inline-start:0;inset-inline-end:auto;margin-top:6px;min-width:240px;max-height:min(70vh,480px);overflow-y:auto;padding:8px 0;background-color:#18181cfa;border-radius:12px;box-shadow:0 8px 30px #00000059,0 1px 3px #00000026;z-index:100;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.flipbook-toolbar-download-menu--open-up{top:auto;bottom:100%;margin-top:0;margin-bottom:6px}.flipbook-toolbar-download-mode{display:flex;flex-direction:column;gap:2px;padding:4px 8px;border:none;margin:0}.flipbook-toolbar-download-radio-label{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:8px;color:#ffffffeb;font-size:14px;cursor:pointer;transition:background-color .15s ease;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.flipbook-toolbar-download-radio-label:hover{background-color:#ffffff14}.flipbook-toolbar-download-radio-label:active{background-color:#ffffff1f}.flipbook-toolbar-download-radio{width:18px;height:18px;accent-color:#6ea8fe;flex-shrink:0}.flipbook-toolbar-download-range{display:flex;flex-wrap:wrap;flex-direction:row;align-items:center;gap:10px;padding:12px 16px;border-top:1px solid rgba(255,255,255,.1);margin-top:4px}[dir=rtl] .flipbook-toolbar-download-range{flex-direction:row-reverse}.flipbook-toolbar-download-range-label{display:inline-flex;align-items:center;flex-direction:inherit;gap:8px;color:#ffffffbf;font-size:13px;font-weight:500;letter-spacing:.02em;text-transform:uppercase}[dir=rtl] .flipbook-toolbar-download-range-label{flex-direction:row-reverse}.flipbook-toolbar-download-range-select{padding:8px 10px;border-radius:8px;border:1px solid rgba(255,255,255,.18);background:#ffffff0f;color:#fff;font-family:inherit;font-size:14px;min-width:5ch;text-align:start;direction:inherit;transition:border-color .15s ease;outline:none}.flipbook-toolbar-download-range-select:focus{border-color:#6ea8fe99}.flipbook-toolbar-download-menuitem{display:block;width:calc(100% - 16px);margin:4px 8px 0;padding:12px 16px;border:none;background:#6ea8fe2e;color:#6ea8fe;font-family:inherit;font-size:14px;font-weight:600;text-align:center;cursor:pointer;border-radius:8px;transition:background-color .15s ease,transform .1s ease;-webkit-tap-highlight-color:transparent}.flipbook-toolbar-download-menuitem:hover:not(:disabled){background-color:#6ea8fe47}.flipbook-toolbar-download-menuitem:active:not(:disabled){transform:scale(.97);background-color:#6ea8fe59}.flipbook-toolbar-download-menuitem:disabled{opacity:.5;cursor:not-allowed}.flipbook-toolbar-download-primary{margin-top:8px}.flipbook-toolbar-download-range-download{padding:10px 16px;border:none;border-radius:8px;background:#ffffff26;color:#fff;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .15s ease}.flipbook-toolbar-download-range-download:hover:not(:disabled){background:#ffffff40}.flipbook-toolbar-download-range-download:disabled{opacity:.5;cursor:not-allowed}.flipbook-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 16px;min-height:48px;box-sizing:border-box;background-color:#000000b3;border-radius:8px;-webkit-user-select:none;user-select:none;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.flipbook-toolbar-start{display:flex;align-items:center;gap:8px;flex:1;justify-content:flex-start}.flipbook-toolbar-nav-cluster{display:flex;align-items:center;gap:8px;flex-shrink:0}.flipbook-toolbar--rtl .flipbook-toolbar-button>*{transform:scaleX(-1)}.flipbook-toolbar-end{display:flex;align-items:center;gap:8px;flex:1;justify-content:flex-end}.flipbook-toolbar-button{display:flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:none;border-radius:6px;background-color:transparent;color:#fff;font-size:20px;cursor:pointer;transition:background-color .2s ease,opacity .2s ease}.flipbook-toolbar-button:hover:not(:disabled){background-color:#ffffff26}.flipbook-toolbar-button:active:not(:disabled){background-color:#ffffff40}.flipbook-toolbar-button:focus-visible{outline:2px solid #fff;outline-offset:2px}.flipbook-toolbar-button:disabled{opacity:.4;cursor:not-allowed}.flipbook-toolbar-prev,.flipbook-toolbar-next{font-size:28px;font-weight:700}.flipbook-toolbar-first,.flipbook-toolbar-last{font-size:16px}.flipbook-toolbar-fullscreen{font-size:18px}.flipbook-toolbar-fullscreen--active{background-color:#ffffff1a}.flipbook-toc-icon--flip-h{transform:scaleX(-1)}span.flipbook-toolbar-indicator{display:inline-flex;align-items:center;justify-content:center;color:inherit;font-size:14px;font-weight:500;text-align:center;padding:0 4px;white-space:nowrap}input.flipbook-toolbar-indicator{display:inline-block;font-family:inherit;font-size:14px;font-weight:500;text-align:center;box-sizing:border-box;border:1px solid transparent;border-radius:4px;padding:4px 8px;min-width:3ch;color:inherit;white-space:nowrap;transition:background-color .2s ease,color .2s ease}input.flipbook-toolbar-indicator--editing{background:#fff;color:#1a1a1a}input.flipbook-toolbar-indicator:focus{outline:2px solid currentColor;outline-offset:2px}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
1
+ .toc-page{background-color:#fffef8;font-family:inherit;line-height:1.6;height:100%;box-sizing:border-box;overflow:hidden;display:flex;flex-direction:column;padding:8% 6%}.toc-page__scroll{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto}.toc-heading{text-align:center;margin-bottom:24px;color:#2c1810;font-size:1.4rem;border-bottom:none}.toc-list{list-style:none;padding:0;margin:0}.toc-list li{margin-bottom:8px}.toc-link{display:flex;flex-direction:row;align-items:baseline;width:100%;padding:8px 4px;background:none;border:none;cursor:pointer;font-family:inherit;font-size:.75em;text-align:inherit;color:inherit;transition:background-color .15s ease}.toc-link:hover{background-color:#0000000d}.toc-link:focus{outline:2px solid #1a3a5c;outline-offset:2px}.toc-title{flex:0 1 auto;min-width:0;max-width:85%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toc-dots{flex-grow:1;border-bottom:1px dotted #999;margin:0 8px;min-width:20px}.toc-page-num{flex-shrink:0;font-weight:600;color:#1a3a5c}.flipbook-toolbar-download-wrap{position:relative;display:inline-flex}.flipbook-toolbar-download-trigger{display:flex;align-items:center;justify-content:center}.flipbook-toolbar-download-menu{position:absolute;top:100%;inset-inline-end:0;inset-inline-start:auto;margin-top:6px;min-width:min(320px,90vw);width:max-content;max-width:min(400px,95vw);max-height:min(70vh,480px);overflow-y:auto;padding:8px 0;background-color:#18181cfa;border-radius:12px;box-shadow:0 8px 30px #00000059,0 1px 3px #00000026;z-index:10000;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.flipbook-toolbar-download-menu--open-up{top:auto;bottom:100%;margin-top:0;margin-bottom:6px}.flipbook-toolbar-download-mode{display:flex;flex-direction:column;gap:2px;padding:4px 8px;border:none;margin:0;min-width:0}.flipbook-toolbar-download-radio-label{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:8px;color:#ffffffeb;font-size:14px;cursor:pointer;transition:background-color .15s ease;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;min-width:0}.flipbook-toolbar-download-radio-label span{flex:0 1 auto;min-width:min-content;overflow:visible;white-space:nowrap}.flipbook-toolbar-download-radio-label:hover{background-color:#ffffff14}.flipbook-toolbar-download-radio-label:active{background-color:#ffffff1f}.flipbook-toolbar-download-radio{width:18px;height:18px;accent-color:#6ea8fe;flex-shrink:0}.flipbook-toolbar-download-range{display:flex;flex-wrap:wrap;flex-direction:row;align-items:center;gap:10px;padding:12px 16px;border-top:1px solid rgba(255,255,255,.1);margin-top:4px}.flipbook-toolbar-download-range-label{display:inline-flex;align-items:center;gap:8px;color:#ffffffbf;font-size:13px;font-weight:500;letter-spacing:.02em;text-transform:uppercase}.flipbook-toolbar-download-range-select{padding:8px 10px;border-radius:8px;border:1px solid rgba(255,255,255,.18);background:#ffffff0f;color:#fff;font-family:inherit;font-size:14px;min-width:5ch;text-align:start;direction:inherit;transition:border-color .15s ease;outline:none}.flipbook-toolbar-download-range-select:focus{border-color:#6ea8fe99}.flipbook-toolbar-download-range-select option{color:#000;background:#fff}.flipbook-toolbar-download-menuitem{display:block;width:calc(100% - 16px);margin:4px 8px 0;padding:12px 16px;border:none;background:#6ea8fe2e;color:#6ea8fe;font-family:inherit;font-size:14px;font-weight:600;text-align:center;cursor:pointer;border-radius:8px;transition:background-color .15s ease,transform .1s ease;-webkit-tap-highlight-color:transparent}.flipbook-toolbar-download-menuitem:hover:not(:disabled){background-color:#6ea8fe47}.flipbook-toolbar-download-menuitem:active:not(:disabled){transform:scale(.97);background-color:#6ea8fe59}.flipbook-toolbar-download-menuitem:disabled{opacity:.5;cursor:not-allowed}.flipbook-toolbar-download-primary{margin-top:8px}.flipbook-toolbar-download-range-download{padding:10px 16px;border:none;border-radius:8px;background:#ffffff26;color:#fff;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .15s ease}.flipbook-toolbar-download-range-download:hover:not(:disabled){background:#ffffff40}.flipbook-toolbar-download-range-download:disabled{opacity:.5;cursor:not-allowed}.flipbook-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 16px;min-height:48px;box-sizing:border-box;background-color:#000000b3;border-radius:8px;-webkit-user-select:none;user-select:none;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.flipbook-toolbar-start{display:flex;align-items:center;gap:8px;flex:1;justify-content:flex-start}.flipbook-toolbar-nav-cluster{display:flex;align-items:center;gap:8px;flex-shrink:0}.flipbook-toolbar--rtl .flipbook-toolbar-button>*{transform:scaleX(-1)}.flipbook-toolbar-end{display:flex;align-items:center;gap:8px;flex:1;justify-content:flex-end}.flipbook-toolbar-button{display:flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:none;border-radius:6px;background-color:transparent;color:#fff;font-size:20px;cursor:pointer;transition:background-color .2s ease,opacity .2s ease}.flipbook-toolbar-button:hover:not(:disabled){background-color:#ffffff26}.flipbook-toolbar-button:active:not(:disabled){background-color:#ffffff40}.flipbook-toolbar-button:focus-visible{outline:2px solid #fff;outline-offset:2px}.flipbook-toolbar-button:disabled{opacity:.4;cursor:not-allowed}.flipbook-toolbar-prev,.flipbook-toolbar-next{font-size:28px;font-weight:700}.flipbook-toolbar-first,.flipbook-toolbar-last{font-size:16px}.flipbook-toolbar-fullscreen{font-size:18px}.flipbook-toolbar-fullscreen--active{background-color:#ffffff1a}.flipbook-toc-icon--flip-h{transform:scaleX(-1)}span.flipbook-toolbar-indicator{display:inline-flex;align-items:center;justify-content:center;color:inherit;font-size:14px;font-weight:500;text-align:center;padding:0 4px;white-space:nowrap}input.flipbook-toolbar-indicator{display:inline-block;font-family:inherit;font-size:14px;font-weight:500;text-align:center;box-sizing:border-box;border:1px solid transparent;border-radius:4px;padding:4px 8px;min-width:3ch;color:inherit;white-space:nowrap;transition:background-color .2s ease,color .2s ease}input.flipbook-toolbar-indicator--editing{background:#fff;color:#1a1a1a}input.flipbook-toolbar-indicator:focus{outline:2px solid currentColor;outline-offset:2px}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
package/dist/flip-book.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import { jsx as a, jsxs as j } from "react/jsx-runtime";
2
2
  import { FlipBook as Y } from "html-flip-book-vanilla";
3
3
  import { forwardRef as Z, useState as ee, useRef as N, useEffect as L, useImperativeHandle as te, Children as ne } from "react";
4
- const re = (i) => i.title.length > 0, ie = ({
5
- onNavigate: i,
4
+ const re = (l) => l.title.length > 0, le = ({
5
+ onNavigate: l,
6
6
  totalPages: c,
7
7
  pageSemantics: I,
8
8
  heading: v = "Table of Contents",
9
- className: F,
9
+ className: T,
10
10
  direction: p = "ltr",
11
- filter: T = re,
12
- renderEntry: l
11
+ filter: F = re,
12
+ renderEntry: i
13
13
  }) => {
14
- const f = [];
14
+ const h = [];
15
15
  for (let n = 0; n < c; n++) {
16
16
  const u = I?.indexToTitle(n) ?? "", r = I?.indexToSemanticName(n) ?? "", d = { pageIndex: n, title: u, semanticName: r };
17
- T(d, n) && f.push(d);
17
+ F(d, n) && h.push(d);
18
18
  }
19
19
  const S = (n, u) => {
20
20
  const r = n.title || n.semanticName || `Page ${n.pageIndex + 1}`, d = n.semanticName || String(n.pageIndex + 1);
@@ -27,28 +27,28 @@ const re = (i) => i.title.length > 0, ie = ({
27
27
  return /* @__PURE__ */ a(
28
28
  "div",
29
29
  {
30
- className: `toc-page ${F ?? ""}`.trim(),
30
+ className: `toc-page ${T ?? ""}`.trim(),
31
31
  style: { direction: p, textAlign: p === "rtl" ? "right" : "left" },
32
32
  children: /* @__PURE__ */ j("div", { className: "toc-page__scroll", children: [
33
33
  /* @__PURE__ */ a("h2", { className: "toc-heading", children: v }),
34
- /* @__PURE__ */ a("ul", { className: "toc-list", children: f.map((n) => {
35
- const u = () => i(n.pageIndex);
36
- return l ? l(n, u) : S(n, u);
34
+ /* @__PURE__ */ a("ul", { className: "toc-list", children: h.map((n) => {
35
+ const u = () => l(n.pageIndex);
36
+ return i ? i(n, u) : S(n, u);
37
37
  }) })
38
38
  ] })
39
39
  }
40
40
  );
41
41
  }, oe = Z(
42
42
  ({
43
- pages: i,
43
+ pages: l,
44
44
  className: c,
45
45
  debug: I = !1,
46
46
  direction: v = "ltr",
47
- pageSemantics: F = void 0,
47
+ pageSemantics: T = void 0,
48
48
  initialTurnedLeaves: p = [],
49
- fastDeltaThreshold: T,
50
- leavesBuffer: l,
51
- pageShadow: f = !0,
49
+ fastDeltaThreshold: F,
50
+ leavesBuffer: i,
51
+ pageShadow: h = !0,
52
52
  snapshotDuringFlip: S = !0,
53
53
  enableHistory: n,
54
54
  enableDownload: u,
@@ -59,40 +59,40 @@ const re = (i) => i.title.length > 0, ie = ({
59
59
  handlers: B,
60
60
  historyMapper: q,
61
61
  tocPageIndex: A,
62
- downloadConfig: V
63
- }, U) => {
64
- const [H, M] = ee(() => {
62
+ downloadConfig: U
63
+ }, H) => {
64
+ const [K, M] = ee(() => {
65
65
  if (p && p.length > 0) {
66
- const t = (Math.max(...p) + 1) * 2;
67
- return t >= i.length ? (Math.ceil(i.length / 2) - 1) * 2 : t;
66
+ const t = Math.max(...p) * 2 + 1;
67
+ return t >= l.length ? (Math.ceil(l.length / 2) - 1) * 2 : t;
68
68
  }
69
69
  return 0;
70
70
  }), b = N(M);
71
71
  b.current = M;
72
72
  const R = N(d);
73
73
  R.current = d;
74
- const K = 80, h = N(null), _ = N((e) => {
74
+ const V = 80, f = N(null), _ = N((e) => {
75
75
  b.current?.(e);
76
76
  });
77
77
  _.current = (e) => {
78
- if (h.current != null && clearTimeout(h.current), l == null) {
78
+ if (f.current != null && clearTimeout(f.current), i == null) {
79
79
  b.current?.(e);
80
80
  return;
81
81
  }
82
- h.current = setTimeout(() => {
83
- h.current = null, b.current?.(e);
84
- }, K);
82
+ f.current = setTimeout(() => {
83
+ f.current = null, b.current?.(e);
84
+ }, V);
85
85
  }, L(() => () => {
86
- h.current != null && clearTimeout(h.current);
86
+ f.current != null && clearTimeout(f.current);
87
87
  }, []);
88
88
  const o = N(
89
89
  new Y({
90
- pageSemantics: F,
91
- pagesCount: i.length,
90
+ pageSemantics: T,
91
+ pagesCount: l.length,
92
92
  direction: v,
93
93
  initialTurnedLeaves: p,
94
- fastDeltaThreshold: T,
95
- leavesBuffer: l,
94
+ fastDeltaThreshold: F,
95
+ leavesBuffer: i,
96
96
  leafAspectRatio: D,
97
97
  coverAspectRatio: O,
98
98
  coverPageIndices: r?.coverIndices,
@@ -101,15 +101,15 @@ const re = (i) => i.title.length > 0, ie = ({
101
101
  onPageFlipped: B?.onPageFlipped,
102
102
  historyMapper: q,
103
103
  tocPageIndex: A ?? 4,
104
- downloadConfig: V,
105
- pageShadow: f,
104
+ downloadConfig: U,
105
+ pageShadow: h,
106
106
  snapshotDuringFlip: S,
107
107
  enableHistory: n,
108
108
  enableDownload: u
109
109
  })
110
110
  );
111
111
  te(
112
- U,
112
+ H,
113
113
  () => ({
114
114
  flipNext: () => o.current.flipNext(),
115
115
  flipPrev: () => o.current.flipPrev(),
@@ -135,9 +135,9 @@ const re = (i) => i.title.length > 0, ie = ({
135
135
  };
136
136
  }, [c, I]), L(() => {
137
137
  const e = c.split(/\s+/)[0], t = document.querySelector(`.${e}`);
138
- t && (f ? t.classList.remove("flipbook--no-page-shadow") : t.classList.add("flipbook--no-page-shadow"));
139
- }, [c, f]);
140
- const k = ne.toArray(i), m = k.length, x = new Set(
138
+ t && (h ? t.classList.remove("flipbook--no-page-shadow") : t.classList.add("flipbook--no-page-shadow"));
139
+ }, [c, h]);
140
+ const k = ne.toArray(l), m = k.length, x = new Set(
141
141
  r?.coverIndices === "auto" ? [0, m - 1] : r?.coverIndices ?? [0]
142
142
  ), W = (e) => x.has(e), w = /* @__PURE__ */ new Map();
143
143
  if (r?.interiorCoverClassName || r?.frontInteriorCoverClassName || r?.backInteriorCoverClassName)
@@ -158,8 +158,8 @@ const re = (i) => i.title.length > 0, ie = ({
158
158
  P && t.push(P);
159
159
  }
160
160
  return t.join(" ");
161
- }, J = l != null && m > 0 ? (() => {
162
- const e = Math.floor(H / 2), t = Math.ceil(m / 2), s = 2, P = Math.max(0, e - l - s), E = Math.min(t - 1, e + l + s), $ = P * 2, X = Math.min(m - 1, E * 2 + 1), y = new Set(
161
+ }, J = i != null && m > 0 ? (() => {
162
+ const e = Math.floor(K / 2), t = Math.ceil(m / 2), s = 2, P = Math.max(0, e - i - s), E = Math.min(t - 1, e + i + s), $ = P * 2, X = Math.min(m - 1, E * 2 + 1), y = new Set(
163
163
  Array.from({ length: X - $ + 1 }, (g, C) => $ + C)
164
164
  );
165
165
  for (const g of x) {
@@ -192,6 +192,6 @@ const re = (i) => i.title.length > 0, ie = ({
192
192
  oe.displayName = "FlipBook";
193
193
  export {
194
194
  oe as FlipBook,
195
- ie as TocPage
195
+ le as TocPage
196
196
  };
197
197
  //# sourceMappingURL=flip-book.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flip-book.js","sources":["../src/TocPage.tsx","../src/FlipBook.tsx"],"sourcesContent":["import type { PageSemantics } from \"html-flip-book-vanilla\";\nimport type React from \"react\";\nimport \"./TocPage.css\";\n\n/**\n * Entry in the table of contents.\n */\nexport interface TocEntry {\n\t/** Page index to navigate to */\n\tpageIndex: number;\n\t/** Display title (from pageSemantics.indexToTitle or custom) */\n\ttitle: string;\n\t/** Semantic page name/number (from pageSemantics.indexToSemanticName) */\n\tsemanticName: string;\n}\n\n/**\n * Props for the TocPage component.\n */\nexport interface TocPageProps {\n\t/** Callback to navigate to a specific page */\n\tonNavigate: (pageIndex: number) => void;\n\t/** Total number of pages in the book */\n\ttotalPages: number;\n\t/** Page semantics for generating titles and page numbers */\n\tpageSemantics?: PageSemantics;\n\t/** Custom heading text. Default: \"Table of Contents\" */\n\theading?: string;\n\t/** Custom CSS class for the container */\n\tclassName?: string;\n\t/** Reading direction for RTL support */\n\tdirection?: \"ltr\" | \"rtl\";\n\t/**\n\t * Filter function to determine which pages appear in TOC.\n\t * By default, only pages with a title are included.\n\t */\n\tfilter?: (entry: TocEntry, pageIndex: number) => boolean;\n\t/**\n\t * Custom render function for TOC entries.\n\t * If not provided, uses default rendering.\n\t */\n\trenderEntry?: (entry: TocEntry, onClick: () => void) => React.ReactNode;\n}\n\n/**\n * Default filter: include pages that have a non-empty title.\n */\nconst defaultFilter = (entry: TocEntry): boolean => entry.title.length > 0;\n\n/**\n * A table of contents page component for FlipBook.\n *\n * Automatically generates TOC entries from pageSemantics, showing pages\n * that have titles. Entries display title with fallback to semantic name,\n * then page index.\n *\n * @example\n * ```tsx\n * <TocPage\n * onNavigate={(pageIndex) => flipBookRef.current?.flipToPage(pageIndex)}\n * totalPages={20}\n * pageSemantics={mySemantics}\n * heading=\"Contents\"\n * direction=\"rtl\"\n * />\n * ```\n */\nconst TocPage: React.FC<TocPageProps> = ({\n\tonNavigate,\n\ttotalPages,\n\tpageSemantics,\n\theading = \"Table of Contents\",\n\tclassName,\n\tdirection = \"ltr\",\n\tfilter = defaultFilter,\n\trenderEntry,\n}) => {\n\t// Generate TOC entries for all pages\n\tconst entries: TocEntry[] = [];\n\tfor (let i = 0; i < totalPages; i++) {\n\t\tconst title = pageSemantics?.indexToTitle(i) ?? \"\";\n\t\tconst semanticName = pageSemantics?.indexToSemanticName(i) ?? \"\";\n\t\tconst entry: TocEntry = { pageIndex: i, title, semanticName };\n\n\t\tif (filter(entry, i)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t}\n\n\tconst renderDefaultEntry = (entry: TocEntry, onClick: () => void) => {\n\t\t// Title on one side (left in LTR, right in RTL); semantic name or page index on the other\n\t\tconst title = entry.title || entry.semanticName || `Page ${entry.pageIndex + 1}`;\n\t\tconst pageOrSemantic = entry.semanticName || String(entry.pageIndex + 1);\n\n\t\treturn (\n\t\t\t<li key={entry.pageIndex}>\n\t\t\t\t<button type=\"button\" className=\"toc-link\" onClick={onClick}>\n\t\t\t\t\t<span className=\"toc-title\">{title}</span>\n\t\t\t\t\t<span className=\"toc-dots\" aria-hidden />\n\t\t\t\t\t<span className=\"toc-page-num\">{pageOrSemantic}</span>\n\t\t\t\t</button>\n\t\t\t</li>\n\t\t);\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={`toc-page ${className ?? \"\"}`.trim()}\n\t\t\tstyle={{ direction, textAlign: direction === \"rtl\" ? \"right\" : \"left\" }}\n\t\t>\n\t\t\t<div className=\"toc-page__scroll\">\n\t\t\t\t<h2 className=\"toc-heading\">{heading}</h2>\n\t\t\t\t<ul className=\"toc-list\">\n\t\t\t\t\t{entries.map((entry) => {\n\t\t\t\t\t\tconst onClick = () => onNavigate(entry.pageIndex);\n\t\t\t\t\t\treturn renderEntry ? renderEntry(entry, onClick) : renderDefaultEntry(entry, onClick);\n\t\t\t\t\t})}\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport { TocPage };\n","import {\n\tFlipBook as FlipBookBase,\n\ttype HistoryMapper,\n\ttype PageFlipParams,\n\ttype PageSemantics,\n} from \"html-flip-book-vanilla\";\nimport type { DownloadConfig } from \"html-flip-book-vanilla/download\";\nimport type React from \"react\";\nimport { Children, forwardRef, useEffect, useImperativeHandle, useRef, useState } from \"react\";\n\n/**\n * Imperative handle exposed via ref for programmatic control of the FlipBook.\n * Flipbook methods (flipNext, jumpToPage, etc.) are called internally by commands;\n * consumers interact through commands (execute) and getters (ref).\n *\n * @example\n * ```tsx\n * const ref = useRef<FlipBookHandle>(null);\n * const page = ref.current?.getCurrentPageIndex();\n * ```\n */\nexport interface FlipBookHandle {\n\t/** Animate flip to the next page */\n\tflipNext: () => Promise<void>;\n\t/** Animate flip to the previous page */\n\tflipPrev: () => Promise<void>;\n\t/** Animate flip to a specific page index */\n\tflipToPage: (pageIndex: number) => Promise<void>;\n\t/** Jump to a specific page instantly without animation */\n\tjumpToPage: (pageIndex: number) => void;\n\t/** Toggle debug toolbar visibility (when debug mode is enabled). Bound to Ctrl+Alt+D by default. */\n\ttoggleDebugBar?: () => void;\n\t/** Get the current (leftmost visible) page index */\n\tgetCurrentPageIndex: () => number;\n\t/** Get the total number of pages */\n\tgetTotalPages: () => number;\n\t/** Get the \"of\" value for the indicator (e.g. total label). Defaults to total pages when not set. */\n\tgetOf: () => string | number;\n\t/** Check if currently at the first page */\n\tisFirstPage: () => boolean;\n\t/** Check if currently at the last page */\n\tisLastPage: () => boolean;\n\t/** Get download configuration for the book. Undefined when no download is configured. */\n\tgetDownloadConfig: () => DownloadConfig | undefined;\n\t/** Get the configured table of contents page index. */\n\tgetTocPageIndex: () => number;\n}\n\n/**\n * Configuration for book covers.\n */\nexport interface CoverConfig {\n\t/**\n\t * Make covers \"hard\" - no page curl effect on covers.\n\t * When true, cover pages appear flat without the soft page bend.\n\t * Default: false\n\t */\n\thardCovers?: boolean;\n\t/**\n\t * Disable shadow effects on cover pages.\n\t * Default: false\n\t */\n\tnoShadow?: boolean;\n\t/**\n\t * Page indices that are considered cover pages.\n\t * Default: [0] (front cover only). Use [0, totalPages-1] for front and back covers.\n\t * If \"auto\", uses first and last pages as covers.\n\t */\n\tcoverIndices?: number[] | \"auto\";\n\t/**\n\t * CSS class applied to interior sides of cover leaves (the endpaper).\n\t * Sets the page background to the cover color; the white endpaper inset\n\t * is created automatically by the infrastructure.\n\t */\n\tinteriorCoverClassName?: string;\n\t/**\n\t * Override interiorCoverClassName for the front cover interior specifically.\n\t */\n\tfrontInteriorCoverClassName?: string;\n\t/**\n\t * Override interiorCoverClassName for the back cover interior specifically.\n\t */\n\tbackInteriorCoverClassName?: string;\n\t/**\n\t * Inset size for the interior endpaper frame.\n\t * Any valid CSS length (e.g. \"5%\", \"12px\"). Default: \"5%\".\n\t */\n\tcoverInset?: string;\n}\n\n/**\n * Handlers for FlipBook events. Pass via the `handlers` prop.\n */\nexport interface FlipBookHandlers {\n\t/** Fired when a flip animation starts. Params: leaf index, page indices, semantics, direction. */\n\tonPageFlipping?: (params: PageFlipParams) => void;\n\t/** Fired when a flip completes. Params: leaf index, page indices, semantics, direction. */\n\tonPageFlipped?: (params: PageFlipParams) => void;\n}\n\n/**\n * Props for the FlipBook React component.\n */\nexport interface FlipBookProps {\n\t/** Array of React elements to render as pages */\n\tpages: React.ReactNode[];\n\t/** CSS class name for the flipbook container */\n\tclassName: string;\n\t/** Define which pages are covers for special styling */\n\tpageSemantics?: PageSemantics;\n\t/** Enable debug mode */\n\tdebug?: boolean;\n\t/** Reading direction: 'ltr' (left-to-right) or 'rtl' (right-to-left) */\n\tdirection?: \"rtl\" | \"ltr\";\n\t/** Indices of leaves that should start in the turned (flipped) state */\n\tinitialTurnedLeaves?: number[];\n\t/** Velocity threshold (px/s) for fast swipe to complete flip. Default: 500 */\n\tfastDeltaThreshold?: number;\n\t/**\n\t * Number of leaves to keep rendered before and after the current position.\n\t * When set, only leaves within the buffer range are visible for performance.\n\t * Default: undefined (all leaves are always rendered)\n\t */\n\tleavesBuffer?: number;\n\t/**\n\t * Configuration for cover pages (front and back covers).\n\t */\n\tcoverConfig?: CoverConfig;\n\t/**\n\t * Override for the \"of\" part of the page indicator (e.g. a gematria letter for the total, like \"נ\" for 50 in Hebrew books).\n\t * Defaults to total pages count when not set.\n\t */\n\tof?: string | number;\n\t/**\n\t * Aspect ratio for inner pages (text block leaves).\n\t * Default: { width: 2, height: 3 }\n\t */\n\tleafAspectRatio?: { width: number; height: number };\n\t/**\n\t * Aspect ratio for cover boards (slightly larger than leaf).\n\t * The delta between cover and leaf aspect ratios determines the visible frame.\n\t * Default: { width: 2.15, height: 3.15 }\n\t */\n\tcoverAspectRatio?: { width: number; height: number };\n\t/**\n\t * Event handlers. Use this to pass callbacks (e.g. onPageFlipped) instead of top-level props.\n\t */\n\thandlers?: FlipBookHandlers;\n\t/**\n\t * When set, syncs the flip-book with browser history: pushState on flip, restore page on back/forward.\n\t * Default: undefined.\n\t */\n\thistoryMapper?: HistoryMapper;\n\t/**\n\t * Table of contents page index (book-level). Populates the store used by goToToc command and TocButton.\n\t * Default: 4.\n\t */\n\ttocPageIndex?: number;\n\t/**\n\t * Download configuration: entire book and page-range handlers plus filename hints.\n\t * Toolbar's DownloadDropdown reads this from the flipbook ref.\n\t */\n\tdownloadConfig?: DownloadConfig;\n\t/**\n\t * When false, disables the inner page shadow/highlight (e.g. to avoid flicker with multiple books).\n\t * Default: true.\n\t */\n\tpageShadow?: boolean;\n\t/**\n\t * When true, uses aggressive containment on pages during flip animations\n\t * so the browser can operate on a cached GPU texture rather than\n\t * re-rendering content every frame. Reduces jank when flipping rapidly.\n\t * Default: true.\n\t */\n\tsnapshotDuringFlip?: boolean;\n\t/**\n\t * When false, history integration is disabled. When true or omitted, the provided historyMapper\n\t * is used; there is no default implementation. See base FlipBookOptions and issue #168.\n\t */\n\tenableHistory?: boolean;\n\t/**\n\t * When false, download is disabled (getDownloadConfig returns undefined). When true or omitted,\n\t * the provided downloadConfig is used; there is no default implementation. See base FlipBookOptions and issue #168.\n\t */\n\tenableDownload?: boolean;\n}\n\n/**\n * A React component for creating realistic page-flip animations.\n *\n * @example\n * ```tsx\n * import { FlipBook } from 'html-flip-book-react';\n *\n * function App() {\n * const ref = useRef<FlipBookHandle>(null);\n * return (\n * <FlipBook\n * ref={ref}\n * pages={[<div>Page 1</div>, <div>Page 2</div>]}\n * className=\"my-book\"\n * direction=\"ltr\"\n * />\n * );\n * }\n * ```\n */\nconst FlipBookReact = forwardRef<FlipBookHandle, FlipBookProps>(\n\t(\n\t\t{\n\t\t\tpages,\n\t\t\tclassName,\n\t\t\tdebug = false,\n\t\t\tdirection = \"ltr\",\n\t\t\tpageSemantics = undefined,\n\t\t\tinitialTurnedLeaves = [],\n\t\t\tfastDeltaThreshold,\n\t\t\tleavesBuffer,\n\t\t\tpageShadow = true,\n\t\t\tsnapshotDuringFlip = true,\n\t\t\tenableHistory,\n\t\t\tenableDownload,\n\t\t\tcoverConfig,\n\t\t\tof,\n\t\t\tleafAspectRatio,\n\t\t\tcoverAspectRatio,\n\t\t\thandlers,\n\t\t\thistoryMapper,\n\t\t\ttocPageIndex,\n\t\t\tdownloadConfig,\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst [currentPageIndex, setCurrentPageIndex] = useState(() => {\n\t\t\t// Derive the initial page index from initialTurnedLeaves so the\n\t\t\t// leavesBuffer renders around the correct page on the very first\n\t\t\t// render — before the base flipbook's useEffect fires.\n\t\t\tif (initialTurnedLeaves && initialTurnedLeaves.length > 0) {\n\t\t\t\tconst firstVisibleLeaf = Math.max(...initialTurnedLeaves) + 1;\n\t\t\t\tconst firstVisiblePage = firstVisibleLeaf * 2;\n\t\t\t\tif (firstVisiblePage >= pages.length) {\n\t\t\t\t\t// All leaves turned – show last leaf\n\t\t\t\t\tconst lastLeaf = Math.ceil(pages.length / 2) - 1;\n\t\t\t\t\treturn lastLeaf * 2;\n\t\t\t\t}\n\t\t\t\treturn firstVisiblePage;\n\t\t\t}\n\t\t\treturn 0;\n\t\t});\n\t\tconst setPageIndexRef = useRef(setCurrentPageIndex);\n\t\tsetPageIndexRef.current = setCurrentPageIndex;\n\t\tconst ofRef = useRef(of);\n\t\tofRef.current = of;\n\n\t\t// Debounce buffer-related re-renders during rapid consecutive page flips.\n\t\t// When leavesBuffer is set, each onPageChanged triggers a React re-render\n\t\t// that recalculates which pages to mount/unmount — expensive with complex\n\t\t// content (e.g. Hebrew text, perushim). By debouncing, rapid flips (>1 at\n\t\t// a time) batch into a single re-render after settling. The page indicator\n\t\t// reads directly from the imperative handle (flipBook.current) and is not\n\t\t// affected by this debounce.\n\t\tconst BUFFER_DEBOUNCE_MS = 80;\n\t\tconst pageChangedTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\t\tconst onPageChangedRef = useRef((index: number) => {\n\t\t\tsetPageIndexRef.current?.(index);\n\t\t});\n\t\tonPageChangedRef.current = (index: number) => {\n\t\t\tif (pageChangedTimerRef.current != null) {\n\t\t\t\tclearTimeout(pageChangedTimerRef.current);\n\t\t\t}\n\t\t\tif (leavesBuffer == null) {\n\t\t\t\t// No buffer — update immediately; no expensive mount/unmount cycle.\n\t\t\t\tsetPageIndexRef.current?.(index);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tpageChangedTimerRef.current = setTimeout(() => {\n\t\t\t\tpageChangedTimerRef.current = null;\n\t\t\t\tsetPageIndexRef.current?.(index);\n\t\t\t}, BUFFER_DEBOUNCE_MS);\n\t\t};\n\n\t\t// Clean up debounce timer on unmount.\n\t\tuseEffect(() => {\n\t\t\treturn () => {\n\t\t\t\tif (pageChangedTimerRef.current != null) {\n\t\t\t\t\tclearTimeout(pageChangedTimerRef.current);\n\t\t\t\t}\n\t\t\t};\n\t\t}, []);\n\n\t\tconst flipBook = useRef(\n\t\t\tnew FlipBookBase({\n\t\t\t\tpageSemantics: pageSemantics,\n\t\t\t\tpagesCount: pages.length,\n\t\t\t\tdirection: direction,\n\t\t\t\tinitialTurnedLeaves: initialTurnedLeaves,\n\t\t\t\tfastDeltaThreshold: fastDeltaThreshold,\n\t\t\t\tleavesBuffer: leavesBuffer,\n\t\t\t\tleafAspectRatio: leafAspectRatio,\n\t\t\t\tcoverAspectRatio: coverAspectRatio,\n\t\t\t\tcoverPageIndices: coverConfig?.coverIndices,\n\t\t\t\tonPageChanged: (index: number) => onPageChangedRef.current(index),\n\t\t\t\tonPageFlipping: handlers?.onPageFlipping,\n\t\t\t\tonPageFlipped: handlers?.onPageFlipped,\n\t\t\t\thistoryMapper,\n\t\t\t\ttocPageIndex: tocPageIndex ?? 4,\n\t\t\t\tdownloadConfig,\n\t\t\t\tpageShadow,\n\t\t\t\tsnapshotDuringFlip,\n\t\t\t\tenableHistory,\n\t\t\t\tenableDownload,\n\t\t\t}),\n\t\t);\n\n\t\t// Expose imperative handle: flipbook methods (called by commands) and getters (for UI)\n\t\tuseImperativeHandle(\n\t\t\tref,\n\t\t\t() => ({\n\t\t\t\tflipNext: () => flipBook.current.flipNext(),\n\t\t\t\tflipPrev: () => flipBook.current.flipPrev(),\n\t\t\t\tflipToPage: (pageIndex: number) => flipBook.current.flipToPage(pageIndex),\n\t\t\t\tjumpToPage: (pageIndex: number) => flipBook.current.jumpToPage(pageIndex),\n\t\t\t\ttoggleDebugBar: () => {\n\t\t\t\t\tconst selectorClass = className.split(/\\s+/)[0];\n\t\t\t\t\tconst root = document.querySelector(`.${selectorClass}`);\n\t\t\t\t\tconst bar = root?.querySelector(\".flipbook-debug-bar\");\n\t\t\t\t\tif (bar) bar.classList.toggle(\"flipbook-debug-bar--hidden\");\n\t\t\t\t},\n\t\t\t\tgetCurrentPageIndex: () => flipBook.current.currentPageIndex,\n\t\t\t\tgetTotalPages: () => flipBook.current.totalPages,\n\t\t\t\tgetOf: () => (ofRef.current !== undefined ? ofRef.current : flipBook.current.totalPages),\n\t\t\t\tisFirstPage: () => flipBook.current.isFirstPage,\n\t\t\t\tisLastPage: () => flipBook.current.isLastPage,\n\t\t\t\tgetDownloadConfig: () => flipBook.current.getDownloadConfig(),\n\t\t\t\tgetTocPageIndex: () => flipBook.current.getTocPageIndex(),\n\t\t\t}),\n\t\t\t[className],\n\t\t);\n\n\t\tuseEffect(() => {\n\t\t\tconst currentFlipBook = flipBook.current;\n\t\t\tconst selectorClass = className.split(/\\s+/)[0];\n\t\t\tcurrentFlipBook.render(`.${selectorClass}`, debug);\n\t\t\tsetCurrentPageIndex(currentFlipBook.currentPageIndex);\n\n\t\t\t// Cleanup function to destroy Hammer instance and event listeners\n\t\t\treturn () => {\n\t\t\t\tcurrentFlipBook.destroy();\n\t\t\t};\n\t\t}, [className, debug]);\n\n\t\t// Sync pageShadow to DOM when prop changes (base option is set at construct time).\n\t\tuseEffect(() => {\n\t\t\tconst selectorClass = className.split(/\\s+/)[0];\n\t\t\tconst el = document.querySelector(`.${selectorClass}`);\n\t\t\tif (!el) return;\n\t\t\tif (pageShadow) {\n\t\t\t\tel.classList.remove(\"flipbook--no-page-shadow\");\n\t\t\t} else {\n\t\t\t\tel.classList.add(\"flipbook--no-page-shadow\");\n\t\t\t}\n\t\t}, [className, pageShadow]);\n\n\t\t// Use Children.toArray to get stable keys for each page element\n\t\tconst pagesWithKeys = Children.toArray(pages);\n\t\tconst totalPages = pagesWithKeys.length;\n\n\t\t// Determine cover page indices\n\t\tconst coverIndicesSet = new Set(\n\t\t\tcoverConfig?.coverIndices === \"auto\"\n\t\t\t\t? [0, totalPages - 1]\n\t\t\t\t: (coverConfig?.coverIndices ?? [0]),\n\t\t);\n\t\tconst isCoverPage = (index: number) => coverIndicesSet.has(index);\n\n\t\t// Compute interior cover page indices (the other side of each cover leaf).\n\t\t// Leaf pairs: [0,1], [2,3], ... — interior is the paired page on the same leaf.\n\t\tconst interiorCoverMap = new Map<number, \"front\" | \"back\">();\n\t\tif (\n\t\t\tcoverConfig?.interiorCoverClassName ||\n\t\t\tcoverConfig?.frontInteriorCoverClassName ||\n\t\t\tcoverConfig?.backInteriorCoverClassName\n\t\t) {\n\t\t\tfor (const coverIdx of coverIndicesSet) {\n\t\t\t\tconst interiorIdx = coverIdx % 2 === 0 ? coverIdx + 1 : coverIdx - 1;\n\t\t\t\tif (interiorIdx >= 0 && interiorIdx < totalPages && !coverIndicesSet.has(interiorIdx)) {\n\t\t\t\t\t// First cover index = front, others = back\n\t\t\t\t\tconst role = coverIdx === Math.min(...coverIndicesSet) ? \"front\" : \"back\";\n\t\t\t\t\tinteriorCoverMap.set(interiorIdx, role);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst coverInset = coverConfig?.coverInset ?? \"5%\";\n\n\t\t// Build CSS class for a page\n\t\tconst getPageClassName = (index: number): string => {\n\t\t\tconst classes = [\"page\"];\n\t\t\tif (isCoverPage(index)) {\n\t\t\t\tclasses.push(\"page--cover\");\n\t\t\t\tif (coverConfig?.hardCovers) {\n\t\t\t\t\tclasses.push(\"page--hard\");\n\t\t\t\t}\n\t\t\t\tif (coverConfig?.noShadow) {\n\t\t\t\t\tclasses.push(\"page--no-shadow\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst interiorRole = interiorCoverMap.get(index);\n\t\t\tif (interiorRole) {\n\t\t\t\tclasses.push(\"page--cover-interior\");\n\t\t\t\tconst cls =\n\t\t\t\t\tinteriorRole === \"front\"\n\t\t\t\t\t\t? (coverConfig?.frontInteriorCoverClassName ?? coverConfig?.interiorCoverClassName)\n\t\t\t\t\t\t: (coverConfig?.backInteriorCoverClassName ?? coverConfig?.interiorCoverClassName);\n\t\t\t\tif (cls) classes.push(cls);\n\t\t\t}\n\t\t\treturn classes.join(\" \");\n\t\t};\n\n\t\t// When leavesBuffer is set, only mount content for pages within the buffer (keep .page wrappers for layout).\n\t\t// Use a small margin so content is ready before vanilla shows the leaf (avoids empty flash when flipping).\n\t\t// Cover pages are always mounted — they are cover-sized and sit behind leaf-sized pages,\n\t\t// acting as the physical book boards. Unmounting them would remove the realistic frame effect.\n\t\tconst contentByIndex =\n\t\t\tleavesBuffer != null && totalPages > 0\n\t\t\t\t? (() => {\n\t\t\t\t\t\tconst currentLeaf = Math.floor(currentPageIndex / 2);\n\t\t\t\t\t\tconst leavesCount = Math.ceil(totalPages / 2);\n\t\t\t\t\t\tconst margin = 2; // extra leaves each side so content exists when vanilla reveals them\n\t\t\t\t\t\tconst leafStart = Math.max(0, currentLeaf - leavesBuffer - margin);\n\t\t\t\t\t\tconst leafEnd = Math.min(leavesCount - 1, currentLeaf + leavesBuffer + margin);\n\t\t\t\t\t\tconst pageStart = leafStart * 2;\n\t\t\t\t\t\tconst pageEnd = Math.min(totalPages - 1, leafEnd * 2 + 1);\n\t\t\t\t\t\tconst inRange = new Set(\n\t\t\t\t\t\t\tArray.from({ length: pageEnd - pageStart + 1 }, (_, i) => pageStart + i),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t// Always include cover leaf pages so the larger cover boards remain mounted.\n\t\t\t\t\t\tfor (const idx of coverIndicesSet) {\n\t\t\t\t\t\t\tinRange.add(idx);\n\t\t\t\t\t\t\t// Also include the other side of the cover leaf\n\t\t\t\t\t\t\tconst partner = idx % 2 === 0 ? idx + 1 : idx - 1;\n\t\t\t\t\t\t\tif (partner >= 0 && partner < totalPages) {\n\t\t\t\t\t\t\t\tinRange.add(partner);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (index: number) => (inRange.has(index) ? pagesWithKeys[index] : null);\n\t\t\t\t\t})()\n\t\t\t\t: (index: number) => pagesWithKeys[index];\n\n\t\t/** Wrap interior cover pages with the endpaper inset frame (3-sided: no inset on spine). */\n\t\tconst renderPageContent = (index: number) => {\n\t\t\tconst content = contentByIndex(index);\n\t\t\tif (interiorCoverMap.has(index)) {\n\t\t\t\t// Determine spine side: even pages (engine convention: pageIndex%2===1) are on the\n\t\t\t\t// left in LTR / right in RTL. Their spine is on the opposite side.\n\t\t\t\tconst isEvenPage = index % 2 === 1; // engine: (pageIndex+1)%2===1 → odd; so %2===1 → even\n\t\t\t\tconst spineOnRight = isEvenPage !== (direction === \"rtl\");\n\t\t\t\tconst insetStyle = {\n\t\t\t\t\t\"--cover-inset\": coverInset,\n\t\t\t\t\t...(spineOnRight ? { \"--cover-inset-right\": \"0px\" } : { \"--cover-inset-left\": \"0px\" }),\n\t\t\t\t} as Record<string, string>;\n\t\t\t\treturn (\n\t\t\t\t\t<div className=\"page--cover-interior-inset\" style={insetStyle}>\n\t\t\t\t\t\t{content}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn content;\n\t\t};\n\n\t\treturn (\n\t\t\t<div className={className}>\n\t\t\t\t{pagesWithKeys.map((_, index) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: stable slot identity for buffer/mount correctness\n\t\t\t\t\t\tkey={`page-${index}`}\n\t\t\t\t\t\tclassName={getPageClassName(index)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderPageContent(index)}\n\t\t\t\t\t</div>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nFlipBookReact.displayName = \"FlipBook\";\n\nexport { FlipBookReact as FlipBook };\nexport type {\n\tFlipPageSemantic,\n\tHistoryMapper,\n\tPageFlipParams,\n\tPageSemantics,\n} from \"html-flip-book-vanilla\";\nexport type { TocEntry, TocPageProps } from \"./TocPage\";\nexport { TocPage } from \"./TocPage\";\n"],"names":["defaultFilter","entry","TocPage","onNavigate","totalPages","pageSemantics","heading","className","direction","filter","renderEntry","entries","i","title","semanticName","renderDefaultEntry","onClick","pageOrSemantic","jsx","jsxs","FlipBookReact","forwardRef","pages","debug","initialTurnedLeaves","fastDeltaThreshold","leavesBuffer","pageShadow","snapshotDuringFlip","enableHistory","enableDownload","coverConfig","of","leafAspectRatio","coverAspectRatio","handlers","historyMapper","tocPageIndex","downloadConfig","ref","currentPageIndex","setCurrentPageIndex","useState","firstVisiblePage","setPageIndexRef","useRef","ofRef","BUFFER_DEBOUNCE_MS","pageChangedTimerRef","onPageChangedRef","index","useEffect","flipBook","FlipBookBase","useImperativeHandle","pageIndex","selectorClass","bar","currentFlipBook","el","pagesWithKeys","Children","coverIndicesSet","isCoverPage","interiorCoverMap","coverIdx","interiorIdx","role","coverInset","getPageClassName","classes","interiorRole","cls","contentByIndex","currentLeaf","leavesCount","margin","leafStart","leafEnd","pageStart","pageEnd","inRange","_","idx","partner","renderPageContent","content","spineOnRight","insetStyle"],"mappings":";;;AA+CA,MAAMA,KAAgB,CAACC,MAA6BA,EAAM,MAAM,SAAS,GAoBnEC,KAAkC,CAAC;AAAA,EACxC,YAAAC;AAAA,EAC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F;AAAA,EAEF;AACD;AAEA9B,GAAc,cAAc;"}
1
+ {"version":3,"file":"flip-book.js","sources":["../src/TocPage.tsx","../src/FlipBook.tsx"],"sourcesContent":["import type { PageSemantics } from \"html-flip-book-vanilla\";\nimport type React from \"react\";\nimport \"./TocPage.css\";\n\n/**\n * Entry in the table of contents.\n */\nexport interface TocEntry {\n\t/** Page index to navigate to */\n\tpageIndex: number;\n\t/** Display title (from pageSemantics.indexToTitle or custom) */\n\ttitle: string;\n\t/** Semantic page name/number (from pageSemantics.indexToSemanticName) */\n\tsemanticName: string;\n}\n\n/**\n * Props for the TocPage component.\n */\nexport interface TocPageProps {\n\t/** Callback to navigate to a specific page */\n\tonNavigate: (pageIndex: number) => void;\n\t/** Total number of pages in the book */\n\ttotalPages: number;\n\t/** Page semantics for generating titles and page numbers */\n\tpageSemantics?: PageSemantics;\n\t/** Custom heading text. Default: \"Table of Contents\" */\n\theading?: string;\n\t/** Custom CSS class for the container */\n\tclassName?: string;\n\t/** Reading direction for RTL support */\n\tdirection?: \"ltr\" | \"rtl\";\n\t/**\n\t * Filter function to determine which pages appear in TOC.\n\t * By default, only pages with a title are included.\n\t */\n\tfilter?: (entry: TocEntry, pageIndex: number) => boolean;\n\t/**\n\t * Custom render function for TOC entries.\n\t * If not provided, uses default rendering.\n\t */\n\trenderEntry?: (entry: TocEntry, onClick: () => void) => React.ReactNode;\n}\n\n/**\n * Default filter: include pages that have a non-empty title.\n */\nconst defaultFilter = (entry: TocEntry): boolean => entry.title.length > 0;\n\n/**\n * A table of contents page component for FlipBook.\n *\n * Automatically generates TOC entries from pageSemantics, showing pages\n * that have titles. Entries display title with fallback to semantic name,\n * then page index.\n *\n * @example\n * ```tsx\n * <TocPage\n * onNavigate={(pageIndex) => flipBookRef.current?.flipToPage(pageIndex)}\n * totalPages={20}\n * pageSemantics={mySemantics}\n * heading=\"Contents\"\n * direction=\"rtl\"\n * />\n * ```\n */\nconst TocPage: React.FC<TocPageProps> = ({\n\tonNavigate,\n\ttotalPages,\n\tpageSemantics,\n\theading = \"Table of Contents\",\n\tclassName,\n\tdirection = \"ltr\",\n\tfilter = defaultFilter,\n\trenderEntry,\n}) => {\n\t// Generate TOC entries for all pages\n\tconst entries: TocEntry[] = [];\n\tfor (let i = 0; i < totalPages; i++) {\n\t\tconst title = pageSemantics?.indexToTitle(i) ?? \"\";\n\t\tconst semanticName = pageSemantics?.indexToSemanticName(i) ?? \"\";\n\t\tconst entry: TocEntry = { pageIndex: i, title, semanticName };\n\n\t\tif (filter(entry, i)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t}\n\n\tconst renderDefaultEntry = (entry: TocEntry, onClick: () => void) => {\n\t\t// Title on one side (left in LTR, right in RTL); semantic name or page index on the other\n\t\tconst title = entry.title || entry.semanticName || `Page ${entry.pageIndex + 1}`;\n\t\tconst pageOrSemantic = entry.semanticName || String(entry.pageIndex + 1);\n\n\t\treturn (\n\t\t\t<li key={entry.pageIndex}>\n\t\t\t\t<button type=\"button\" className=\"toc-link\" onClick={onClick}>\n\t\t\t\t\t<span className=\"toc-title\">{title}</span>\n\t\t\t\t\t<span className=\"toc-dots\" aria-hidden />\n\t\t\t\t\t<span className=\"toc-page-num\">{pageOrSemantic}</span>\n\t\t\t\t</button>\n\t\t\t</li>\n\t\t);\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={`toc-page ${className ?? \"\"}`.trim()}\n\t\t\tstyle={{ direction, textAlign: direction === \"rtl\" ? \"right\" : \"left\" }}\n\t\t>\n\t\t\t<div className=\"toc-page__scroll\">\n\t\t\t\t<h2 className=\"toc-heading\">{heading}</h2>\n\t\t\t\t<ul className=\"toc-list\">\n\t\t\t\t\t{entries.map((entry) => {\n\t\t\t\t\t\tconst onClick = () => onNavigate(entry.pageIndex);\n\t\t\t\t\t\treturn renderEntry ? renderEntry(entry, onClick) : renderDefaultEntry(entry, onClick);\n\t\t\t\t\t})}\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport { TocPage };\n","import {\n\tFlipBook as FlipBookBase,\n\ttype HistoryMapper,\n\ttype PageFlipParams,\n\ttype PageSemantics,\n} from \"html-flip-book-vanilla\";\nimport type { DownloadConfig } from \"html-flip-book-vanilla/download\";\nimport type React from \"react\";\nimport { Children, forwardRef, useEffect, useImperativeHandle, useRef, useState } from \"react\";\n\n/**\n * Imperative handle exposed via ref for programmatic control of the FlipBook.\n * Flipbook methods (flipNext, jumpToPage, etc.) are called internally by commands;\n * consumers interact through commands (execute) and getters (ref).\n *\n * @example\n * ```tsx\n * const ref = useRef<FlipBookHandle>(null);\n * const page = ref.current?.getCurrentPageIndex();\n * ```\n */\nexport interface FlipBookHandle {\n\t/** Animate flip to the next page */\n\tflipNext: () => Promise<void>;\n\t/** Animate flip to the previous page */\n\tflipPrev: () => Promise<void>;\n\t/** Animate flip to a specific page index */\n\tflipToPage: (pageIndex: number) => Promise<void>;\n\t/** Jump to a specific page instantly without animation */\n\tjumpToPage: (pageIndex: number) => void;\n\t/** Toggle debug toolbar visibility (when debug mode is enabled). Bound to Ctrl+Alt+D by default. */\n\ttoggleDebugBar?: () => void;\n\t/** Get the current (leftmost visible) page index */\n\tgetCurrentPageIndex: () => number;\n\t/** Get the total number of pages */\n\tgetTotalPages: () => number;\n\t/** Get the \"of\" value for the indicator (e.g. total label). Defaults to total pages when not set. */\n\tgetOf: () => string | number;\n\t/** Check if currently at the first page */\n\tisFirstPage: () => boolean;\n\t/** Check if currently at the last page */\n\tisLastPage: () => boolean;\n\t/** Get download configuration for the book. Undefined when no download is configured. */\n\tgetDownloadConfig: () => DownloadConfig | undefined;\n\t/** Get the configured table of contents page index. */\n\tgetTocPageIndex: () => number;\n}\n\n/**\n * Configuration for book covers.\n */\nexport interface CoverConfig {\n\t/**\n\t * Make covers \"hard\" - no page curl effect on covers.\n\t * When true, cover pages appear flat without the soft page bend.\n\t * Default: false\n\t */\n\thardCovers?: boolean;\n\t/**\n\t * Disable shadow effects on cover pages.\n\t * Default: false\n\t */\n\tnoShadow?: boolean;\n\t/**\n\t * Page indices that are considered cover pages.\n\t * Default: [0] (front cover only). Use [0, totalPages-1] for front and back covers.\n\t * If \"auto\", uses first and last pages as covers.\n\t */\n\tcoverIndices?: number[] | \"auto\";\n\t/**\n\t * CSS class applied to interior sides of cover leaves (the endpaper).\n\t * Sets the page background to the cover color; the white endpaper inset\n\t * is created automatically by the infrastructure.\n\t */\n\tinteriorCoverClassName?: string;\n\t/**\n\t * Override interiorCoverClassName for the front cover interior specifically.\n\t */\n\tfrontInteriorCoverClassName?: string;\n\t/**\n\t * Override interiorCoverClassName for the back cover interior specifically.\n\t */\n\tbackInteriorCoverClassName?: string;\n\t/**\n\t * Inset size for the interior endpaper frame.\n\t * Any valid CSS length (e.g. \"5%\", \"12px\"). Default: \"5%\".\n\t */\n\tcoverInset?: string;\n}\n\n/**\n * Handlers for FlipBook events. Pass via the `handlers` prop.\n */\nexport interface FlipBookHandlers {\n\t/** Fired when a flip animation starts. Params: leaf index, page indices, semantics, direction. */\n\tonPageFlipping?: (params: PageFlipParams) => void;\n\t/** Fired when a flip completes. Params: leaf index, page indices, semantics, direction. */\n\tonPageFlipped?: (params: PageFlipParams) => void;\n}\n\n/**\n * Props for the FlipBook React component.\n */\nexport interface FlipBookProps {\n\t/** Array of React elements to render as pages */\n\tpages: React.ReactNode[];\n\t/** CSS class name for the flipbook container */\n\tclassName: string;\n\t/** Define which pages are covers for special styling */\n\tpageSemantics?: PageSemantics;\n\t/** Enable debug mode */\n\tdebug?: boolean;\n\t/** Reading direction: 'ltr' (left-to-right) or 'rtl' (right-to-left) */\n\tdirection?: \"rtl\" | \"ltr\";\n\t/** Indices of leaves that should start in the turned (flipped) state */\n\tinitialTurnedLeaves?: number[];\n\t/** Velocity threshold (px/s) for fast swipe to complete flip. Default: 500 */\n\tfastDeltaThreshold?: number;\n\t/**\n\t * Number of leaves to keep rendered before and after the current position.\n\t * When set, only leaves within the buffer range are visible for performance.\n\t * Default: undefined (all leaves are always rendered)\n\t */\n\tleavesBuffer?: number;\n\t/**\n\t * Configuration for cover pages (front and back covers).\n\t */\n\tcoverConfig?: CoverConfig;\n\t/**\n\t * Override for the \"of\" part of the page indicator (e.g. a gematria letter for the total, like \"נ\" for 50 in Hebrew books).\n\t * Defaults to total pages count when not set.\n\t */\n\tof?: string | number;\n\t/**\n\t * Aspect ratio for inner pages (text block leaves).\n\t * Default: { width: 2, height: 3 }\n\t */\n\tleafAspectRatio?: { width: number; height: number };\n\t/**\n\t * Aspect ratio for cover boards (slightly larger than leaf).\n\t * The delta between cover and leaf aspect ratios determines the visible frame.\n\t * Default: { width: 2.15, height: 3.15 }\n\t */\n\tcoverAspectRatio?: { width: number; height: number };\n\t/**\n\t * Event handlers. Use this to pass callbacks (e.g. onPageFlipped) instead of top-level props.\n\t */\n\thandlers?: FlipBookHandlers;\n\t/**\n\t * When set, syncs the flip-book with browser history: pushState on flip, restore page on back/forward.\n\t * Default: undefined.\n\t */\n\thistoryMapper?: HistoryMapper;\n\t/**\n\t * Table of contents page index (book-level). Populates the store used by goToToc command and TocButton.\n\t * Default: 4.\n\t */\n\ttocPageIndex?: number;\n\t/**\n\t * Download configuration: entire book and page-range handlers plus filename hints.\n\t * Toolbar's DownloadDropdown reads this from the flipbook ref.\n\t */\n\tdownloadConfig?: DownloadConfig;\n\t/**\n\t * When false, disables the inner page shadow/highlight (e.g. to avoid flicker with multiple books).\n\t * Default: true.\n\t */\n\tpageShadow?: boolean;\n\t/**\n\t * When true, uses aggressive containment on pages during flip animations\n\t * so the browser can operate on a cached GPU texture rather than\n\t * re-rendering content every frame. Reduces jank when flipping rapidly.\n\t * Default: true.\n\t */\n\tsnapshotDuringFlip?: boolean;\n\t/**\n\t * When false, history integration is disabled. When true or omitted, the provided historyMapper\n\t * is used; there is no default implementation. See base FlipBookOptions and issue #168.\n\t */\n\tenableHistory?: boolean;\n\t/**\n\t * When false, download is disabled (getDownloadConfig returns undefined). When true or omitted,\n\t * the provided downloadConfig is used; there is no default implementation. See base FlipBookOptions and issue #168.\n\t */\n\tenableDownload?: boolean;\n}\n\n/**\n * A React component for creating realistic page-flip animations.\n *\n * @example\n * ```tsx\n * import { FlipBook } from 'html-flip-book-react';\n *\n * function App() {\n * const ref = useRef<FlipBookHandle>(null);\n * return (\n * <FlipBook\n * ref={ref}\n * pages={[<div>Page 1</div>, <div>Page 2</div>]}\n * className=\"my-book\"\n * direction=\"ltr\"\n * />\n * );\n * }\n * ```\n */\nconst FlipBookReact = forwardRef<FlipBookHandle, FlipBookProps>(\n\t(\n\t\t{\n\t\t\tpages,\n\t\t\tclassName,\n\t\t\tdebug = false,\n\t\t\tdirection = \"ltr\",\n\t\t\tpageSemantics = undefined,\n\t\t\tinitialTurnedLeaves = [],\n\t\t\tfastDeltaThreshold,\n\t\t\tleavesBuffer,\n\t\t\tpageShadow = true,\n\t\t\tsnapshotDuringFlip = true,\n\t\t\tenableHistory,\n\t\t\tenableDownload,\n\t\t\tcoverConfig,\n\t\t\tof,\n\t\t\tleafAspectRatio,\n\t\t\tcoverAspectRatio,\n\t\t\thandlers,\n\t\t\thistoryMapper,\n\t\t\ttocPageIndex,\n\t\t\tdownloadConfig,\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst [currentPageIndex, setCurrentPageIndex] = useState(() => {\n\t\t\t// Derive the initial page index from initialTurnedLeaves so the\n\t\t\t// leavesBuffer renders around the correct page on the very first\n\t\t\t// render — before the base flipbook's useEffect fires.\n\t\t\t// Must match the base flipbook's model: visible spread starts at\n\t\t\t// lastTurnedLeaf * 2 + 1 (back of the last turned leaf).\n\t\t\tif (initialTurnedLeaves && initialTurnedLeaves.length > 0) {\n\t\t\t\tconst lastTurnedLeaf = Math.max(...initialTurnedLeaves);\n\t\t\t\tconst firstVisiblePage = lastTurnedLeaf * 2 + 1;\n\t\t\t\tif (firstVisiblePage >= pages.length) {\n\t\t\t\t\tconst lastLeaf = Math.ceil(pages.length / 2) - 1;\n\t\t\t\t\treturn lastLeaf * 2;\n\t\t\t\t}\n\t\t\t\treturn firstVisiblePage;\n\t\t\t}\n\t\t\treturn 0;\n\t\t});\n\t\tconst setPageIndexRef = useRef(setCurrentPageIndex);\n\t\tsetPageIndexRef.current = setCurrentPageIndex;\n\t\tconst ofRef = useRef(of);\n\t\tofRef.current = of;\n\n\t\t// Debounce buffer-related re-renders during rapid consecutive page flips.\n\t\t// When leavesBuffer is set, each onPageChanged triggers a React re-render\n\t\t// that recalculates which pages to mount/unmount — expensive with complex\n\t\t// content (e.g. Hebrew text, perushim). By debouncing, rapid flips (>1 at\n\t\t// a time) batch into a single re-render after settling. The page indicator\n\t\t// reads directly from the imperative handle (flipBook.current) and is not\n\t\t// affected by this debounce.\n\t\tconst BUFFER_DEBOUNCE_MS = 80;\n\t\tconst pageChangedTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\t\tconst onPageChangedRef = useRef((index: number) => {\n\t\t\tsetPageIndexRef.current?.(index);\n\t\t});\n\t\tonPageChangedRef.current = (index: number) => {\n\t\t\tif (pageChangedTimerRef.current != null) {\n\t\t\t\tclearTimeout(pageChangedTimerRef.current);\n\t\t\t}\n\t\t\tif (leavesBuffer == null) {\n\t\t\t\t// No buffer — update immediately; no expensive mount/unmount cycle.\n\t\t\t\tsetPageIndexRef.current?.(index);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tpageChangedTimerRef.current = setTimeout(() => {\n\t\t\t\tpageChangedTimerRef.current = null;\n\t\t\t\tsetPageIndexRef.current?.(index);\n\t\t\t}, BUFFER_DEBOUNCE_MS);\n\t\t};\n\n\t\t// Clean up debounce timer on unmount.\n\t\tuseEffect(() => {\n\t\t\treturn () => {\n\t\t\t\tif (pageChangedTimerRef.current != null) {\n\t\t\t\t\tclearTimeout(pageChangedTimerRef.current);\n\t\t\t\t}\n\t\t\t};\n\t\t}, []);\n\n\t\tconst flipBook = useRef(\n\t\t\tnew FlipBookBase({\n\t\t\t\tpageSemantics: pageSemantics,\n\t\t\t\tpagesCount: pages.length,\n\t\t\t\tdirection: direction,\n\t\t\t\tinitialTurnedLeaves: initialTurnedLeaves,\n\t\t\t\tfastDeltaThreshold: fastDeltaThreshold,\n\t\t\t\tleavesBuffer: leavesBuffer,\n\t\t\t\tleafAspectRatio: leafAspectRatio,\n\t\t\t\tcoverAspectRatio: coverAspectRatio,\n\t\t\t\tcoverPageIndices: coverConfig?.coverIndices,\n\t\t\t\tonPageChanged: (index: number) => onPageChangedRef.current(index),\n\t\t\t\tonPageFlipping: handlers?.onPageFlipping,\n\t\t\t\tonPageFlipped: handlers?.onPageFlipped,\n\t\t\t\thistoryMapper,\n\t\t\t\ttocPageIndex: tocPageIndex ?? 4,\n\t\t\t\tdownloadConfig,\n\t\t\t\tpageShadow,\n\t\t\t\tsnapshotDuringFlip,\n\t\t\t\tenableHistory,\n\t\t\t\tenableDownload,\n\t\t\t}),\n\t\t);\n\n\t\t// Expose imperative handle: flipbook methods (called by commands) and getters (for UI)\n\t\tuseImperativeHandle(\n\t\t\tref,\n\t\t\t() => ({\n\t\t\t\tflipNext: () => flipBook.current.flipNext(),\n\t\t\t\tflipPrev: () => flipBook.current.flipPrev(),\n\t\t\t\tflipToPage: (pageIndex: number) => flipBook.current.flipToPage(pageIndex),\n\t\t\t\tjumpToPage: (pageIndex: number) => flipBook.current.jumpToPage(pageIndex),\n\t\t\t\ttoggleDebugBar: () => {\n\t\t\t\t\tconst selectorClass = className.split(/\\s+/)[0];\n\t\t\t\t\tconst root = document.querySelector(`.${selectorClass}`);\n\t\t\t\t\tconst bar = root?.querySelector(\".flipbook-debug-bar\");\n\t\t\t\t\tif (bar) bar.classList.toggle(\"flipbook-debug-bar--hidden\");\n\t\t\t\t},\n\t\t\t\tgetCurrentPageIndex: () => flipBook.current.currentPageIndex,\n\t\t\t\tgetTotalPages: () => flipBook.current.totalPages,\n\t\t\t\tgetOf: () => (ofRef.current !== undefined ? ofRef.current : flipBook.current.totalPages),\n\t\t\t\tisFirstPage: () => flipBook.current.isFirstPage,\n\t\t\t\tisLastPage: () => flipBook.current.isLastPage,\n\t\t\t\tgetDownloadConfig: () => flipBook.current.getDownloadConfig(),\n\t\t\t\tgetTocPageIndex: () => flipBook.current.getTocPageIndex(),\n\t\t\t}),\n\t\t\t[className],\n\t\t);\n\n\t\tuseEffect(() => {\n\t\t\tconst currentFlipBook = flipBook.current;\n\t\t\tconst selectorClass = className.split(/\\s+/)[0];\n\t\t\tcurrentFlipBook.render(`.${selectorClass}`, debug);\n\t\t\tsetCurrentPageIndex(currentFlipBook.currentPageIndex);\n\n\t\t\t// Cleanup function to destroy Hammer instance and event listeners\n\t\t\treturn () => {\n\t\t\t\tcurrentFlipBook.destroy();\n\t\t\t};\n\t\t}, [className, debug]);\n\n\t\t// Sync pageShadow to DOM when prop changes (base option is set at construct time).\n\t\tuseEffect(() => {\n\t\t\tconst selectorClass = className.split(/\\s+/)[0];\n\t\t\tconst el = document.querySelector(`.${selectorClass}`);\n\t\t\tif (!el) return;\n\t\t\tif (pageShadow) {\n\t\t\t\tel.classList.remove(\"flipbook--no-page-shadow\");\n\t\t\t} else {\n\t\t\t\tel.classList.add(\"flipbook--no-page-shadow\");\n\t\t\t}\n\t\t}, [className, pageShadow]);\n\n\t\t// Use Children.toArray to get stable keys for each page element\n\t\tconst pagesWithKeys = Children.toArray(pages);\n\t\tconst totalPages = pagesWithKeys.length;\n\n\t\t// Determine cover page indices\n\t\tconst coverIndicesSet = new Set(\n\t\t\tcoverConfig?.coverIndices === \"auto\"\n\t\t\t\t? [0, totalPages - 1]\n\t\t\t\t: (coverConfig?.coverIndices ?? [0]),\n\t\t);\n\t\tconst isCoverPage = (index: number) => coverIndicesSet.has(index);\n\n\t\t// Compute interior cover page indices (the other side of each cover leaf).\n\t\t// Leaf pairs: [0,1], [2,3], ... — interior is the paired page on the same leaf.\n\t\tconst interiorCoverMap = new Map<number, \"front\" | \"back\">();\n\t\tif (\n\t\t\tcoverConfig?.interiorCoverClassName ||\n\t\t\tcoverConfig?.frontInteriorCoverClassName ||\n\t\t\tcoverConfig?.backInteriorCoverClassName\n\t\t) {\n\t\t\tfor (const coverIdx of coverIndicesSet) {\n\t\t\t\tconst interiorIdx = coverIdx % 2 === 0 ? coverIdx + 1 : coverIdx - 1;\n\t\t\t\tif (interiorIdx >= 0 && interiorIdx < totalPages && !coverIndicesSet.has(interiorIdx)) {\n\t\t\t\t\t// First cover index = front, others = back\n\t\t\t\t\tconst role = coverIdx === Math.min(...coverIndicesSet) ? \"front\" : \"back\";\n\t\t\t\t\tinteriorCoverMap.set(interiorIdx, role);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst coverInset = coverConfig?.coverInset ?? \"5%\";\n\n\t\t// Build CSS class for a page\n\t\tconst getPageClassName = (index: number): string => {\n\t\t\tconst classes = [\"page\"];\n\t\t\tif (isCoverPage(index)) {\n\t\t\t\tclasses.push(\"page--cover\");\n\t\t\t\tif (coverConfig?.hardCovers) {\n\t\t\t\t\tclasses.push(\"page--hard\");\n\t\t\t\t}\n\t\t\t\tif (coverConfig?.noShadow) {\n\t\t\t\t\tclasses.push(\"page--no-shadow\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst interiorRole = interiorCoverMap.get(index);\n\t\t\tif (interiorRole) {\n\t\t\t\tclasses.push(\"page--cover-interior\");\n\t\t\t\tconst cls =\n\t\t\t\t\tinteriorRole === \"front\"\n\t\t\t\t\t\t? (coverConfig?.frontInteriorCoverClassName ?? coverConfig?.interiorCoverClassName)\n\t\t\t\t\t\t: (coverConfig?.backInteriorCoverClassName ?? coverConfig?.interiorCoverClassName);\n\t\t\t\tif (cls) classes.push(cls);\n\t\t\t}\n\t\t\treturn classes.join(\" \");\n\t\t};\n\n\t\t// When leavesBuffer is set, only mount content for pages within the buffer (keep .page wrappers for layout).\n\t\t// Use a small margin so content is ready before vanilla shows the leaf (avoids empty flash when flipping).\n\t\t// Cover pages are always mounted — they are cover-sized and sit behind leaf-sized pages,\n\t\t// acting as the physical book boards. Unmounting them would remove the realistic frame effect.\n\t\tconst contentByIndex =\n\t\t\tleavesBuffer != null && totalPages > 0\n\t\t\t\t? (() => {\n\t\t\t\t\t\tconst currentLeaf = Math.floor(currentPageIndex / 2);\n\t\t\t\t\t\tconst leavesCount = Math.ceil(totalPages / 2);\n\t\t\t\t\t\tconst margin = 2; // extra leaves each side so content exists when vanilla reveals them\n\t\t\t\t\t\tconst leafStart = Math.max(0, currentLeaf - leavesBuffer - margin);\n\t\t\t\t\t\tconst leafEnd = Math.min(leavesCount - 1, currentLeaf + leavesBuffer + margin);\n\t\t\t\t\t\tconst pageStart = leafStart * 2;\n\t\t\t\t\t\tconst pageEnd = Math.min(totalPages - 1, leafEnd * 2 + 1);\n\t\t\t\t\t\tconst inRange = new Set(\n\t\t\t\t\t\t\tArray.from({ length: pageEnd - pageStart + 1 }, (_, i) => pageStart + i),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t// Always include cover leaf pages so the larger cover boards remain mounted.\n\t\t\t\t\t\tfor (const idx of coverIndicesSet) {\n\t\t\t\t\t\t\tinRange.add(idx);\n\t\t\t\t\t\t\t// Also include the other side of the cover leaf\n\t\t\t\t\t\t\tconst partner = idx % 2 === 0 ? idx + 1 : idx - 1;\n\t\t\t\t\t\t\tif (partner >= 0 && partner < totalPages) {\n\t\t\t\t\t\t\t\tinRange.add(partner);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (index: number) => (inRange.has(index) ? pagesWithKeys[index] : null);\n\t\t\t\t\t})()\n\t\t\t\t: (index: number) => pagesWithKeys[index];\n\n\t\t/** Wrap interior cover pages with the endpaper inset frame (3-sided: no inset on spine). */\n\t\tconst renderPageContent = (index: number) => {\n\t\t\tconst content = contentByIndex(index);\n\t\t\tif (interiorCoverMap.has(index)) {\n\t\t\t\t// Determine spine side: even pages (engine convention: pageIndex%2===1) are on the\n\t\t\t\t// left in LTR / right in RTL. Their spine is on the opposite side.\n\t\t\t\tconst isEvenPage = index % 2 === 1; // engine: (pageIndex+1)%2===1 → odd; so %2===1 → even\n\t\t\t\tconst spineOnRight = isEvenPage !== (direction === \"rtl\");\n\t\t\t\tconst insetStyle = {\n\t\t\t\t\t\"--cover-inset\": coverInset,\n\t\t\t\t\t...(spineOnRight ? { \"--cover-inset-right\": \"0px\" } : { \"--cover-inset-left\": \"0px\" }),\n\t\t\t\t} as Record<string, string>;\n\t\t\t\treturn (\n\t\t\t\t\t<div className=\"page--cover-interior-inset\" style={insetStyle}>\n\t\t\t\t\t\t{content}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn content;\n\t\t};\n\n\t\treturn (\n\t\t\t<div className={className}>\n\t\t\t\t{pagesWithKeys.map((_, index) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: stable slot identity for buffer/mount correctness\n\t\t\t\t\t\tkey={`page-${index}`}\n\t\t\t\t\t\tclassName={getPageClassName(index)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderPageContent(index)}\n\t\t\t\t\t</div>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nFlipBookReact.displayName = \"FlipBook\";\n\nexport { FlipBookReact as FlipBook };\nexport type {\n\tFlipPageSemantic,\n\tHistoryMapper,\n\tPageFlipParams,\n\tPageSemantics,\n} from \"html-flip-book-vanilla\";\nexport type { TocEntry, TocPageProps } from \"./TocPage\";\nexport { TocPage } from \"./TocPage\";\n"],"names":["defaultFilter","entry","TocPage","onNavigate","totalPages","pageSemantics","heading","className","direction","filter","renderEntry","entries","i","title","semanticName","renderDefaultEntry","onClick","pageOrSemantic","jsx","jsxs","FlipBookReact","forwardRef","pages","debug","initialTurnedLeaves","fastDeltaThreshold","leavesBuffer","pageShadow","snapshotDuringFlip","enableHistory","enableDownload","coverConfig","of","leafAspectRatio","coverAspectRatio","handlers","historyMapper","tocPageIndex","downloadConfig","ref","currentPageIndex","setCurrentPageIndex","useState","firstVisiblePage","setPageIndexRef","useRef","ofRef","BUFFER_DEBOUNCE_MS","pageChangedTimerRef","onPageChangedRef","index","useEffect","flipBook","FlipBookBase","useImperativeHandle","pageIndex","selectorClass","bar","currentFlipBook","el","pagesWithKeys","Children","coverIndicesSet","isCoverPage","interiorCoverMap","coverIdx","interiorIdx","role","coverInset","getPageClassName","classes","interiorRole","cls","contentByIndex","currentLeaf","leavesCount","margin","leafStart","leafEnd","pageStart","pageEnd","inRange","_","idx","partner","renderPageContent","content","spineOnRight","insetStyle"],"mappings":";;;AA+CA,MAAMA,KAAgB,CAACC,MAA6BA,EAAM,MAAM,SAAS,GAoBnEC,KAAkC,CAAC;AAAA,EACxC,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,QAAAC,IAAST;AAAA,EACT,aAAAU;AACD,MAAM;AAEL,QAAMC,IAAsB,CAAA;AAC5B,WAASC,IAAI,GAAGA,IAAIR,GAAYQ,KAAK;AACpC,UAAMC,IAAQR,GAAe,aAAaO,CAAC,KAAK,IAC1CE,IAAeT,GAAe,oBAAoBO,CAAC,KAAK,IACxDX,IAAkB,EAAE,WAAWW,GAAG,OAAAC,GAAO,cAAAC,EAAA;AAE/C,IAAIL,EAAOR,GAAOW,CAAC,KAClBD,EAAQ,KAAKV,CAAK;AAAA,EAEpB;AAEA,QAAMc,IAAqB,CAACd,GAAiBe,MAAwB;AAEpE,UAAMH,IAAQZ,EAAM,SAASA,EAAM,gBAAgB,QAAQA,EAAM,YAAY,CAAC,IACxEgB,IAAiBhB,EAAM,gBAAgB,OAAOA,EAAM,YAAY,CAAC;AAEvE,WACC,gBAAAiB,EAAC,QACA,UAAA,gBAAAC,EAAC,UAAA,EAAO,MAAK,UAAS,WAAU,YAAW,SAAAH,GAC1C,UAAA;AAAA,MAAA,gBAAAE,EAAC,QAAA,EAAK,WAAU,aAAa,UAAAL,GAAM;AAAA,MACnC,gBAAAK,EA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iBpB;AAAA,UACjB,GAAImB,IAAe,EAAE,uBAAuB,UAAU,EAAE,sBAAsB,MAAA;AAAA,QAAM;AAErF,iCACE,OAAA,EAAI,WAAU,8BAA6B,OAAOC,GACjD,UAAAF,GACF;AAAA,MAEF;AACA,aAAOA;AAAA,IACR;AAEA,6BACE,OAAA,EAAI,WAAA/E,GACH,YAAc,IAAI,CAAC2E,GAAGhC,MACtB,gBAAAhC;AAAA,MAAC;AAAA,MAAA;AAAA,QAGA,WAAWmD,EAAiBnB,CAAK;AAAA,QAEhC,YAAkBA,CAAK;AAAA,MAAA;AAAA,MAHnB,QAAQA,CAAK;AAAA,IAAA,CAKnB,GACF;AAAA,EAEF;AACD;AAEA9B,GAAc,cAAc;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DownloadDropdown.d.ts","sourceRoot":"","sources":["../../src/toolbar/DownloadDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,wBAAwB,CAAC;AAsChC,MAAM,WAAW,qBAAqB;IAErC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAwPrD,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"DownloadDropdown.d.ts","sourceRoot":"","sources":["../../src/toolbar/DownloadDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,wBAAwB,CAAC;AAyDhC,MAAM,WAAW,qBAAqB;IAErC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA+PrD,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}