@ai-matrx/design-system 0.20.12 → 0.20.14

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.20.14
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/design-system/v0.20.13..npm/design-system/v0.20.14 -- apps/shared/design-system`).
7
+ No source changes intended and no consumer action required.
8
+
9
+ ## 0.20.13
10
+
11
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
12
+ `git diff npm/design-system/v0.20.12..npm/design-system/v0.20.13 -- apps/shared/design-system`).
13
+ No source changes intended and no consumer action required.
14
+
3
15
  ## 0.20.12
4
16
 
5
17
  Automatic changed-only republish (docs/metadata drift since the last tag — see
@@ -1338,7 +1338,8 @@ function useProgressiveTableRows({
1338
1338
  containers = [],
1339
1339
  onPageAdvance,
1340
1340
  enabled = true,
1341
- thresholdPx
1341
+ thresholdPx,
1342
+ numberedPageHasMore = false
1342
1343
  }) {
1343
1344
  const pageSize = safePageSize(rawPageSize);
1344
1345
  const hasExplicitRequestedPage = rawRequestedPage !== void 0;
@@ -1400,7 +1401,7 @@ function useProgressiveTableRows({
1400
1401
  };
1401
1402
  const warnedUnderfill = (0, import_react4.useRef)(null);
1402
1403
  (0, import_react4.useEffect)(() => {
1403
- if (!hasMore) return;
1404
+ if (!hasMore && !numberedPageHasMore) return;
1404
1405
  const surfaces = containers.map((entry) => entry && "current" in entry ? entry.current : entry).filter((entry) => entry !== null);
1405
1406
  const fillViewport = () => {
1406
1407
  for (const surface of surfaces) {
@@ -1412,8 +1413,11 @@ function useProgressiveTableRows({
1412
1413
  if (contentBottom <= 0 || contentBottom >= surface.clientHeight - 1) continue;
1413
1414
  if (warnedUnderfill.current !== progressionKey) {
1414
1415
  warnedUnderfill.current = progressionKey;
1415
- console.warn("[MatrxDataTable] The initial local batch leaves unused table height while more rows are already loaded. Revealing additional rows to fill the viewport; this is not a network fetch.");
1416
+ if (numberedPageHasMore) {
1417
+ console.warn("[MatrxDataTable] Numbered pagination leaves unused table height while later pages exist. Increase the page size, use a content-sized layout, or use progressive pagination to fill available height. The explicit numbered-page setting has been preserved.");
1418
+ } else console.warn("[MatrxDataTable] The initial local batch leaves unused table height while more rows are already loaded. Revealing additional rows to fill the viewport; this is not a network fetch.");
1416
1419
  }
1420
+ if (numberedPageHasMore) break;
1417
1421
  setProgression((current) => {
1418
1422
  if (current.key !== progressionKey) return current;
1419
1423
  const nextCount = Math.min(rows.length, visibleCount + pageSize);
@@ -1426,7 +1430,7 @@ function useProgressiveTableRows({
1426
1430
  const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(fillViewport);
1427
1431
  for (const surface of surfaces) observer?.observe(surface);
1428
1432
  return () => observer?.disconnect();
1429
- }, [containers, hasMore, pageSize, progressionKey, rows.length, visibleCount]);
1433
+ }, [containers, hasMore, numberedPageHasMore, pageSize, progressionKey, rows.length, visibleCount]);
1430
1434
  const scroll = useScrollPagination({
1431
1435
  containers,
1432
1436
  queryKey: progressionKey,
@@ -9064,6 +9068,7 @@ function MatrxDataTableCore({
9064
9068
  }),
9065
9069
  containers: [scrollRef, cardsScrollRef],
9066
9070
  enabled: localProgressiveEnabled,
9071
+ numberedPageHasMore: !hidePagination && !isLoading && !isFetching && processed.length > 0 && safePage < pageCount && (remoteQuery?.mode === "controlled" || !remoteQuery && localPagination?.mode === "numbered"),
9067
9072
  onPageAdvance: setPage
9068
9073
  });
9069
9074
  const paginated = (0, import_react18.useMemo)(() => {