najm-kit 2.2.6 → 2.2.7
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.mjs +8 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -13232,7 +13232,13 @@ function NDataCardShell({ row, onClick, onContextMenu, actions, children, classN
|
|
|
13232
13232
|
);
|
|
13233
13233
|
}
|
|
13234
13234
|
var DEFAULT_ROWS2 = 6;
|
|
13235
|
-
var
|
|
13235
|
+
var UNMEASURED_ROW_HEIGHT = 56;
|
|
13236
|
+
var UNMEASURED_CHROME_HEIGHT = 300;
|
|
13237
|
+
function estimateUnmeasuredRows() {
|
|
13238
|
+
if (typeof window === "undefined") return DEFAULT_ROWS2;
|
|
13239
|
+
const available = window.innerHeight - UNMEASURED_CHROME_HEIGHT;
|
|
13240
|
+
return Math.max(DEFAULT_ROWS2, Math.floor(available / UNMEASURED_ROW_HEIGHT));
|
|
13241
|
+
}
|
|
13236
13242
|
var DEFAULT_CARD_COUNT = 48;
|
|
13237
13243
|
function NTableCardSkeleton({ surface }) {
|
|
13238
13244
|
return /* @__PURE__ */ jsx(
|
|
@@ -13379,7 +13385,7 @@ function NTableLoadingSkeleton({ rows }) {
|
|
|
13379
13385
|
const userGetRowCanExpand = useTableStore.use.getRowCanExpand();
|
|
13380
13386
|
const hasExpansion = Boolean(renderSubRow || userGetRowCanExpand);
|
|
13381
13387
|
const loadingText = useTableStore.use.loadingText();
|
|
13382
|
-
const rowCount = rows ?? (dynamicHeight ? bodyHeight > 0 ? skeletonRowCount :
|
|
13388
|
+
const rowCount = rows ?? (dynamicHeight ? bodyHeight > 0 ? skeletonRowCount : estimateUnmeasuredRows() : DEFAULT_ROWS2);
|
|
13383
13389
|
const renderHeaderLabel = (header) => typeof header === "string" ? header : null;
|
|
13384
13390
|
return /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-2", children: [
|
|
13385
13391
|
/* @__PURE__ */ jsx(NTableHeaderSkeleton, {}),
|