@prose-reader/core 1.274.0 → 1.275.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.
@@ -1,3 +1,4 @@
1
+ import { Manifest } from '@prose-reader/shared';
1
2
  import { Reader } from '../../reader';
2
3
  import { Observable } from 'rxjs';
3
4
  export type ChapterInfo = {
@@ -16,6 +17,7 @@ export type ChapterInfo = {
16
17
  };
17
18
  path: string;
18
19
  };
20
+ export declare const buildChaptersInfo: (href: string, tocItem: NonNullable<Manifest["nav"]>["toc"], manifest: Manifest) => ChapterInfo | undefined;
19
21
  export declare const getChaptersInfo: (reader: Reader) => {
20
22
  [key: string]: ChapterInfo | undefined;
21
23
  };
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.js CHANGED
@@ -2462,7 +2462,7 @@ const Bi = (n) => n.pagination.state$.pipe(
2462
2462
  ), u = n.substring(0, n.lastIndexOf("/")), l = n.endsWith(a), d = u !== "" && u.endsWith(c);
2463
2463
  if (l || d) {
2464
2464
  const p = t.spineItems.findIndex(
2465
- (f) => f.href === s.href
2465
+ (f) => f.href === a
2466
2466
  );
2467
2467
  if (i < p) return o;
2468
2468
  const m = {
@@ -2482,7 +2482,7 @@ const Bi = (n) => n.pagination.state$.pipe(
2482
2482
  }, Gi = (n) => {
2483
2483
  const e = n.context.manifest, t = n.spineItemsManager.items;
2484
2484
  return e ? t.reduce(
2485
- (i, { item: o }) => (i[o.id] = qi(e, o), i),
2485
+ (o, { item: s }) => (o[s.id] = qi(e, s), o),
2486
2486
  {}
2487
2487
  ) : {};
2488
2488
  }, Zi = (n) => n.spineItemsManager.items$.pipe(