schummar-table 0.10.5 → 0.11.0
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/cjs/index.js +55 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.js +55 -13
- package/dist/es/index.js.map +1 -1
- package/dist/types/components/table.d.ts +1 -0
- package/dist/types/internalState/tableStateStorage.d.ts +3 -1
- package/dist/types/internalState/useTableState.d.ts +1 -1
- package/dist/types/misc/queue.d.ts +1 -0
- package/dist/types/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Store } from 'schummar-state/react';
|
|
3
3
|
import { Id, InternalTableState, TableProps } from '../types';
|
|
4
4
|
export declare const TableContext: React.Context<Store<InternalTableState<any>> | null>;
|
|
5
|
+
export declare const TableResetContext: React.Context<() => void>;
|
|
5
6
|
export declare const ColumnContext: React.Context<Id | null>;
|
|
6
7
|
export declare function useTableContext<T>(): Store<InternalTableState<T>>;
|
|
7
8
|
export declare function useColumnContext(): Id;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Store } from 'schummar-state/react';
|
|
2
|
+
import { InternalTableState } from '../types';
|
|
1
3
|
export declare type TableStateStorage = {
|
|
2
4
|
getItem: (key: string) => string | null | Promise<string | null>;
|
|
3
5
|
setItem: (key: string, value: string) => unknown | Promise<unknown>;
|
|
@@ -8,4 +10,4 @@ export declare type TableStateStorage = {
|
|
|
8
10
|
length: number | (() => number | Promise<number>);
|
|
9
11
|
key: (keyIndex: number) => string | null | Promise<string | null>;
|
|
10
12
|
});
|
|
11
|
-
export declare function useTableStateStorage(): boolean;
|
|
13
|
+
export declare function useTableStateStorage(table: Store<InternalTableState<any>>): readonly [boolean, () => Promise<void>];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Store } from 'schummar-state/react';
|
|
2
2
|
import { InternalTableState, TableProps } from '../types';
|
|
3
|
-
export declare function useTableState<T>(_props: TableProps<T>): Store<InternalTableState<T
|
|
3
|
+
export declare function useTableState<T>(_props: TableProps<T>): [Store<InternalTableState<T>>, () => void];
|
package/dist/types/types.d.ts
CHANGED