postgres-query-box 0.0.0-stage → 0.1.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,42 @@
1
+ import type { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react'
2
+ import type { Ast, Schema } from './core'
3
+
4
+ export * from './core'
5
+
6
+ export interface SavedQuery {
7
+ id: string
8
+ name: string
9
+ query: string
10
+ pinned?: boolean
11
+ }
12
+
13
+ export interface PostgresQueryBoxHandle {
14
+ focus(): void
15
+ run(): void
16
+ setText(text: string): void
17
+ getText(): string
18
+ }
19
+
20
+ export interface PostgresQueryBoxProps {
21
+ schema: Schema
22
+ value?: string
23
+ defaultValue?: string
24
+ onChange?: (text: string) => void
25
+ onRun?: (text: string, ast: Ast | null) => void
26
+ placeholder?: string
27
+ runLabel?: string
28
+ tools?: ReactNode
29
+ saved?: SavedQuery[]
30
+ savedCount?: number
31
+ savedLoading?: boolean
32
+ onSelectSaved?: (saved: SavedQuery) => void
33
+ onPinSaved?: (saved: SavedQuery, pinned: boolean) => void
34
+ onSaveQuery?: (draft: { name: string; query: string; pinned: boolean }) => void
35
+ onDeleteSaved?: (saved: SavedQuery) => void
36
+ onUpdateSaved?: (saved: SavedQuery, changes: { name: string; query?: string; pinned?: boolean }) => void
37
+ onSavedSearch?: (text: string) => void
38
+ onCreateAlert?: (query: string, ast: Ast | null) => void
39
+ className?: string
40
+ }
41
+
42
+ export declare const PostgresQueryBox: ForwardRefExoticComponent<PostgresQueryBoxProps & RefAttributes<PostgresQueryBoxHandle>>
@@ -0,0 +1,42 @@
1
+ import type { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react'
2
+ import type { Ast, Schema } from './core'
3
+
4
+ export * from './core'
5
+
6
+ export interface SavedQuery {
7
+ id: string
8
+ name: string
9
+ query: string
10
+ pinned?: boolean
11
+ }
12
+
13
+ export interface PostgresQueryBoxHandle {
14
+ focus(): void
15
+ run(): void
16
+ setText(text: string): void
17
+ getText(): string
18
+ }
19
+
20
+ export interface PostgresQueryBoxProps {
21
+ schema: Schema
22
+ value?: string
23
+ defaultValue?: string
24
+ onChange?: (text: string) => void
25
+ onRun?: (text: string, ast: Ast | null) => void
26
+ placeholder?: string
27
+ runLabel?: string
28
+ tools?: ReactNode
29
+ saved?: SavedQuery[]
30
+ savedCount?: number
31
+ savedLoading?: boolean
32
+ onSelectSaved?: (saved: SavedQuery) => void
33
+ onPinSaved?: (saved: SavedQuery, pinned: boolean) => void
34
+ onSaveQuery?: (draft: { name: string; query: string; pinned: boolean }) => void
35
+ onDeleteSaved?: (saved: SavedQuery) => void
36
+ onUpdateSaved?: (saved: SavedQuery, changes: { name: string; query?: string; pinned?: boolean }) => void
37
+ onSavedSearch?: (text: string) => void
38
+ onCreateAlert?: (query: string, ast: Ast | null) => void
39
+ className?: string
40
+ }
41
+
42
+ export declare const PostgresQueryBox: ForwardRefExoticComponent<PostgresQueryBoxProps & RefAttributes<PostgresQueryBoxHandle>>