@player-ui/markdown-plugin 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.
|
@@ -12196,8 +12196,8 @@ var MarkdownPlugin = function() {
|
|
|
12196
12196
|
ref: Symbol("not-started"),
|
|
12197
12197
|
status: "not-started"
|
|
12198
12198
|
};
|
|
12199
|
-
var PLAYER_VERSION = true ? "1.1.0
|
|
12200
|
-
var COMMIT = true ? "
|
|
12199
|
+
var PLAYER_VERSION = true ? "1.1.0-next.1" : "unknown";
|
|
12200
|
+
var COMMIT = true ? "8d1e44b77769e923785e6218de2d9f99342b9b1a" : "unknown";
|
|
12201
12201
|
var _Player = /*#__PURE__*/ function() {
|
|
12202
12202
|
function _Player2(config) {
|
|
12203
12203
|
var _this = this;
|
|
@@ -12219,8 +12219,7 @@ var MarkdownPlugin = function() {
|
|
|
12219
12219
|
state: new SyncHook(),
|
|
12220
12220
|
onStart: new SyncHook(),
|
|
12221
12221
|
onEnd: new SyncHook(),
|
|
12222
|
-
resolveFlowContent: new SyncWaterfallHook()
|
|
12223
|
-
transformContent: new SyncBailHook()
|
|
12222
|
+
resolveFlowContent: new SyncWaterfallHook()
|
|
12224
12223
|
};
|
|
12225
12224
|
if (config === null || config === void 0 ? void 0 : config.logger) {
|
|
12226
12225
|
this.logger.addHandler(config.logger);
|
|
@@ -12234,9 +12233,6 @@ var MarkdownPlugin = function() {
|
|
|
12234
12233
|
(_this_config_plugins = this.config.plugins) === null || _this_config_plugins === void 0 ? void 0 : _this_config_plugins.forEach(function(plugin) {
|
|
12235
12234
|
plugin.apply(_this);
|
|
12236
12235
|
});
|
|
12237
|
-
this.hooks.transformContent.tap("player", function(payload, meta) {
|
|
12238
|
-
return meta.format === "player" ? payload : void 0;
|
|
12239
|
-
});
|
|
12240
12236
|
}
|
|
12241
12237
|
_create_class(_Player2, [
|
|
12242
12238
|
{
|
|
@@ -12543,22 +12539,14 @@ var MarkdownPlugin = function() {
|
|
|
12543
12539
|
},
|
|
12544
12540
|
{
|
|
12545
12541
|
key: "start",
|
|
12546
|
-
value: function start(payload
|
|
12542
|
+
value: function start(payload) {
|
|
12547
12543
|
return _async_to_generator(function() {
|
|
12548
|
-
var _this,
|
|
12544
|
+
var _this, _payload_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
|
|
12549
12545
|
return _ts_generator(this, function(_state) {
|
|
12550
12546
|
switch(_state.label){
|
|
12551
12547
|
case 0:
|
|
12552
12548
|
_this = this;
|
|
12553
|
-
|
|
12554
|
-
format: (_options_format = options === null || options === void 0 ? void 0 : options.format) !== null && _options_format !== void 0 ? _options_format : "player",
|
|
12555
|
-
version: options === null || options === void 0 ? void 0 : options.version
|
|
12556
|
-
};
|
|
12557
|
-
flow3 = this.hooks.transformContent.call(payload, meta);
|
|
12558
|
-
if (!flow3) {
|
|
12559
|
-
throw new Error('Player.start received content with format "'.concat(meta.format, '" that no plugin transformed into a Flow.'));
|
|
12560
|
-
}
|
|
12561
|
-
ref = Symbol((_flow3_id = flow3.id) !== null && _flow3_id !== void 0 ? _flow3_id : "payload");
|
|
12549
|
+
ref = Symbol((_payload_id = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _payload_id !== void 0 ? _payload_id : "payload");
|
|
12562
12550
|
maybeUpdateState = function(newState) {
|
|
12563
12551
|
if (_this.state.ref !== ref) {
|
|
12564
12552
|
_this.logger.warn("Received update for a flow that's not the current one");
|
|
@@ -12579,7 +12567,7 @@ var MarkdownPlugin = function() {
|
|
|
12579
12567
|
,
|
|
12580
12568
|
4
|
|
12581
12569
|
]);
|
|
12582
|
-
_this_setupFlow = this.setupFlow(
|
|
12570
|
+
_this_setupFlow = this.setupFlow(payload), state = _this_setupFlow.state, start = _this_setupFlow.start;
|
|
12583
12571
|
this.setState(_object_spread({
|
|
12584
12572
|
ref: ref
|
|
12585
12573
|
}, state));
|
|
@@ -12614,7 +12602,7 @@ var MarkdownPlugin = function() {
|
|
|
12614
12602
|
errorState = {
|
|
12615
12603
|
status: "error",
|
|
12616
12604
|
ref: ref,
|
|
12617
|
-
flow:
|
|
12605
|
+
flow: payload,
|
|
12618
12606
|
error: error
|
|
12619
12607
|
};
|
|
12620
12608
|
maybeUpdateState(errorState);
|