@netless/slide 1.4.55 → 1.4.56

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.
@@ -0,0 +1,20 @@
1
+ declare type VisibilityStyle = {
2
+ visibility: string;
3
+ };
4
+ declare type DisplayStyle = {
5
+ display: string;
6
+ };
7
+ declare type RenderSlidePlayer = {
8
+ view?: {
9
+ style: VisibilityStyle;
10
+ } | null;
11
+ };
12
+ declare type RenderSlideElement = {
13
+ style: VisibilityStyle & DisplayStyle;
14
+ };
15
+ /**
16
+ * Reveal a completed live render and remove its fallback image.
17
+ * Frozen and release states own visibility while their player transition is active.
18
+ */
19
+ export declare function updateRenderSlideVisibility(isReleasing: boolean, player: RenderSlidePlayer | undefined, frame: RenderSlideElement, cacheImage: RenderSlideElement): void;
20
+ export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Reveal a completed live render and remove its fallback image.
3
+ * Frozen and release states own visibility while their player transition is active.
4
+ */
5
+ export function updateRenderSlideVisibility(isReleasing, player, frame, cacheImage) {
6
+ if (isReleasing || !(player === null || player === void 0 ? void 0 : player.view)) {
7
+ return;
8
+ }
9
+ if (player.view.style.visibility === "hidden") {
10
+ player.view.style.visibility = "visible";
11
+ }
12
+ if (frame.style.visibility === "hidden") {
13
+ frame.style.visibility = "visible";
14
+ }
15
+ cacheImage.style.display = "none";
16
+ }
package/lib/Slide.d.ts CHANGED
@@ -452,6 +452,7 @@ export declare class Slide extends Slide_base {
452
452
  private isAnimating;
453
453
  private renderingTaskManager;
454
454
  private isLoading;
455
+ private isReleasing;
455
456
  private interactive;
456
457
  private syncCatchUpInputBlocked;
457
458
  private anchor;