@simple-table/react 4.0.0 → 4.0.1
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.
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type Row from "../types/Row";
|
|
2
|
+
import type { GetRowId } from "../types/GetRowId";
|
|
3
|
+
/** Mark and return a fresh empty row used as an `isLoading` skeleton placeholder. */
|
|
4
|
+
export declare const createLoadingPlaceholderRow: () => Row;
|
|
5
|
+
export declare const isLoadingPlaceholderRow: (row: Row) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Consumer `getRowId` often collapses empty placeholders to the same key.
|
|
8
|
+
* Skip it for placeholders so WeakMap identity / positional ids stay unique.
|
|
9
|
+
*/
|
|
10
|
+
export declare const wrapGetRowIdForLoadingPlaceholders: (getRowId: GetRowId | undefined) => GetRowId | undefined;
|
|
11
|
+
export declare const createLoadingPlaceholderRows: (count: number) => Row[];
|
|
@@ -44,8 +44,8 @@ export declare function collectHeaderAccessors(headers: ReadonlyArray<HeaderStru
|
|
|
44
44
|
* invisible — callers must pass new object identities when data changes.
|
|
45
45
|
*/
|
|
46
46
|
export declare function shallowEqualRow(a: object, b: object): boolean;
|
|
47
|
-
/** Compatible with `GetRowId`; return may be
|
|
48
|
-
export type GetRowIdLike = (params: GetRowIdParams) => string | number | undefined;
|
|
47
|
+
/** Compatible with `GetRowId`; return may be nullish for sync helpers. */
|
|
48
|
+
export type GetRowIdLike = (params: GetRowIdParams) => string | number | null | undefined;
|
|
49
49
|
/**
|
|
50
50
|
* Above this length, skip per-field shallow compares when row object identity
|
|
51
51
|
* differs. Same-array-ref and same-row-object cases stay O(1) / O(n) pointer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simple-table/react",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"types": "dist/types/react/src/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"react-dom": ">=18.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"simple-table-core": "4.0.
|
|
32
|
+
"simple-table-core": "4.0.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@rollup/plugin-alias": "^4.0.4",
|