@standardbeagle/edit-db 0.4.446 → 0.4.448
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/edit-db.css +1 -1
- package/dist/editor.d.ts +6 -1
- package/dist/editor.es.js +2286 -2270
- package/dist/editor.umd.cjs +20 -20
- package/dist/hooks/useEditorConfig.d.ts +19 -0
- package/dist/hooks/useTableStats.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Optional, opt-in editor features. Kept tiny and separate from the data/schema
|
|
4
|
+
* contexts so feature flags don't force those providers to re-render and so
|
|
5
|
+
* TableList can read flags without prop-drilling through the router.
|
|
6
|
+
*/
|
|
7
|
+
export interface EditorConfig {
|
|
8
|
+
/**
|
|
9
|
+
* Show per-table statistics (row-count bars, column/FK counts) in the table
|
|
10
|
+
* list. Off by default: it issues a row-count query per table, which a host
|
|
11
|
+
* may not want on every connect. Hosts opt in via `<Editor showStats />`.
|
|
12
|
+
*/
|
|
13
|
+
showStats: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function EditorConfigProvider({ config, children }: {
|
|
16
|
+
config: EditorConfig;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function useEditorConfig(): EditorConfig;
|
|
@@ -49,7 +49,7 @@ export interface UseTableStatsResult {
|
|
|
49
49
|
*
|
|
50
50
|
* @returns Table statistics map and loading state
|
|
51
51
|
*/
|
|
52
|
-
export declare function useTableStats(): UseTableStatsResult;
|
|
52
|
+
export declare function useTableStats(enabled?: boolean): UseTableStatsResult;
|
|
53
53
|
/**
|
|
54
54
|
* Formats a number into an abbreviated string representation.
|
|
55
55
|
*
|