footprint-explainable-ui 0.11.3 → 0.11.5
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/index.cjs +19 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2456,8 +2456,22 @@ function StoryNarrative({
|
|
|
2456
2456
|
}
|
|
2457
2457
|
return entries.length;
|
|
2458
2458
|
}, [entries, revealedStages]);
|
|
2459
|
-
const revealed =
|
|
2460
|
-
|
|
2459
|
+
const revealed = (0, import_react11.useMemo)(() => {
|
|
2460
|
+
const raw = entries.slice(0, revealedCount);
|
|
2461
|
+
return raw.filter((e) => {
|
|
2462
|
+
const sfId = e.subflowId;
|
|
2463
|
+
if (!sfId && e.type !== "subflow") return true;
|
|
2464
|
+
return false;
|
|
2465
|
+
});
|
|
2466
|
+
}, [entries, revealedCount]);
|
|
2467
|
+
const futureCount = (0, import_react11.useMemo)(() => {
|
|
2468
|
+
let count = 0;
|
|
2469
|
+
for (let i = revealedCount; i < entries.length; i++) {
|
|
2470
|
+
const e = entries[i];
|
|
2471
|
+
if (!e.subflowId && entries[i].type !== "subflow") count++;
|
|
2472
|
+
}
|
|
2473
|
+
return count;
|
|
2474
|
+
}, [entries, revealedCount]);
|
|
2461
2475
|
const latestRef = (0, import_react11.useRef)(null);
|
|
2462
2476
|
(0, import_react11.useEffect)(() => {
|
|
2463
2477
|
latestRef.current?.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
@@ -2533,16 +2547,16 @@ function StoryNarrative({
|
|
|
2533
2547
|
i
|
|
2534
2548
|
);
|
|
2535
2549
|
}),
|
|
2536
|
-
|
|
2550
|
+
futureCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { style: {
|
|
2537
2551
|
opacity: 0.3,
|
|
2538
2552
|
fontSize: fs.small,
|
|
2539
2553
|
color: theme.textMuted,
|
|
2540
2554
|
padding: `8px 0`,
|
|
2541
2555
|
fontStyle: "italic"
|
|
2542
2556
|
}, children: [
|
|
2543
|
-
|
|
2557
|
+
futureCount,
|
|
2544
2558
|
" more ",
|
|
2545
|
-
|
|
2559
|
+
futureCount === 1 ? "entry" : "entries",
|
|
2546
2560
|
" ahead..."
|
|
2547
2561
|
] })
|
|
2548
2562
|
]
|