@player-ui/player 1.1.0--canary.866.38489 → 1.1.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/Player.native.js +8 -14
- package/dist/Player.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -13
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.legacy-esm.js +7 -13
- package/dist/index.mjs +7 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/controllers/data/utils.ts +1 -1
- package/src/player.ts +4 -15
- package/src/types.ts +0 -41
- package/types/player.d.ts +3 -2
- package/types/types.d.ts +0 -39
- package/src/__tests__/transform-content.test.ts +0 -124
package/dist/Player.native.js
CHANGED
|
@@ -8495,8 +8495,8 @@ var Player = function() {
|
|
|
8495
8495
|
status: "not-started"
|
|
8496
8496
|
};
|
|
8497
8497
|
// ../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/core/player/src/player.ts
|
|
8498
|
-
var PLAYER_VERSION = true ? "1.1.0
|
|
8499
|
-
var COMMIT = true ? "
|
|
8498
|
+
var PLAYER_VERSION = true ? "1.1.0-next.0" : "unknown";
|
|
8499
|
+
var COMMIT = true ? "7844ec45a017e940133a8dd71273d21c4bc56393" : "unknown";
|
|
8500
8500
|
var _Player = /*#__PURE__*/ function() {
|
|
8501
8501
|
function _Player(config) {
|
|
8502
8502
|
var _this = this;
|
|
@@ -8518,8 +8518,7 @@ var Player = function() {
|
|
|
8518
8518
|
state: new SyncHook(),
|
|
8519
8519
|
onStart: new SyncHook(),
|
|
8520
8520
|
onEnd: new SyncHook(),
|
|
8521
|
-
resolveFlowContent: new SyncWaterfallHook()
|
|
8522
|
-
transformContent: new SyncWaterfallHook()
|
|
8521
|
+
resolveFlowContent: new SyncWaterfallHook()
|
|
8523
8522
|
};
|
|
8524
8523
|
if (config === null || config === void 0 ? void 0 : config.logger) {
|
|
8525
8524
|
this.logger.addHandler(config.logger);
|
|
@@ -8839,19 +8838,14 @@ var Player = function() {
|
|
|
8839
8838
|
},
|
|
8840
8839
|
{
|
|
8841
8840
|
key: "start",
|
|
8842
|
-
value: function start(payload
|
|
8841
|
+
value: function start(payload) {
|
|
8843
8842
|
return _async_to_generator(function() {
|
|
8844
|
-
var _this,
|
|
8843
|
+
var _this, _payload_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
|
|
8845
8844
|
return _ts_generator(this, function(_state) {
|
|
8846
8845
|
switch(_state.label){
|
|
8847
8846
|
case 0:
|
|
8848
8847
|
_this = this;
|
|
8849
|
-
|
|
8850
|
-
format: (_options_format = options === null || options === void 0 ? void 0 : options.format) !== null && _options_format !== void 0 ? _options_format : "player",
|
|
8851
|
-
version: options === null || options === void 0 ? void 0 : options.version
|
|
8852
|
-
};
|
|
8853
|
-
flow = this.hooks.transformContent.call(payload, meta);
|
|
8854
|
-
ref = Symbol((_flow_id = flow === null || flow === void 0 ? void 0 : flow.id) !== null && _flow_id !== void 0 ? _flow_id : "payload");
|
|
8848
|
+
ref = Symbol((_payload_id = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _payload_id !== void 0 ? _payload_id : "payload");
|
|
8855
8849
|
maybeUpdateState = function(newState) {
|
|
8856
8850
|
if (_this.state.ref !== ref) {
|
|
8857
8851
|
_this.logger.warn("Received update for a flow that's not the current one");
|
|
@@ -8872,7 +8866,7 @@ var Player = function() {
|
|
|
8872
8866
|
,
|
|
8873
8867
|
4
|
|
8874
8868
|
]);
|
|
8875
|
-
_this_setupFlow = this.setupFlow(
|
|
8869
|
+
_this_setupFlow = this.setupFlow(payload), state = _this_setupFlow.state, start = _this_setupFlow.start;
|
|
8876
8870
|
this.setState(_object_spread({
|
|
8877
8871
|
ref: ref
|
|
8878
8872
|
}, state));
|
|
@@ -8907,7 +8901,7 @@ var Player = function() {
|
|
|
8907
8901
|
errorState = {
|
|
8908
8902
|
status: "error",
|
|
8909
8903
|
ref: ref,
|
|
8910
|
-
flow:
|
|
8904
|
+
flow: payload,
|
|
8911
8905
|
error: error
|
|
8912
8906
|
};
|
|
8913
8907
|
maybeUpdateState(errorState);
|