@olares/lares-core 0.15.20 → 0.15.21
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/larepass/process-fold.js
CHANGED
|
@@ -221,7 +221,7 @@ export function transcriptBlocks(items, { running = false } = {}) {
|
|
|
221
221
|
if (showHeader && !folded && memberSet.has(entry)) {
|
|
222
222
|
blocks.push({
|
|
223
223
|
kind: "fold",
|
|
224
|
-
key: `fold-${group.turn ?? `g${groupIndex}`}-${entry.index}`,
|
|
224
|
+
key: `fold-${group.turn ?? `g${groupIndex}`}-${entry.row?.key || entry.row?.id || entry.index}`,
|
|
225
225
|
phase,
|
|
226
226
|
foldable,
|
|
227
227
|
reason,
|
|
@@ -232,7 +232,12 @@ export function transcriptBlocks(items, { running = false } = {}) {
|
|
|
232
232
|
folded = true;
|
|
233
233
|
}
|
|
234
234
|
if (memberSet.has(entry) && showHeader) continue;
|
|
235
|
-
blocks.push({
|
|
235
|
+
blocks.push({
|
|
236
|
+
kind: "row",
|
|
237
|
+
key: entry.row?.key || entry.row?.id || `row-${entry.index}`,
|
|
238
|
+
index: entry.index,
|
|
239
|
+
row: entry.row,
|
|
240
|
+
});
|
|
236
241
|
}
|
|
237
242
|
});
|
|
238
243
|
return blocks;
|
package/larepass/transcript.js
CHANGED
|
@@ -152,6 +152,9 @@ export function foldTranscript(entries) {
|
|
|
152
152
|
};
|
|
153
153
|
|
|
154
154
|
const putBlock = (turn, step, index, row) => {
|
|
155
|
+
// The block is one row for its whole life. Keying it by the event being
|
|
156
|
+
// folded makes the key change on every chunk, and the list remounts.
|
|
157
|
+
row.key = `block:${blockKey(turn, step, index)}:${row.type}`;
|
|
155
158
|
const stored = upsert(items, blocks, blockKey(turn, step, index), tag(row));
|
|
156
159
|
// The turn's readings belong under its closing reply, the row whose action
|
|
157
160
|
// bar ends the turn on screen.
|