@player-ui/markdown-plugin 0.13.0 → 0.14.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.
|
@@ -1454,22 +1454,6 @@ var MarkdownPlugin = function() {
|
|
|
1454
1454
|
}
|
|
1455
1455
|
});
|
|
1456
1456
|
};
|
|
1457
|
-
var unpackNode = function unpackNode(item) {
|
|
1458
|
-
var _item_children_, _item_children, _item_children_1, _item_children1;
|
|
1459
|
-
var unpacked = [];
|
|
1460
|
-
if ("children" in item && ((_item_children = item.children) === null || _item_children === void 0 ? void 0 : (_item_children_ = _item_children[0]) === null || _item_children_ === void 0 ? void 0 : _item_children_.value.type) === "asset" && ((_item_children1 = item.children) === null || _item_children1 === void 0 ? void 0 : (_item_children_1 = _item_children1[0]) === null || _item_children_1 === void 0 ? void 0 : _item_children_1.value).children) {
|
|
1461
|
-
var _item_children__value_children_, _item_children__value_children, _item_children_2, _item_children2;
|
|
1462
|
-
if (((_item_children__value_children = ((_item_children2 = item.children) === null || _item_children2 === void 0 ? void 0 : (_item_children_2 = _item_children2[0]) === null || _item_children_2 === void 0 ? void 0 : _item_children_2.value).children) === null || _item_children__value_children === void 0 ? void 0 : (_item_children__value_children_ = _item_children__value_children[0]) === null || _item_children__value_children_ === void 0 ? void 0 : _item_children__value_children_.value.type) === "multi-node") {
|
|
1463
|
-
var _item_children__value_children_1, _item_children__value_children1, _item_children_3, _item_children3;
|
|
1464
|
-
((_item_children__value_children1 = ((_item_children3 = item.children) === null || _item_children3 === void 0 ? void 0 : (_item_children_3 = _item_children3[0]) === null || _item_children_3 === void 0 ? void 0 : _item_children_3.value).children) === null || _item_children__value_children1 === void 0 ? void 0 : (_item_children__value_children_1 = _item_children__value_children1[0]) === null || _item_children__value_children_1 === void 0 ? void 0 : _item_children__value_children_1.value).values.forEach(function(value) {
|
|
1465
|
-
unpacked.push(value);
|
|
1466
|
-
});
|
|
1467
|
-
}
|
|
1468
|
-
} else {
|
|
1469
|
-
unpacked.push(item);
|
|
1470
|
-
}
|
|
1471
|
-
return unpacked;
|
|
1472
|
-
};
|
|
1473
1457
|
var hasSomethingToResolve = function hasSomethingToResolve(str) {
|
|
1474
1458
|
return bindingResolveLookup(str) || expressionResolveLookup(str);
|
|
1475
1459
|
};
|
|
@@ -7057,6 +7041,7 @@ var MarkdownPlugin = function() {
|
|
|
7057
7041
|
}
|
|
7058
7042
|
};
|
|
7059
7043
|
var identifier = function() {
|
|
7044
|
+
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
7060
7045
|
if (!isIdentifierChar(ch)) {
|
|
7061
7046
|
return;
|
|
7062
7047
|
}
|
|
@@ -7067,6 +7052,14 @@ var MarkdownPlugin = function() {
|
|
|
7067
7052
|
}
|
|
7068
7053
|
value += ch;
|
|
7069
7054
|
}
|
|
7055
|
+
if (allowBoolValue) {
|
|
7056
|
+
if (value === "true") {
|
|
7057
|
+
return toValue(true);
|
|
7058
|
+
}
|
|
7059
|
+
if (value === "false") {
|
|
7060
|
+
return toValue(false);
|
|
7061
|
+
}
|
|
7062
|
+
}
|
|
7070
7063
|
if (value) {
|
|
7071
7064
|
var maybeNumber = Number(value);
|
|
7072
7065
|
value = isNaN(maybeNumber) ? value : maybeNumber;
|
|
@@ -7115,8 +7108,9 @@ var MarkdownPlugin = function() {
|
|
|
7115
7108
|
}
|
|
7116
7109
|
};
|
|
7117
7110
|
var simpleSegment = function() {
|
|
7111
|
+
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
7118
7112
|
var _nestedPath, _ref;
|
|
7119
|
-
return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression()) !== null && _ref !== void 0 ? _ref : identifier();
|
|
7113
|
+
return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression()) !== null && _ref !== void 0 ? _ref : identifier(allowBoolValue);
|
|
7120
7114
|
};
|
|
7121
7115
|
var segment = function() {
|
|
7122
7116
|
var segments = [];
|
|
@@ -7131,6 +7125,7 @@ var MarkdownPlugin = function() {
|
|
|
7131
7125
|
return toConcatenatedNode(segments);
|
|
7132
7126
|
};
|
|
7133
7127
|
var optionallyQuotedSegment = function() {
|
|
7128
|
+
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
7134
7129
|
whitespace();
|
|
7135
7130
|
if (ch === SINGLE_QUOTE || ch === DOUBLE_QUOTE) {
|
|
7136
7131
|
var singleQuote = ch === SINGLE_QUOTE;
|
|
@@ -7139,7 +7134,7 @@ var MarkdownPlugin = function() {
|
|
|
7139
7134
|
next(singleQuote ? SINGLE_QUOTE : DOUBLE_QUOTE);
|
|
7140
7135
|
return id;
|
|
7141
7136
|
}
|
|
7142
|
-
return simpleSegment();
|
|
7137
|
+
return simpleSegment(allowBoolValue);
|
|
7143
7138
|
};
|
|
7144
7139
|
var equals = function() {
|
|
7145
7140
|
if (ch !== EQUALS) {
|
|
@@ -7159,7 +7154,7 @@ var MarkdownPlugin = function() {
|
|
|
7159
7154
|
whitespace();
|
|
7160
7155
|
if (equals()) {
|
|
7161
7156
|
whitespace();
|
|
7162
|
-
var second = optionallyQuotedSegment();
|
|
7157
|
+
var second = optionallyQuotedSegment(true);
|
|
7163
7158
|
value = toQuery(value, second);
|
|
7164
7159
|
whitespace();
|
|
7165
7160
|
}
|
|
@@ -7347,7 +7342,7 @@ var MarkdownPlugin = function() {
|
|
|
7347
7342
|
appendPathSegments(getValueForNode(resolvedNode));
|
|
7348
7343
|
break;
|
|
7349
7344
|
case "Value":
|
|
7350
|
-
appendPathSegments(resolvedNode.value);
|
|
7345
|
+
appendPathSegments(typeof resolvedNode.value === "boolean" ? String(resolvedNode.value) : resolvedNode.value);
|
|
7351
7346
|
break;
|
|
7352
7347
|
case "Query":
|
|
7353
7348
|
{
|
|
@@ -8927,23 +8922,8 @@ var MarkdownPlugin = function() {
|
|
|
8927
8922
|
function Parser() {
|
|
8928
8923
|
_class_call_check(this, Parser);
|
|
8929
8924
|
this.hooks = {
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
*
|
|
8933
|
-
* @param value - The object we're are about to parse
|
|
8934
|
-
* @returns - A new value to parse.
|
|
8935
|
-
* If undefined, the original value is used.
|
|
8936
|
-
* If null, we stop parsing this node.
|
|
8937
|
-
*/ onParseObject: new SyncWaterfallHook(),
|
|
8938
|
-
/**
|
|
8939
|
-
* A callback to interact with an AST _after_ we parse it into the AST
|
|
8940
|
-
*
|
|
8941
|
-
* @param value - The object we parsed
|
|
8942
|
-
* @param node - The AST node we generated
|
|
8943
|
-
* @returns - A new AST node to use
|
|
8944
|
-
* If undefined, the original value is used.
|
|
8945
|
-
* If null, we ignore this node all together
|
|
8946
|
-
*/ onCreateASTNode: new SyncWaterfallHook(),
|
|
8925
|
+
onParseObject: new SyncWaterfallHook(),
|
|
8926
|
+
onCreateASTNode: new SyncWaterfallHook(),
|
|
8947
8927
|
parseNode: new SyncBailHook()
|
|
8948
8928
|
};
|
|
8949
8929
|
}
|
|
@@ -9085,20 +9065,14 @@ var MarkdownPlugin = function() {
|
|
|
9085
9065
|
function Resolver(root, options) {
|
|
9086
9066
|
_class_call_check(this, Resolver);
|
|
9087
9067
|
this.hooks = {
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
*/ resolve: new SyncWaterfallHook(),
|
|
9097
|
-
/**
|
|
9098
|
-
* A hook to transform the resolved value of an AST node.
|
|
9099
|
-
* This runs _after_ all children nodes are resolved
|
|
9100
|
-
*/ afterResolve: new SyncWaterfallHook(),
|
|
9101
|
-
/** Called at the very end of a node's tree being updated */ afterNodeUpdate: new SyncHook()
|
|
9068
|
+
skipResolve: new SyncWaterfallHook(),
|
|
9069
|
+
beforeUpdate: new SyncHook(),
|
|
9070
|
+
afterUpdate: new SyncHook(),
|
|
9071
|
+
resolveOptions: new SyncWaterfallHook(),
|
|
9072
|
+
beforeResolve: new SyncWaterfallHook(),
|
|
9073
|
+
resolve: new SyncWaterfallHook(),
|
|
9074
|
+
afterResolve: new SyncWaterfallHook(),
|
|
9075
|
+
afterNodeUpdate: new SyncHook()
|
|
9102
9076
|
};
|
|
9103
9077
|
this.root = root;
|
|
9104
9078
|
this.options = options;
|
|
@@ -9106,6 +9080,7 @@ var MarkdownPlugin = function() {
|
|
|
9106
9080
|
this.ASTMap = /* @__PURE__ */ new Map();
|
|
9107
9081
|
this.logger = options.logger;
|
|
9108
9082
|
this.idCache = /* @__PURE__ */ new Set();
|
|
9083
|
+
this.AsyncIdMap = /* @__PURE__ */ new Map();
|
|
9109
9084
|
}
|
|
9110
9085
|
_create_class(Resolver, [
|
|
9111
9086
|
{
|
|
@@ -9116,13 +9091,27 @@ var MarkdownPlugin = function() {
|
|
|
9116
9091
|
},
|
|
9117
9092
|
{
|
|
9118
9093
|
key: "update",
|
|
9119
|
-
value: function update(changes) {
|
|
9094
|
+
value: function update(changes, asyncChanges) {
|
|
9095
|
+
var _this = this;
|
|
9120
9096
|
this.hooks.beforeUpdate.call(changes);
|
|
9121
9097
|
var resolveCache = /* @__PURE__ */ new Map();
|
|
9122
9098
|
this.idCache.clear();
|
|
9123
9099
|
var prevASTMap = new Map(this.ASTMap);
|
|
9124
9100
|
this.ASTMap.clear();
|
|
9125
|
-
var
|
|
9101
|
+
var prevAsyncIdMap = new Map(this.AsyncIdMap);
|
|
9102
|
+
var nextAsyncIdMap = /* @__PURE__ */ new Map();
|
|
9103
|
+
asyncChanges === null || asyncChanges === void 0 ? void 0 : asyncChanges.forEach(function(id) {
|
|
9104
|
+
var current = prevAsyncIdMap.get(id);
|
|
9105
|
+
while(current && prevASTMap.has(current)){
|
|
9106
|
+
var next = prevASTMap.get(current);
|
|
9107
|
+
if (next && _this.resolveCache.has(next)) {
|
|
9108
|
+
_this.resolveCache.delete(next);
|
|
9109
|
+
}
|
|
9110
|
+
current = current.parent;
|
|
9111
|
+
}
|
|
9112
|
+
});
|
|
9113
|
+
var updated = this.computeTree(this.root, void 0, changes, resolveCache, toNodeResolveOptions(this.options), void 0, prevASTMap, nextAsyncIdMap);
|
|
9114
|
+
this.AsyncIdMap = nextAsyncIdMap;
|
|
9126
9115
|
this.resolveCache = resolveCache;
|
|
9127
9116
|
this.hooks.afterUpdate.call(updated.value);
|
|
9128
9117
|
return updated.value;
|
|
@@ -9176,9 +9165,8 @@ var MarkdownPlugin = function() {
|
|
|
9176
9165
|
},
|
|
9177
9166
|
{
|
|
9178
9167
|
key: "computeTree",
|
|
9179
|
-
value: function computeTree(node2, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap) {
|
|
9168
|
+
value: function computeTree(node2, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap, nextAsyncIdMap) {
|
|
9180
9169
|
var _this = this;
|
|
9181
|
-
var _partiallyResolvedParent_parent_parent, _partiallyResolvedParent_parent, _resolvedAST_parent, _partiallyResolvedParent_parent1;
|
|
9182
9170
|
var dependencyModel = new DependencyModel(options.data.model);
|
|
9183
9171
|
dependencyModel.trackSubset("core");
|
|
9184
9172
|
var depModelWithParser = withContext(withParser(dependencyModel, this.options.parseBinding));
|
|
@@ -9197,15 +9185,6 @@ var MarkdownPlugin = function() {
|
|
|
9197
9185
|
var previousDeps = previousResult === null || previousResult === void 0 ? void 0 : previousResult.dependencies;
|
|
9198
9186
|
var dataChanged = caresAboutDataChanges(dataChanges, previousDeps);
|
|
9199
9187
|
var shouldUseLastValue = this.hooks.skipResolve.call(!dataChanged, node2, resolveOptions);
|
|
9200
|
-
var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node2)), {
|
|
9201
|
-
parent: partiallyResolvedParent
|
|
9202
|
-
});
|
|
9203
|
-
var _this_hooks_beforeResolve_call;
|
|
9204
|
-
var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
|
|
9205
|
-
type: "empty"
|
|
9206
|
-
};
|
|
9207
|
-
var isNestedMultiNodeWithAsync = resolvedAST.type === "multi-node" && (partiallyResolvedParent === null || partiallyResolvedParent === void 0 ? void 0 : (_partiallyResolvedParent_parent = partiallyResolvedParent.parent) === null || _partiallyResolvedParent_parent === void 0 ? void 0 : (_partiallyResolvedParent_parent_parent = _partiallyResolvedParent_parent.parent) === null || _partiallyResolvedParent_parent_parent === void 0 ? void 0 : _partiallyResolvedParent_parent_parent.type) === "multi-node" && partiallyResolvedParent.parent.type === "value" && ((_resolvedAST_parent = resolvedAST.parent) === null || _resolvedAST_parent === void 0 ? void 0 : _resolvedAST_parent.type) === "asset" && resolvedAST.parent.value.id.includes("async");
|
|
9208
|
-
var isNestedMultiNode = resolvedAST.type === "multi-node" && (partiallyResolvedParent === null || partiallyResolvedParent === void 0 ? void 0 : (_partiallyResolvedParent_parent1 = partiallyResolvedParent.parent) === null || _partiallyResolvedParent_parent1 === void 0 ? void 0 : _partiallyResolvedParent_parent1.type) === "multi-node" && partiallyResolvedParent.type === "value";
|
|
9209
9188
|
if (previousResult && shouldUseLastValue) {
|
|
9210
9189
|
var update2 = _object_spread_props(_object_spread({}, previousResult), {
|
|
9211
9190
|
updated: false
|
|
@@ -9217,6 +9196,30 @@ var MarkdownPlugin = function() {
|
|
|
9217
9196
|
updated: false
|
|
9218
9197
|
});
|
|
9219
9198
|
cacheUpdate.set(AST, resolvedUpdate);
|
|
9199
|
+
if (resolvedUpdate.node.type === "async") {
|
|
9200
|
+
nextAsyncIdMap.set(resolvedUpdate.node.id, resolvedUpdate.node);
|
|
9201
|
+
}
|
|
9202
|
+
var _resolvedUpdate_node_asyncNodesResolved;
|
|
9203
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
9204
|
+
try {
|
|
9205
|
+
for(var _iterator = ((_resolvedUpdate_node_asyncNodesResolved = resolvedUpdate.node.asyncNodesResolved) !== null && _resolvedUpdate_node_asyncNodesResolved !== void 0 ? _resolvedUpdate_node_asyncNodesResolved : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
9206
|
+
var key = _step.value;
|
|
9207
|
+
nextAsyncIdMap.set(key, resolvedUpdate.node);
|
|
9208
|
+
}
|
|
9209
|
+
} catch (err) {
|
|
9210
|
+
_didIteratorError = true;
|
|
9211
|
+
_iteratorError = err;
|
|
9212
|
+
} finally{
|
|
9213
|
+
try {
|
|
9214
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
9215
|
+
_iterator.return();
|
|
9216
|
+
}
|
|
9217
|
+
} finally{
|
|
9218
|
+
if (_didIteratorError) {
|
|
9219
|
+
throw _iteratorError;
|
|
9220
|
+
}
|
|
9221
|
+
}
|
|
9222
|
+
}
|
|
9220
9223
|
var handleChildNode = function(childNode) {
|
|
9221
9224
|
var _prevASTMap_get;
|
|
9222
9225
|
var originalChildNode = (_prevASTMap_get = prevASTMap.get(childNode)) !== null && _prevASTMap_get !== void 0 ? _prevASTMap_get : childNode;
|
|
@@ -9239,10 +9242,37 @@ var MarkdownPlugin = function() {
|
|
|
9239
9242
|
repopulateASTMapFromCache(previousResult, node2, rawParent);
|
|
9240
9243
|
return update2;
|
|
9241
9244
|
}
|
|
9242
|
-
|
|
9243
|
-
|
|
9244
|
-
}
|
|
9245
|
-
|
|
9245
|
+
var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node2)), {
|
|
9246
|
+
parent: partiallyResolvedParent
|
|
9247
|
+
});
|
|
9248
|
+
var _this_hooks_beforeResolve_call;
|
|
9249
|
+
var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
|
|
9250
|
+
type: "empty"
|
|
9251
|
+
};
|
|
9252
|
+
resolvedAST.parent = partiallyResolvedParent;
|
|
9253
|
+
if (resolvedAST.type === "async") {
|
|
9254
|
+
nextAsyncIdMap.set(resolvedAST.id, resolvedAST);
|
|
9255
|
+
}
|
|
9256
|
+
var _resolvedAST_asyncNodesResolved;
|
|
9257
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
9258
|
+
try {
|
|
9259
|
+
for(var _iterator = ((_resolvedAST_asyncNodesResolved = resolvedAST.asyncNodesResolved) !== null && _resolvedAST_asyncNodesResolved !== void 0 ? _resolvedAST_asyncNodesResolved : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
9260
|
+
var id = _step.value;
|
|
9261
|
+
nextAsyncIdMap.set(id, resolvedAST);
|
|
9262
|
+
}
|
|
9263
|
+
} catch (err) {
|
|
9264
|
+
_didIteratorError = true;
|
|
9265
|
+
_iteratorError = err;
|
|
9266
|
+
} finally{
|
|
9267
|
+
try {
|
|
9268
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
9269
|
+
_iterator.return();
|
|
9270
|
+
}
|
|
9271
|
+
} finally{
|
|
9272
|
+
if (_didIteratorError) {
|
|
9273
|
+
throw _iteratorError;
|
|
9274
|
+
}
|
|
9275
|
+
}
|
|
9246
9276
|
}
|
|
9247
9277
|
resolveOptions.node = resolvedAST;
|
|
9248
9278
|
this.ASTMap.set(resolvedAST, node2);
|
|
@@ -9256,7 +9286,7 @@ var MarkdownPlugin = function() {
|
|
|
9256
9286
|
if ("children" in resolvedAST) {
|
|
9257
9287
|
var _resolvedAST_children;
|
|
9258
9288
|
var newChildren = (_resolvedAST_children = resolvedAST.children) === null || _resolvedAST_children === void 0 ? void 0 : _resolvedAST_children.map(function(child) {
|
|
9259
|
-
var computedChildTree = _this.computeTree(child.value, node2, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap);
|
|
9289
|
+
var computedChildTree = _this.computeTree(child.value, node2, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap, nextAsyncIdMap);
|
|
9260
9290
|
var childTreeDeps = computedChildTree.dependencies, childNode = computedChildTree.node, childUpdated = computedChildTree.updated, childValue = computedChildTree.value;
|
|
9261
9291
|
childTreeDeps.forEach(function(binding) {
|
|
9262
9292
|
return childDependencies.add(binding);
|
|
@@ -9277,40 +9307,18 @@ var MarkdownPlugin = function() {
|
|
|
9277
9307
|
resolvedAST.children = newChildren;
|
|
9278
9308
|
} else if (resolvedAST.type === "multi-node") {
|
|
9279
9309
|
var childValue = [];
|
|
9280
|
-
var rawParentToPassIn =
|
|
9281
|
-
|
|
9282
|
-
|
|
9283
|
-
}).filter(function(index2) {
|
|
9284
|
-
return index2 !== -1;
|
|
9285
|
-
});
|
|
9286
|
-
var newValues = resolvedAST.values.map(function(mValue) {
|
|
9287
|
-
var mTree = _this.computeTree(mValue, rawParentToPassIn, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap);
|
|
9310
|
+
var rawParentToPassIn = node2;
|
|
9311
|
+
resolvedAST.values = resolvedAST.values.map(function(mValue) {
|
|
9312
|
+
var mTree = _this.computeTree(mValue, rawParentToPassIn, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap, nextAsyncIdMap);
|
|
9288
9313
|
if (mTree.value !== void 0 && mTree.value !== null) {
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
}
|
|
9292
|
-
|
|
9293
|
-
|
|
9314
|
+
mTree.dependencies.forEach(function(bindingDep) {
|
|
9315
|
+
return childDependencies.add(bindingDep);
|
|
9316
|
+
});
|
|
9317
|
+
updated = updated || mTree.updated;
|
|
9318
|
+
childValue.push(mTree.value);
|
|
9294
9319
|
}
|
|
9295
|
-
mTree.dependencies.forEach(function(bindingDep) {
|
|
9296
|
-
return childDependencies.add(bindingDep);
|
|
9297
|
-
});
|
|
9298
|
-
updated = updated || mTree.updated;
|
|
9299
9320
|
return mTree.node;
|
|
9300
9321
|
});
|
|
9301
|
-
if (hasAsync.length > 0) {
|
|
9302
|
-
var copy = newValues;
|
|
9303
|
-
hasAsync.forEach(function(index2) {
|
|
9304
|
-
var _copy;
|
|
9305
|
-
if (copy[index2]) (_copy = copy).splice.apply(_copy, [
|
|
9306
|
-
index2,
|
|
9307
|
-
1
|
|
9308
|
-
].concat(_to_consumable_array(unpackNode(copy[index2]))));
|
|
9309
|
-
});
|
|
9310
|
-
resolvedAST.values = copy;
|
|
9311
|
-
} else {
|
|
9312
|
-
resolvedAST.values = newValues;
|
|
9313
|
-
}
|
|
9314
9322
|
resolved = childValue;
|
|
9315
9323
|
}
|
|
9316
9324
|
childDependencies.forEach(function(bindingDep) {
|
|
@@ -9331,7 +9339,7 @@ var MarkdownPlugin = function() {
|
|
|
9331
9339
|
value: resolved,
|
|
9332
9340
|
dependencies: /* @__PURE__ */ new Set(_to_consumable_array(dependencyModel.getDependencies()).concat(_to_consumable_array(childDependencies)))
|
|
9333
9341
|
};
|
|
9334
|
-
this.hooks.afterNodeUpdate.call(node2,
|
|
9342
|
+
this.hooks.afterNodeUpdate.call(node2, rawParent, update);
|
|
9335
9343
|
cacheUpdate.set(node2, update);
|
|
9336
9344
|
return update;
|
|
9337
9345
|
}
|
|
@@ -9339,15 +9347,6 @@ var MarkdownPlugin = function() {
|
|
|
9339
9347
|
]);
|
|
9340
9348
|
return Resolver;
|
|
9341
9349
|
}();
|
|
9342
|
-
function unpackAndPush(item, initial) {
|
|
9343
|
-
if (item.asset.values && Array.isArray(item.asset.values)) {
|
|
9344
|
-
item.asset.values.forEach(function(i) {
|
|
9345
|
-
unpackAndPush(i, initial);
|
|
9346
|
-
});
|
|
9347
|
-
} else {
|
|
9348
|
-
initial.push(item);
|
|
9349
|
-
}
|
|
9350
|
-
}
|
|
9351
9350
|
var CrossfieldProvider = /*#__PURE__*/ function() {
|
|
9352
9351
|
function CrossfieldProvider(initialView, parser, logger) {
|
|
9353
9352
|
_class_call_check(this, CrossfieldProvider);
|
|
@@ -9415,9 +9414,11 @@ var MarkdownPlugin = function() {
|
|
|
9415
9414
|
_create_class(ViewInstance, [
|
|
9416
9415
|
{
|
|
9417
9416
|
key: "updateAsync",
|
|
9418
|
-
value: function updateAsync() {
|
|
9417
|
+
value: function updateAsync(asyncNode) {
|
|
9419
9418
|
var _this_resolver;
|
|
9420
|
-
var update = (_this_resolver = this.resolver) === null || _this_resolver === void 0 ? void 0 : _this_resolver.update()
|
|
9419
|
+
var update = (_this_resolver = this.resolver) === null || _this_resolver === void 0 ? void 0 : _this_resolver.update(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set([
|
|
9420
|
+
asyncNode
|
|
9421
|
+
]));
|
|
9421
9422
|
this.lastUpdate = update;
|
|
9422
9423
|
this.hooks.onUpdate.call(update);
|
|
9423
9424
|
}
|
|
@@ -9958,7 +9959,7 @@ var MarkdownPlugin = function() {
|
|
|
9958
9959
|
key: "applyParser",
|
|
9959
9960
|
value: function applyParser(parser) {
|
|
9960
9961
|
parser.hooks.parseNode.tap("multi-node", function(obj, nodeType, options, childOptions) {
|
|
9961
|
-
if (childOptions
|
|
9962
|
+
if ((childOptions === void 0 || !hasTemplateKey(childOptions.key)) && Array.isArray(obj)) {
|
|
9962
9963
|
var values = obj.map(function(childVal) {
|
|
9963
9964
|
return parser.parseObject(childVal, "value", options);
|
|
9964
9965
|
}).filter(function(child) {
|
|
@@ -9969,7 +9970,7 @@ var MarkdownPlugin = function() {
|
|
|
9969
9970
|
}
|
|
9970
9971
|
var multiNode = parser.createASTNode({
|
|
9971
9972
|
type: "multi-node",
|
|
9972
|
-
override: !hasTemplateValues(childOptions.parentObj, childOptions.key),
|
|
9973
|
+
override: childOptions !== void 0 && !hasTemplateValues(childOptions.parentObj, childOptions.key),
|
|
9973
9974
|
values: values
|
|
9974
9975
|
}, obj);
|
|
9975
9976
|
if (!multiNode) {
|
|
@@ -9980,7 +9981,7 @@ var MarkdownPlugin = function() {
|
|
|
9980
9981
|
v.parent = multiNode;
|
|
9981
9982
|
});
|
|
9982
9983
|
}
|
|
9983
|
-
return [
|
|
9984
|
+
return childOptions === void 0 ? multiNode : [
|
|
9984
9985
|
{
|
|
9985
9986
|
path: _to_consumable_array(childOptions.path).concat([
|
|
9986
9987
|
childOptions.key
|