@ch4acko3/dsh-turn-fold 0.5.0 → 0.5.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.
- package/inline-source.cjs +9 -2
- package/package.json +1 -1
package/inline-source.cjs
CHANGED
|
@@ -1207,7 +1207,14 @@ function __ch4acko3DshTurnFoldRender(props) {
|
|
|
1207
1207
|
loc = node.location;
|
|
1208
1208
|
var isTurn = loc !== void 0 && (loc.kind === "turn" || loc.kind === "step");
|
|
1209
1209
|
plan = isTurn ? plans.get(loc.turn.turn) : void 0;
|
|
1210
|
-
var
|
|
1210
|
+
var turnFoldKey = plan === void 0 ? null : String(sessionId) + ":" + plan.turn;
|
|
1211
|
+
// Preserve an in-progress selection only when folding would newly hide one
|
|
1212
|
+
// of its rows. Text already visible inside an open disclosure, or promoted
|
|
1213
|
+
// image results that stay outside it, must not dismantle the fold on rerender.
|
|
1214
|
+
var interactionBlocksFold = plan !== void 0 && turnFoldKey !== null && !__ch4acko3DshTurnFoldOpenKeys.has(turnFoldKey) && plan.activity.some(function (activityKey) {
|
|
1215
|
+
return interactionKeys.has(activityKey) && !__ch4acko3DshTurnFoldIsPromotableImageResult(nodeStore.get(activityKey));
|
|
1216
|
+
});
|
|
1217
|
+
var foldable = plan !== void 0 && plan.status === "closed" && (plan.endReason === "completed" || plan.endReason === "aborted" || plan.endReason === "interrupted") && !plan.hasError && !plan.branchUnavailable && !plan.hasAfterClosing && plan.closingKey !== void 0 && (plan.activity.length > 0 || plan.closingReasoning.length > 0) && !interactionBlocksFold;
|
|
1211
1218
|
if (foldable && FOLD_KINDS[node.kind] === true && key !== plan.closingKey) continue;
|
|
1212
1219
|
var summaryAnchor = plan === void 0 ? void 0 : plan.closingKey !== void 0 && (plan.firstActivityOrder < 0 || plan.closingOrder < plan.firstActivityOrder) ? plan.closingKey : plan.activity[0];
|
|
1213
1220
|
if (plan !== void 0 && !foldable && summaryAnchor !== void 0 && key === summaryAnchor) {
|
|
@@ -1232,7 +1239,7 @@ function __ch4acko3DshTurnFoldRender(props) {
|
|
|
1232
1239
|
orderPositions: orderPositions,
|
|
1233
1240
|
sessionId: sessionId,
|
|
1234
1241
|
termination: plan.endReason === "aborted" || plan.endReason === "interrupted" ? plan.endReason : void 0,
|
|
1235
|
-
foldKey:
|
|
1242
|
+
foldKey: turnFoldKey,
|
|
1236
1243
|
renderNode: renderNode,
|
|
1237
1244
|
t: props.t
|
|
1238
1245
|
}, "ch4acko3-dsh-turn-fold-" + String(sessionId) + "-" + plan.turn) });
|