@rickcedwhat/playwright-smart-table 6.20.1-next.687b7c4 → 6.20.1-next.720a2e5

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.
@@ -63,9 +63,12 @@ async function runMap(env, callback, options = {}, label = 'map') {
63
63
  // #384: overscan rows ABOVE the visible range have already scrolled past and will never
64
64
  // re-enter the viewport — collect them now. Only defer rows BELOW the visible range
65
65
  // (they'll scroll into view on a later page).
66
+ //
67
+ // #417 follow-up: skip viewport filtering on the final scan — there are no more pages
68
+ // to defer to, so collect all remaining unseen rows regardless of visibility.
66
69
  let candidateIndices = allIndices;
67
70
  const getVisibleRowIndices = (_f = env.config.strategies.viewport) === null || _f === void 0 ? void 0 : _f.getVisibleRowIndices;
68
- if (getVisibleRowIndices) {
71
+ if (getVisibleRowIndices && !reachedEnd) {
69
72
  const visible = new Set(await getVisibleRowIndices(env.getContext()));
70
73
  const minVisible = visible.size > 0 ? Math.min(...visible) : Infinity;
71
74
  candidateIndices = allIndices.filter(idx => visible.has(idx) || idx < minVisible);
@@ -3,4 +3,4 @@
3
3
  * Generated by scripts/embed-version.mjs from package.json
4
4
  */
5
5
  /** Semver of this package. Use in logs or diagnostics to confirm the installed build. */
6
- export declare const PLAYWRIGHT_SMART_TABLE_VERSION: "6.20.1-next.687b7c4";
6
+ export declare const PLAYWRIGHT_SMART_TABLE_VERSION: "6.20.1-next.720a2e5";
@@ -6,4 +6,4 @@ exports.PLAYWRIGHT_SMART_TABLE_VERSION = void 0;
6
6
  * Generated by scripts/embed-version.mjs from package.json
7
7
  */
8
8
  /** Semver of this package. Use in logs or diagnostics to confirm the installed build. */
9
- exports.PLAYWRIGHT_SMART_TABLE_VERSION = "6.20.1-next.687b7c4";
9
+ exports.PLAYWRIGHT_SMART_TABLE_VERSION = "6.20.1-next.720a2e5";
@@ -18,7 +18,8 @@ class ElementTracker {
18
18
  const seenMap = win[trackerId];
19
19
  const newIndices = [];
20
20
  elements.forEach((el, index) => {
21
- const signature = el.textContent || '';
21
+ const htmlEl = el;
22
+ const signature = htmlEl.offsetTop + '|' + (el.textContent || '');
22
23
  if (seenMap.get(el) !== signature) {
23
24
  newIndices.push(index);
24
25
  }
@@ -39,8 +40,10 @@ class ElementTracker {
39
40
  const seenMap = win[trackerId];
40
41
  for (const index of indicesToCommit) {
41
42
  const el = elements[index];
42
- if (el)
43
- seenMap.set(el, el.textContent || '');
43
+ if (el) {
44
+ const htmlEl = el;
45
+ seenMap.set(el, htmlEl.offsetTop + '|' + (el.textContent || ''));
46
+ }
44
47
  }
45
48
  }, [this.id, indices]);
46
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rickcedwhat/playwright-smart-table",
3
- "version": "6.20.1-next.687b7c4",
3
+ "version": "6.20.1-next.720a2e5",
4
4
  "description": "Smart, column-aware table interactions for Playwright",
5
5
  "author": "Cedrick Catalan",
6
6
  "license": "MIT",