@readium/shared 2.2.0-beta.2 → 2.2.0-beta.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@readium/shared",
3
- "version": "2.2.0-beta.2",
3
+ "version": "2.2.0-beta.3",
4
4
  "type": "module",
5
5
  "description": "Shared models to be used across other Readium projects and implementations in Typescript",
6
6
  "author": "readium",
@@ -60,8 +60,7 @@ export class Timeline {
60
60
  children: tocChildren.length > 0 ? tocChildren : undefined,
61
61
  };
62
62
 
63
- const tocLink = Timeline.findTocLink(tocLinks, bare, depth);
64
- linkMap.set(item, tocLink ?? ro);
63
+ linkMap.set(item, ro);
65
64
  items.push(item);
66
65
  }
67
66
 
@@ -184,19 +183,6 @@ export class Timeline {
184
183
  return undefined;
185
184
  }
186
185
 
187
- /**
188
- * Return the most relevant TOC Link for `bare` (used for `linkFor`).
189
- * Prefers a start-of-resource entry; falls back to the first fragment entry.
190
- */
191
- private static findTocLink(
192
- tocLinks: Link[],
193
- bare: string,
194
- maxDepth: number | undefined,
195
- ): Link | undefined {
196
- const { atStart, fragments } = Timeline.collectTocCandidates(tocLinks, bare, maxDepth, 1);
197
- return atStart[0] ?? fragments[0];
198
- }
199
-
200
186
  /**
201
187
  * Collect all TOC entries that reference `bare` as flat children, walking
202
188
  * up to `maxDepth` levels deep. Start-of-resource entries (#t=0 or no
@@ -59,11 +59,6 @@ export declare class Timeline {
59
59
  * 3. Multiple fragment entries — ambiguous, returns `undefined`.
60
60
  */
61
61
  private static findTitleInToc;
62
- /**
63
- * Return the most relevant TOC Link for `bare` (used for `linkFor`).
64
- * Prefers a start-of-resource entry; falls back to the first fragment entry.
65
- */
66
- private static findTocLink;
67
62
  /**
68
63
  * Collect all TOC entries that reference `bare` as flat children, walking
69
64
  * up to `maxDepth` levels deep. Start-of-resource entries (#t=0 or no