narraleaf-react 0.39.0 → 0.39.1

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.
@@ -146,6 +146,14 @@ export type PresentationSnapshot = {
146
146
  export type PlayerStateElementSnapshot = {
147
147
  scene: Scene;
148
148
  layers: Map<Layer, [LogicAction.DisplayableElements, Record<string, any>][]>;
149
+ /**
150
+ * Whether this scene was a caller parked behind a returnable jump when the snapshot was taken.
151
+ *
152
+ * A snapshot is restored by rebuilding the element, so anything the element carries and the
153
+ * snapshot does not is silently dropped on the way back. This one is the difference between a
154
+ * scene that is on the stage and one that is on the stage waiting for a call to return.
155
+ */
156
+ suspended?: boolean;
149
157
  };
150
158
  export type PlayerAction = CalledActionResult;
151
159
  interface StageUtils {
@@ -154,6 +154,18 @@ export declare class AudioManager {
154
154
  stop(sound: SoundElement, duration?: number): Awaitable<void>;
155
155
  setVolume(sound: SoundElement, volume: number, duration?: number): Awaitable<void>;
156
156
  mute(sound: SoundElement, muted?: boolean): Awaitable<void>;
157
+ /**
158
+ * Arm a transport change that will only act once a fade has finished, and hand back the test
159
+ * for whether it is still wanted by then.
160
+ *
161
+ * `FadeToken.finished` resolves when the fade is **cancelled** as well as when it runs out, and
162
+ * every later transport call on the same token cancels it - `resume` writes a volume, which is
163
+ * what cancels a pause's fade-out. Without this test, a scene call that returned while the
164
+ * caller's pause fade was still in flight landed the pause *after* the resume, with nothing
165
+ * left to undo it: the caller's music stayed silent for the rest of the scene while
166
+ * `sound.state.paused` said it was playing, so the next save recorded a stopped clip.
167
+ */
168
+ private arm;
157
169
  pause(sound: SoundElement, duration?: number): Awaitable<void>;
158
170
  resume(sound: SoundElement, duration?: number): Awaitable<void>;
159
171
  /**