@prose-reader/core 1.367.0 → 1.368.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.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/spineItem/SpineItem.d.ts +1 -0
- package/dist/spineItem/SpineItem.test.d.ts +1 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -4516,7 +4516,7 @@ var ai = (e) => (t) => e(t), oi = (e, t, n) => {
|
|
|
4516
4516
|
}, this.unload = () => {
|
|
4517
4517
|
this.renderer.unload();
|
|
4518
4518
|
}, this.markDirty = () => {
|
|
4519
|
-
this.
|
|
4519
|
+
this.updateState({ isDirty: !0 });
|
|
4520
4520
|
}, this.destroy = () => {
|
|
4521
4521
|
this.isDestroyed || (super.destroy(), this._layout.destroy(), this.renderer.destroy(), this.containerElement.remove());
|
|
4522
4522
|
}, this.isUsingVerticalWriting = () => !!this.renderer.writingMode?.startsWith("vertical"), this.layout = (e) => this._layout.layout(e), this.containerElement = $a(e, t.document);
|
|
@@ -4533,19 +4533,29 @@ var ai = (e) => (t) => e(t), oi = (e, t, n) => {
|
|
|
4533
4533
|
};
|
|
4534
4534
|
this.renderer = o ? o(s) : new Xa(s), this._layout = new Za(e, this.containerElement, t, r, this.renderer, this.settings, this.viewport);
|
|
4535
4535
|
let c = this.renderer.state$.pipe(I(({ state: e, error: t }) => {
|
|
4536
|
-
this.
|
|
4536
|
+
this.updateState({
|
|
4537
4537
|
isLoaded: e === "loaded",
|
|
4538
4538
|
isError: e === "error",
|
|
4539
4539
|
error: e === "error" ? t : void 0
|
|
4540
4540
|
});
|
|
4541
4541
|
}));
|
|
4542
4542
|
this.didLayout$ = this._layout.didLayout$.pipe(I(() => {
|
|
4543
|
-
this.
|
|
4543
|
+
this.updateState({
|
|
4544
4544
|
isDirty: !1,
|
|
4545
|
-
isReady:
|
|
4545
|
+
isReady: !0
|
|
4546
4546
|
});
|
|
4547
4547
|
}), Te()), E(c, this.didLayout$).pipe(F(this.destroy$)).subscribe();
|
|
4548
4548
|
}
|
|
4549
|
+
updateState(e) {
|
|
4550
|
+
let t = {
|
|
4551
|
+
...this.value,
|
|
4552
|
+
...e
|
|
4553
|
+
};
|
|
4554
|
+
this.mergeCompare({
|
|
4555
|
+
...t,
|
|
4556
|
+
isReady: t.isReady && t.isLoaded
|
|
4557
|
+
});
|
|
4558
|
+
}
|
|
4549
4559
|
get isReady$() {
|
|
4550
4560
|
return this.watch("isReady");
|
|
4551
4561
|
}
|