@player-ui/react 0.8.0--canary.307.9621 → 0.8.0-next.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/cjs/index.cjs +664 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/index.legacy-esm.js +611 -0
- package/dist/index.mjs +611 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +30 -64
- package/src/__tests__/__snapshots__/app.test.tsx.snap +139 -0
- package/src/__tests__/app.test.tsx +244 -0
- package/src/__tests__/helpers/simple-asset-plugin.tsx +114 -0
- package/src/__tests__/hooks.test.tsx +8 -0
- package/src/app.tsx +3 -3
- package/src/asset/__tests__/index.test.tsx +129 -0
- package/src/asset/index.tsx +10 -10
- package/src/hooks.tsx +7 -8
- package/src/index.tsx +8 -8
- package/src/manager/__tests__/managed-player.test.tsx +454 -0
- package/src/manager/managed-player.tsx +31 -36
- package/src/manager/request-time.tsx +8 -8
- package/src/manager/types.ts +12 -12
- package/src/player.tsx +24 -43
- package/src/plugins/onupdate-plugin.ts +3 -3
- package/src/plugins/tapstate-plugin.ts +4 -4
- package/src/utils/__tests__/helpers.test.ts +39 -0
- package/src/utils/__tests__/url.test.ts +14 -0
- package/src/utils/helpers.ts +15 -12
- package/src/utils/index.tsx +6 -6
- package/src/utils/player-context.ts +2 -2
- package/src/utils/shared-constants.tsx +2 -2
- package/src/utils/url.ts +2 -2
- package/src/utils/use-asset-props.tsx +2 -2
- package/src/utils/use-logger.ts +3 -3
- package/types/app.d.ts +14 -0
- package/types/asset/index.d.ts +16 -0
- package/types/hooks.d.ts +17 -0
- package/types/index.d.ts +9 -0
- package/types/manager/managed-player.d.ts +93 -0
- package/types/manager/request-time.d.ts +7 -0
- package/types/manager/types.d.ts +125 -0
- package/types/player.d.ts +86 -0
- package/types/plugins/onupdate-plugin.d.ts +12 -0
- package/types/plugins/tapstate-plugin.d.ts +12 -0
- package/types/utils/helpers.d.ts +17 -0
- package/types/utils/index.d.ts +7 -0
- package/types/utils/player-context.d.ts +16 -0
- package/types/utils/shared-constants.d.ts +5 -0
- package/types/utils/url.d.ts +5 -0
- package/types/utils/use-asset-props.d.ts +7 -0
- package/types/utils/use-logger.d.ts +6 -0
- package/dist/index.cjs.js +0 -690
- package/dist/index.d.ts +0 -397
- package/dist/index.esm.js +0 -658
package/dist/index.d.ts
DELETED
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
import * as _player_ui_player from '@player-ui/player';
|
|
2
|
-
import { Asset, AssetWrapper, View, PlayerPlugin, Player, Flow, CompletedState, PlayerFlowState, FlowResult, NavigationFlowViewState, Logger } from '@player-ui/player';
|
|
3
|
-
export * from '@player-ui/player';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { SyncWaterfallHook, AsyncParallelHook } from 'tapable-ts';
|
|
6
|
-
import { Registry } from '@player-ui/partial-match-registry';
|
|
7
|
-
import * as _player_ui_types from '@player-ui/types';
|
|
8
|
-
|
|
9
|
-
declare type AssetRegistryType = Registry<React.ComponentType<any>>;
|
|
10
|
-
interface ContextType {
|
|
11
|
-
/**
|
|
12
|
-
* A registry of Asset -> React Components
|
|
13
|
-
*/
|
|
14
|
-
registry?: AssetRegistryType;
|
|
15
|
-
}
|
|
16
|
-
declare const AssetContext: React.Context<ContextType>;
|
|
17
|
-
/**
|
|
18
|
-
* A React Component that looks up an implementation from a registry
|
|
19
|
-
*/
|
|
20
|
-
declare const ReactAsset: (props: Asset<string> | AssetWrapper<Asset<string>>) => JSX.Element;
|
|
21
|
-
|
|
22
|
-
interface ReactPlayerProps {
|
|
23
|
-
/**
|
|
24
|
-
* The Content view object to render
|
|
25
|
-
*/
|
|
26
|
-
view: View;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interface DevtoolsGlobals {
|
|
30
|
-
/** A global for a plugin to load to Player for devtools */
|
|
31
|
-
__PLAYER_DEVTOOLS_PLUGIN?: {
|
|
32
|
-
new (): ReactPlayerPlugin;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
declare type DevtoolsWindow = typeof window & DevtoolsGlobals;
|
|
36
|
-
interface ReactPlayerInfo {
|
|
37
|
-
/** Version of the running player */
|
|
38
|
-
playerVersion: string;
|
|
39
|
-
/** Version of the running reactPlayer */
|
|
40
|
-
reactPlayerVersion: string;
|
|
41
|
-
/** Hash of the HEAD commit used to build the current player version */
|
|
42
|
-
playerCommit: string;
|
|
43
|
-
/** Hash of the HEAD commit used to build the current reactPlayer version */
|
|
44
|
-
reactPlayerCommit: string;
|
|
45
|
-
}
|
|
46
|
-
interface ReactPlayerPlugin extends Partial<PlayerPlugin> {
|
|
47
|
-
/** The name of this plugin */
|
|
48
|
-
name: string;
|
|
49
|
-
/**
|
|
50
|
-
* Attach listeners to the web-player instance
|
|
51
|
-
*/
|
|
52
|
-
applyReact?: (reactPlayer: ReactPlayer) => void;
|
|
53
|
-
}
|
|
54
|
-
interface ReactPlayerOptions {
|
|
55
|
-
/** A headless player instance to use */
|
|
56
|
-
player?: Player;
|
|
57
|
-
/** A set of plugins to apply to this player */
|
|
58
|
-
plugins?: Array<ReactPlayerPlugin>;
|
|
59
|
-
/**
|
|
60
|
-
* If the underlying reactPlayer.Component should use `React.Suspense` to trigger a loading state while waiting for content or content updates.
|
|
61
|
-
* It requires that a `React.Suspense` component handler be somewhere in the `reactPlayer.Component` hierarchy.
|
|
62
|
-
*/
|
|
63
|
-
suspend?: boolean;
|
|
64
|
-
}
|
|
65
|
-
declare type ReactPlayerComponentProps = Record<string, unknown>;
|
|
66
|
-
/** A Player that renders UI through React */
|
|
67
|
-
declare class ReactPlayer {
|
|
68
|
-
readonly options: ReactPlayerOptions;
|
|
69
|
-
readonly player: Player;
|
|
70
|
-
readonly assetRegistry: AssetRegistryType;
|
|
71
|
-
readonly Component: React.ComponentType<ReactPlayerComponentProps>;
|
|
72
|
-
readonly hooks: {
|
|
73
|
-
/**
|
|
74
|
-
* A hook to create a React Component to be used for Player, regardless of the current flow state
|
|
75
|
-
*/
|
|
76
|
-
webComponent: SyncWaterfallHook<[React.ComponentType<{}>], Record<string, any>>;
|
|
77
|
-
/**
|
|
78
|
-
* A hook to create a React Component that's used to render a specific view.
|
|
79
|
-
* It will be called for each view update from the core player.
|
|
80
|
-
* Typically this will just be `Asset`
|
|
81
|
-
*/
|
|
82
|
-
playerComponent: SyncWaterfallHook<[React.ComponentType<ReactPlayerProps>], Record<string, any>>;
|
|
83
|
-
/**
|
|
84
|
-
* A hook to execute async tasks before the view resets to undefined
|
|
85
|
-
*/
|
|
86
|
-
onBeforeViewReset: AsyncParallelHook<[], Record<string, any>>;
|
|
87
|
-
};
|
|
88
|
-
private viewUpdateSubscription;
|
|
89
|
-
private reactPlayerInfo;
|
|
90
|
-
constructor(options?: ReactPlayerOptions);
|
|
91
|
-
/** Returns the current version of the underlying core Player */
|
|
92
|
-
getPlayerVersion(): string;
|
|
93
|
-
/** Returns the git commit used to build this core Player version */
|
|
94
|
-
getPlayerCommit(): string;
|
|
95
|
-
/** Find instance of [Plugin] that has been registered to the web player */
|
|
96
|
-
findPlugin<Plugin extends ReactPlayerPlugin>(symbol: symbol): Plugin | undefined;
|
|
97
|
-
/** Register and apply [Plugin] if one with the same symbol is not already registered. */
|
|
98
|
-
registerPlugin(plugin: ReactPlayerPlugin): void;
|
|
99
|
-
/** Returns the current version of the running React Player */
|
|
100
|
-
getReactPlayerVersion(): string;
|
|
101
|
-
/** Returns the git commit used to build the React Player version */
|
|
102
|
-
getReactPlayerCommit(): string;
|
|
103
|
-
private createReactPlayerComponent;
|
|
104
|
-
private createReactComp;
|
|
105
|
-
/**
|
|
106
|
-
* Call this method to force the ReactPlayer to wait for the next view-update before performing the next render.
|
|
107
|
-
* If the `suspense` option is set, this will suspend while an update is pending, otherwise nothing will be rendered.
|
|
108
|
-
*/
|
|
109
|
-
setWaitForNextViewUpdate(): Promise<void>;
|
|
110
|
-
start(flow: Flow): Promise<CompletedState>;
|
|
111
|
-
}
|
|
112
|
-
declare const WebPlayer: typeof ReactPlayer;
|
|
113
|
-
|
|
114
|
-
interface UseReactPlayerReturn {
|
|
115
|
-
/** The web-player instance */
|
|
116
|
-
reactPlayer: ReactPlayer;
|
|
117
|
-
/** Player instance */
|
|
118
|
-
player: Player;
|
|
119
|
-
/** The state of Player */
|
|
120
|
-
playerState: PlayerFlowState;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* The `useReactPlayer` hook is an easy way to integrate the web-player into your React app.
|
|
124
|
-
* Simply supply your config, plugins, and an optional flow, which will be automatically started for you when changed.
|
|
125
|
-
*/
|
|
126
|
-
declare const useReactPlayer: (options?: ReactPlayerOptions | undefined) => UseReactPlayerReturn;
|
|
127
|
-
|
|
128
|
-
interface FinalState {
|
|
129
|
-
/** Mark the iteration as complete */
|
|
130
|
-
done: true;
|
|
131
|
-
}
|
|
132
|
-
interface NextState<T> {
|
|
133
|
-
/** Optional mark the iteration as _not_ completed */
|
|
134
|
-
done?: false;
|
|
135
|
-
/** The next value in the iteration */
|
|
136
|
-
value: T;
|
|
137
|
-
}
|
|
138
|
-
interface FlowManager {
|
|
139
|
-
/**
|
|
140
|
-
* An iterator implementation that takes the result of the previous flow and returns a new one or completion marker.
|
|
141
|
-
*
|
|
142
|
-
* If `done: true` is passed, the multi-flow experience is completed.
|
|
143
|
-
*
|
|
144
|
-
* @param previousValue - The result of the previous flow.
|
|
145
|
-
*/
|
|
146
|
-
next: (previousValue?: CompletedState) => Promise<FinalState | NextState<Flow>>;
|
|
147
|
-
/**
|
|
148
|
-
* Called when the flow is ended early (the react tree is torn down)
|
|
149
|
-
* Allows clients the opportunity to save-data before destroying the tree
|
|
150
|
-
*/
|
|
151
|
-
terminate?: (data?: FlowResult['data']) => void;
|
|
152
|
-
}
|
|
153
|
-
interface FallbackProps {
|
|
154
|
-
/** A callback to reset the flow iteration from the start */
|
|
155
|
-
reset?: () => void;
|
|
156
|
-
/** A callback to retry the last failed segment of the iteration */
|
|
157
|
-
retry?: () => void;
|
|
158
|
-
/** The error that caused the failure */
|
|
159
|
-
error?: Error;
|
|
160
|
-
}
|
|
161
|
-
interface ManagedPlayerProps extends ReactPlayerOptions {
|
|
162
|
-
/** The manager for populating the next flows */
|
|
163
|
-
manager: FlowManager;
|
|
164
|
-
/** A callback when a flow is started */
|
|
165
|
-
onStartedFlow?: () => void;
|
|
166
|
-
/** A callback when the entire async iteration is completed */
|
|
167
|
-
onComplete?: (finalState?: CompletedState) => void;
|
|
168
|
-
/** A callback for any errors */
|
|
169
|
-
onError?: (e: Error) => void;
|
|
170
|
-
/** A component to render when there are errors */
|
|
171
|
-
fallbackComponent?: React.ComponentType<FallbackProps>;
|
|
172
|
-
}
|
|
173
|
-
declare type ManagedPlayerContext = {
|
|
174
|
-
/** The flow manager */
|
|
175
|
-
manager: FlowManager;
|
|
176
|
-
/** The web-player */
|
|
177
|
-
reactPlayer: ReactPlayer;
|
|
178
|
-
/** The config for Player */
|
|
179
|
-
playerConfig: ReactPlayerOptions;
|
|
180
|
-
};
|
|
181
|
-
declare type ManagedPlayerState = {
|
|
182
|
-
/** The managed player hasn't started yet */
|
|
183
|
-
value: 'not_started';
|
|
184
|
-
/** The context for the managed state */
|
|
185
|
-
context: ManagedPlayerContext;
|
|
186
|
-
} | {
|
|
187
|
-
/** The managed-player is awaiting a response from the flow manager */
|
|
188
|
-
value: 'pending';
|
|
189
|
-
/** The context for the managed state */
|
|
190
|
-
context: ManagedPlayerContext & {
|
|
191
|
-
/** The previous completed state */
|
|
192
|
-
prevResult?: CompletedState;
|
|
193
|
-
/** A promise from the flow manager for the next state */
|
|
194
|
-
next: Promise<FinalState | NextState<Flow>>;
|
|
195
|
-
};
|
|
196
|
-
} | {
|
|
197
|
-
/** A flow was retrieved from the flow manager, but hasn't been processed yet */
|
|
198
|
-
value: 'loaded';
|
|
199
|
-
/** The context for the managed state */
|
|
200
|
-
context: ManagedPlayerContext & {
|
|
201
|
-
/** The next flow to load */
|
|
202
|
-
flow: Flow;
|
|
203
|
-
/** The previous completed state */
|
|
204
|
-
prevResult?: CompletedState;
|
|
205
|
-
};
|
|
206
|
-
} | {
|
|
207
|
-
/** Player is currently executing a flow */
|
|
208
|
-
value: 'running';
|
|
209
|
-
/** The context for the managed state */
|
|
210
|
-
context: ManagedPlayerContext & {
|
|
211
|
-
/** The currently running flow */
|
|
212
|
-
flow: Flow;
|
|
213
|
-
/** A promise for the completed result */
|
|
214
|
-
result: Promise<CompletedState>;
|
|
215
|
-
/** The previous completed result */
|
|
216
|
-
prevResult?: CompletedState;
|
|
217
|
-
};
|
|
218
|
-
} | {
|
|
219
|
-
/** Player has completed a flow */
|
|
220
|
-
value: 'completed';
|
|
221
|
-
/** The context for the managed state */
|
|
222
|
-
context: ManagedPlayerContext & {
|
|
223
|
-
/** The result of the completed flow */
|
|
224
|
-
result?: CompletedState;
|
|
225
|
-
};
|
|
226
|
-
} | {
|
|
227
|
-
/** The entire flow iteration has completed */
|
|
228
|
-
value: 'ended';
|
|
229
|
-
/** The context for the managed state */
|
|
230
|
-
context: ManagedPlayerContext & {
|
|
231
|
-
/** The result of the last completed flow */
|
|
232
|
-
result?: CompletedState;
|
|
233
|
-
};
|
|
234
|
-
} | {
|
|
235
|
-
/** One of the steps in the flow has resulted in an error */
|
|
236
|
-
value: 'error';
|
|
237
|
-
/** The context for the managed state */
|
|
238
|
-
context: ManagedPlayerContext & {
|
|
239
|
-
/** The error that caused the flow to halt */
|
|
240
|
-
error: Error;
|
|
241
|
-
/** the result of the last completed flow */
|
|
242
|
-
prevResult?: CompletedState;
|
|
243
|
-
};
|
|
244
|
-
};
|
|
245
|
-
interface ManagerMiddleware {
|
|
246
|
-
/** Middleware for a response from the managed-player */
|
|
247
|
-
next?: <Type>(nextPromise: Promise<Type>) => Promise<Type>;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
interface StateChangeCallback {
|
|
251
|
-
/** Trigger for state changes */
|
|
252
|
-
onState: (s: ManagedPlayerState) => void;
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* An object to store the state of the managed player
|
|
256
|
-
*/
|
|
257
|
-
declare class ManagedState {
|
|
258
|
-
state?: ManagedPlayerState;
|
|
259
|
-
private callbacks;
|
|
260
|
-
private middleware?;
|
|
261
|
-
constructor({ middleware, }: {
|
|
262
|
-
/** middleware to use in the managed player */
|
|
263
|
-
middleware?: ManagerMiddleware;
|
|
264
|
-
});
|
|
265
|
-
/** Add a listener to state changes */
|
|
266
|
-
addListener(callback: StateChangeCallback): () => void;
|
|
267
|
-
/** start the managed flow */
|
|
268
|
-
start(options: {
|
|
269
|
-
/** the flow manager to use */
|
|
270
|
-
manager: FlowManager;
|
|
271
|
-
/** the config to use when creating a player */
|
|
272
|
-
playerConfig: ReactPlayerOptions;
|
|
273
|
-
}): this;
|
|
274
|
-
/** reset starts from nothing */
|
|
275
|
-
reset(): void;
|
|
276
|
-
/** restart starts from the last result */
|
|
277
|
-
restart(): void;
|
|
278
|
-
private setState;
|
|
279
|
-
private processState;
|
|
280
|
-
}
|
|
281
|
-
/** Creates an x-state state machine that persists when this component is no longer renders (due to Suspense) */
|
|
282
|
-
declare const usePersistentStateMachine: (options: {
|
|
283
|
-
/** the flow manager to use */
|
|
284
|
-
manager: FlowManager;
|
|
285
|
-
/** Player config */
|
|
286
|
-
playerConfig: ReactPlayerOptions;
|
|
287
|
-
/** Any middleware for the manager */
|
|
288
|
-
middleware?: ManagerMiddleware;
|
|
289
|
-
}) => {
|
|
290
|
-
managedState: ManagedState;
|
|
291
|
-
state: {
|
|
292
|
-
value: "not_started";
|
|
293
|
-
context: ManagedPlayerContext;
|
|
294
|
-
} | {
|
|
295
|
-
value: "pending";
|
|
296
|
-
context: ManagedPlayerContext & {
|
|
297
|
-
prevResult?: _player_ui_player.CompletedState | undefined;
|
|
298
|
-
next: Promise<FinalState | NextState<_player_ui_types.Flow<_player_ui_types.Asset<string>>>>;
|
|
299
|
-
};
|
|
300
|
-
} | {
|
|
301
|
-
value: "loaded";
|
|
302
|
-
context: ManagedPlayerContext & {
|
|
303
|
-
flow: _player_ui_types.Flow<_player_ui_types.Asset<string>>;
|
|
304
|
-
prevResult?: _player_ui_player.CompletedState | undefined;
|
|
305
|
-
};
|
|
306
|
-
} | {
|
|
307
|
-
value: "running";
|
|
308
|
-
context: ManagedPlayerContext & {
|
|
309
|
-
flow: _player_ui_types.Flow<_player_ui_types.Asset<string>>;
|
|
310
|
-
result: Promise<_player_ui_player.CompletedState>;
|
|
311
|
-
prevResult?: _player_ui_player.CompletedState | undefined;
|
|
312
|
-
};
|
|
313
|
-
} | {
|
|
314
|
-
value: "completed";
|
|
315
|
-
context: ManagedPlayerContext & {
|
|
316
|
-
result?: _player_ui_player.CompletedState | undefined;
|
|
317
|
-
};
|
|
318
|
-
} | {
|
|
319
|
-
value: "ended";
|
|
320
|
-
context: ManagedPlayerContext & {
|
|
321
|
-
result?: _player_ui_player.CompletedState | undefined;
|
|
322
|
-
};
|
|
323
|
-
} | {
|
|
324
|
-
value: "error";
|
|
325
|
-
context: ManagedPlayerContext & {
|
|
326
|
-
error: Error;
|
|
327
|
-
prevResult?: _player_ui_player.CompletedState | undefined;
|
|
328
|
-
};
|
|
329
|
-
} | undefined;
|
|
330
|
-
};
|
|
331
|
-
/**
|
|
332
|
-
* A ManagedPlayer is a component responsible for orchestrating multi-flow experiences using Player.
|
|
333
|
-
* Provide a valid `FlowManager` to handle fetching the next flow.
|
|
334
|
-
*
|
|
335
|
-
* `suspense` must be enabled to wait for results in flight.
|
|
336
|
-
*/
|
|
337
|
-
declare const ManagedPlayer: (props: ManagedPlayerProps) => JSX.Element | null;
|
|
338
|
-
|
|
339
|
-
/** hook to time a promise and add it to the metrics plugin */
|
|
340
|
-
declare const useRequestTime: () => {
|
|
341
|
-
withRequestTime: <Type>(nextPromise: Promise<Type>) => Promise<Type>;
|
|
342
|
-
RequestTimeMetricsPlugin: ReactPlayerPlugin;
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
interface PlayerContextType {
|
|
346
|
-
/**
|
|
347
|
-
* An instance of a headless player
|
|
348
|
-
*/
|
|
349
|
-
player?: Player;
|
|
350
|
-
/** The currently rendered view state */
|
|
351
|
-
viewState?: NavigationFlowViewState;
|
|
352
|
-
}
|
|
353
|
-
declare const PlayerContext: React.Context<PlayerContextType>;
|
|
354
|
-
/**
|
|
355
|
-
* A hook to get the current player
|
|
356
|
-
*/
|
|
357
|
-
declare const usePlayer: () => Player | undefined;
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* A hook to get the logger instance from the current player
|
|
361
|
-
*/
|
|
362
|
-
declare function useLogger(): Logger;
|
|
363
|
-
|
|
364
|
-
/** Common props for any dom node */
|
|
365
|
-
declare function useAssetProps(asset: Asset): {
|
|
366
|
-
id: string;
|
|
367
|
-
'data-asset-type': string;
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Trim leading and trailing slashes from string
|
|
372
|
-
*/
|
|
373
|
-
declare function trimSlashes(str: string): string;
|
|
374
|
-
/**
|
|
375
|
-
* Removes any key: value pairs from an object when the value is null or undefined
|
|
376
|
-
*/
|
|
377
|
-
declare function removeEmptyValuesFromObject(obj: Record<string, any>): Record<string, NonNullable<any>>;
|
|
378
|
-
/** Check if the object has no keys */
|
|
379
|
-
declare function isEmptyObject(obj: Record<string, unknown>): boolean;
|
|
380
|
-
/** Check if the argument is a function */
|
|
381
|
-
declare function isFunction<ReturnType>(maybeFn: ReturnType | ((...args: unknown[]) => ReturnType)): maybeFn is (...args: unknown[]) => ReturnType;
|
|
382
|
-
/**
|
|
383
|
-
* Calls function with provided data or returns original value
|
|
384
|
-
*/
|
|
385
|
-
declare function callOrReturn<ReturnType, FnArgs extends Array<unknown> = unknown[], FnType = (...args: FnArgs) => ReturnType>(maybeFn: FnType | ReturnType, fnArgs: FnArgs): ReturnType;
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* Combines a URL with any additional parameters
|
|
389
|
-
*/
|
|
390
|
-
declare function buildUrl(url: string, params?: Record<string, unknown>): string;
|
|
391
|
-
|
|
392
|
-
/** Hook to get a constant under a specific namespace */
|
|
393
|
-
declare function useGetConstantByType(type: string, key: string): unknown;
|
|
394
|
-
/** Get a constant under the default namespace */
|
|
395
|
-
declare function useGetConstant(key: string): unknown;
|
|
396
|
-
|
|
397
|
-
export { AssetContext, AssetRegistryType, ContextType, DevtoolsGlobals, DevtoolsWindow, FallbackProps, FinalState, FlowManager, ManagedPlayer, ManagedPlayerContext, ManagedPlayerProps, ManagedPlayerState, ManagerMiddleware, NextState, PlayerContext, PlayerContextType, ReactAsset, ReactPlayer, ReactPlayerComponentProps, ReactPlayerInfo, ReactPlayerOptions, ReactPlayerPlugin, StateChangeCallback, UseReactPlayerReturn, WebPlayer, buildUrl, callOrReturn, isEmptyObject, isFunction, removeEmptyValuesFromObject, trimSlashes, useAssetProps, useGetConstant, useGetConstantByType, useLogger, usePersistentStateMachine, usePlayer, useReactPlayer, useRequestTime };
|