@readium/navigator 2.7.0-alpha.2 → 2.7.0-alpha.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/navigator",
3
- "version": "2.7.0-alpha.2",
3
+ "version": "2.7.0-alpha.3",
4
4
  "type": "module",
5
5
  "description": "Next generation SDK for publications in Web Apps",
6
6
  "author": "readium",
@@ -54,8 +54,8 @@
54
54
  "typescript": "^5.9.3",
55
55
  "typescript-plugin-css-modules": "^5.2.0",
56
56
  "vite": "^7.3.1",
57
- "@readium/navigator-html-injectables": "2.5.0",
58
- "@readium/shared": "2.4.0-alpha.1"
57
+ "@readium/shared": "2.4.0-alpha.1",
58
+ "@readium/navigator-html-injectables": "2.5.0"
59
59
  },
60
60
  "scripts": {
61
61
  "clean": "rimraf types dist",
@@ -122,18 +122,13 @@ export class FramePoolManager {
122
122
  }
123
123
  this.currentBaseURL = pub.baseURL;
124
124
 
125
+ if(force) {
126
+ this.blobs.forEach(v => v.reset());
127
+ this.blobs.clear();
128
+ this.pendingUpdates.clear();
129
+ }
130
+
125
131
  const creator = async (href: string) => {
126
- if(force) {
127
- // Revoke all blobs so that CSSProperties are not stale
128
- // When using force, we switch scroll/paginated
129
- // If this property is not up to date, it creates issues
130
- // when navigating backwards, where paginated will go the
131
- // start of the resource instead of the end due to the
132
- // corrupted width ColumnSnapper (injectables) gets on init
133
- this.blobs.forEach(v => v.reset());
134
- this.blobs.clear();
135
- this.pendingUpdates.clear();
136
- }
137
132
  if(this.pendingUpdates.has(href) && this.pendingUpdates.get(href)?.inPool === false) {
138
133
  const v = this.blobs.get(href);
139
134
  if(v) {
@@ -189,8 +184,7 @@ export class FramePoolManager {
189
184
  return;
190
185
  }
191
186
 
192
- // Remaining frames can resolve later
193
- Promise.all(creation.map(async href => {
187
+ Promise.all(creation.filter(href => href !== newHref).map(async href => {
194
188
  const c = creator(href);
195
189
  this.inprogress.set(href, c);
196
190
  await c;