@player-ui/react 1.1.0--canary.866.38904 → 1.1.0-next.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.
@@ -1,5 +1,5 @@
1
1
  import type React from "react";
2
- import type { CompletedState, Flow, InProgressState, StartOptions } from "@player-ui/player";
2
+ import type { CompletedState, Flow, InProgressState } from "@player-ui/player";
3
3
  import type { ReactPlayer, ReactPlayerOptions } from "../player";
4
4
  export interface FinalState {
5
5
  /** Mark the iteration as complete */
@@ -41,11 +41,6 @@ export interface ManagedPlayerProps extends ReactPlayerOptions {
41
41
  manager: FlowManager;
42
42
  /** A callback when a flow is started */
43
43
  onStartedFlow?: (flow: Flow) => void;
44
- /**
45
- * Options forwarded to `player.start()` for every flow in the managed session,
46
- * e.g. `{ format: "a2ui" }`. Defaults to the `"player"` format.
47
- */
48
- startOptions?: StartOptions;
49
44
  /** A callback when the entire async iteration is completed */
50
45
  onComplete?: (finalState?: CompletedState) => void;
51
46
  /** A callback for any errors */
@@ -60,8 +55,6 @@ export type ManagedPlayerContext = {
60
55
  reactPlayer: ReactPlayer;
61
56
  /** The config for Player */
62
57
  playerConfig: ReactPlayerOptions;
63
- /** Options forwarded to `player.start()` for each flow (e.g. `{ format: "a2ui" }`) */
64
- startOptions?: StartOptions;
65
58
  };
66
59
  export type ManagedPlayerState = {
67
60
  /** The managed player hasn't started yet */
package/types/player.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { SyncWaterfallHook, AsyncParallelHook } from "tapable-ts";
3
3
  import { Subscribe } from "@player-ui/react-subscribe";
4
- import type { CompletedState, PlayerPlugin, View, PlayerInfo, StartOptions } from "@player-ui/player";
4
+ import type { CompletedState, PlayerPlugin, Flow, View, PlayerInfo } from "@player-ui/player";
5
5
  import { Player } from "@player-ui/player";
6
6
  import type { AssetRegistryType } from "./asset";
7
7
  import type { ReactPlayerProps } from "./app";
@@ -88,7 +88,7 @@ export declare class ReactPlayer {
88
88
  * If the `suspense` option is set, this will suspend while an update is pending, otherwise nothing will be rendered.
89
89
  */
90
90
  setWaitForNextViewUpdate(): Promise<void>;
91
- start(payload: unknown, options?: StartOptions): Promise<CompletedState>;
91
+ start(flow: Flow): Promise<CompletedState>;
92
92
  }
93
93
  export declare const WebPlayer: typeof ReactPlayer;
94
94
  //# sourceMappingURL=player.d.ts.map