instruckt 0.4.22 → 0.4.24
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/dist/instruckt.cjs.js +5 -3
- package/dist/instruckt.cjs.js.map +1 -1
- package/dist/instruckt.d.mts +1 -0
- package/dist/instruckt.d.ts +1 -0
- package/dist/instruckt.esm.js +5 -3
- package/dist/instruckt.esm.js.map +1 -1
- package/dist/instruckt.iife.js +8 -8
- package/dist/instruckt.iife.js.map +1 -1
- package/package.json +1 -1
package/dist/instruckt.cjs.js
CHANGED
|
@@ -3176,6 +3176,7 @@ var _Instruckt = class _Instruckt {
|
|
|
3176
3176
|
this.pendingMouseTarget = null;
|
|
3177
3177
|
this.highlightLocked = false;
|
|
3178
3178
|
this.pollTimer = null;
|
|
3179
|
+
this.initialLoadDone = false;
|
|
3179
3180
|
this.boundReposition = () => {
|
|
3180
3181
|
var _a2;
|
|
3181
3182
|
(_a2 = this.markers) == null ? void 0 : _a2.reposition(this.annotations);
|
|
@@ -3303,7 +3304,6 @@ var _Instruckt = class _Instruckt {
|
|
|
3303
3304
|
setTimeout(() => this.reattach(), 0);
|
|
3304
3305
|
});
|
|
3305
3306
|
this.loadAnnotations();
|
|
3306
|
-
this.syncMarkers();
|
|
3307
3307
|
}
|
|
3308
3308
|
makeToolbarCallbacks() {
|
|
3309
3309
|
return {
|
|
@@ -3365,6 +3365,7 @@ var _Instruckt = class _Instruckt {
|
|
|
3365
3365
|
this.saveToStorage();
|
|
3366
3366
|
} catch (e) {
|
|
3367
3367
|
}
|
|
3368
|
+
this.initialLoadDone = true;
|
|
3368
3369
|
this.syncMarkers();
|
|
3369
3370
|
}
|
|
3370
3371
|
saveToStorage() {
|
|
@@ -3382,6 +3383,7 @@ var _Instruckt = class _Instruckt {
|
|
|
3382
3383
|
}
|
|
3383
3384
|
/** Start or stop polling based on whether there are active annotations */
|
|
3384
3385
|
updatePolling() {
|
|
3386
|
+
if (!this.initialLoadDone) return;
|
|
3385
3387
|
const hasActive = this.totalActiveCount() > 0;
|
|
3386
3388
|
if (hasActive && !this.pollTimer) {
|
|
3387
3389
|
this.pollTimer = setInterval(() => this.pollForChanges(), 3e3);
|
|
@@ -3406,8 +3408,8 @@ var _Instruckt = class _Instruckt {
|
|
|
3406
3408
|
}
|
|
3407
3409
|
if (changed) {
|
|
3408
3410
|
this.saveToStorage();
|
|
3409
|
-
this.syncMarkers();
|
|
3410
3411
|
}
|
|
3412
|
+
this.syncMarkers();
|
|
3411
3413
|
} catch (e) {
|
|
3412
3414
|
}
|
|
3413
3415
|
}
|
|
@@ -3883,7 +3885,7 @@ No open annotations.`;
|
|
|
3883
3885
|
}
|
|
3884
3886
|
};
|
|
3885
3887
|
// ── Persistence ─────────────────────────────────────────────────
|
|
3886
|
-
_Instruckt.STORAGE_KEY =
|
|
3888
|
+
_Instruckt.STORAGE_KEY = `instruckt:${window.location.origin}:annotations`;
|
|
3887
3889
|
var Instruckt = _Instruckt;
|
|
3888
3890
|
|
|
3889
3891
|
// src/index.ts
|