simple-table-core 3.0.2 → 3.0.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/README.md +12 -6
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/src/core/rendering/RenderOrchestrator.d.ts +7 -0
- package/dist/cjs/src/managers/ScrollManager.d.ts +3 -0
- package/dist/cjs/src/utils/rowProcessing.d.ts +19 -0
- package/dist/index.es.js +1 -1
- package/dist/src/core/rendering/RenderOrchestrator.d.ts +7 -0
- package/dist/src/managers/ScrollManager.d.ts +3 -0
- package/dist/src/utils/rowProcessing.d.ts +19 -0
- package/package.json +1 -1
|
@@ -92,6 +92,13 @@ export declare class RenderOrchestrator {
|
|
|
92
92
|
private lastRowsRef;
|
|
93
93
|
private flattenedRowsCache;
|
|
94
94
|
private lastProcessedResult;
|
|
95
|
+
/** Fingerprint for skipping pagination + height-map work on vertical scroll frames. */
|
|
96
|
+
private processRowsScrollReuseKey;
|
|
97
|
+
private processRowsScrollReuseBase;
|
|
98
|
+
/** Last painted virtual row range on scroll-raf; when unchanged, DOM work is redundant (native scroll moves content). */
|
|
99
|
+
private lastScrollRafPaintedRange;
|
|
100
|
+
/** Reuse normalized headers across scroll frames when layout inputs are unchanged. */
|
|
101
|
+
private scrollRafHeadersMemo;
|
|
95
102
|
constructor();
|
|
96
103
|
getCachedFlattenResult(): FlattenRowsResult | null;
|
|
97
104
|
getLastProcessedResult(): ProcessRowsResult | null;
|
|
@@ -19,10 +19,13 @@ export declare class ScrollManager {
|
|
|
19
19
|
private subscribers;
|
|
20
20
|
private lastScrollTop;
|
|
21
21
|
private scrollTimeoutId;
|
|
22
|
+
/** Coalesce scroll-driven subscriber notifications to one rAF (avoids sync storms + reflow). */
|
|
23
|
+
private notifySubscribersRafId;
|
|
22
24
|
constructor(config: ScrollManagerConfig);
|
|
23
25
|
updateConfig(config: Partial<ScrollManagerConfig>): void;
|
|
24
26
|
subscribe(callback: StateChangeCallback): () => void;
|
|
25
27
|
private notifySubscribers;
|
|
28
|
+
private scheduleNotifySubscribersFromScroll;
|
|
26
29
|
handleScroll(scrollTop: number, scrollLeft: number, containerHeight: number, contentHeight: number): void;
|
|
27
30
|
setScrolling(isScrolling: boolean): void;
|
|
28
31
|
getState(): ScrollManagerState;
|
|
@@ -34,3 +34,22 @@ export interface ProcessRowsResult {
|
|
|
34
34
|
heightMap: CumulativeHeightMap | undefined;
|
|
35
35
|
}
|
|
36
36
|
export declare function processRows(config: ProcessRowsConfig): ProcessRowsResult;
|
|
37
|
+
/** Layout inputs that do not depend on scroll position (reuse across scroll-raf frames). */
|
|
38
|
+
export interface ProcessRowsScrollReuseBase {
|
|
39
|
+
currentTableRows: TableRow[];
|
|
40
|
+
paginatedHeightOffsets: HeightOffsets | undefined;
|
|
41
|
+
heightMap: CumulativeHeightMap | undefined;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Recomputes only viewport-dependent fields when pagination, height map, and row list
|
|
45
|
+
* are unchanged (vertical scroll only). Avoids re-running applyPagination and
|
|
46
|
+
* buildCumulativeHeightMap on every scroll frame.
|
|
47
|
+
*/
|
|
48
|
+
export declare function recomputeProcessRowsViewport(base: ProcessRowsScrollReuseBase, config: {
|
|
49
|
+
contentHeight: number | undefined;
|
|
50
|
+
rowHeight: number;
|
|
51
|
+
scrollTop: number;
|
|
52
|
+
scrollDirection?: "up" | "down" | "none";
|
|
53
|
+
enableStickyParents: boolean;
|
|
54
|
+
rowGrouping?: Accessor[];
|
|
55
|
+
}): ProcessRowsResult;
|