@krak-stack/registry 0.1.9 → 0.1.10
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 +2 -0
- package/dist/components/ui/data-table.d.ts +130 -19
- package/dist/components/ui/data-table.js +1515 -1312
- package/dist/components/ui/form.d.ts +5 -5
- package/dist/components/ui/sidebar-layout.d.ts +1 -0
- package/dist/components/ui/sidebar-layout.js +6 -1
- package/dist/lib/docs-ai.d.ts +6 -0
- package/dist/lib/docs-ai.js +3 -0
- package/dist/lib/docs-core.d.ts +52 -0
- package/dist/lib/docs-core.js +46 -4
- package/dist/services/file-extraction/index.d.ts +70 -0
- package/dist/services/file-extraction/index.js +119 -0
- package/dist/services/file-extraction/schema.d.ts +13 -0
- package/dist/services/file-extraction/schema.js +14 -0
- package/package.json +14 -2
package/README.md
CHANGED
|
@@ -21,6 +21,8 @@ import { createMdxDocsSource, makeDocs } from "@krak-stack/registry/docs";
|
|
|
21
21
|
import { makeChatDocumentation } from "@krak-stack/registry/docs-ai";
|
|
22
22
|
import { Query } from "@krak-stack/registry/query";
|
|
23
23
|
import { createSeo } from "@krak-stack/registry/seo";
|
|
24
|
+
import { FileExtractionService } from "@krak-stack/registry/service-file-extraction";
|
|
25
|
+
import { FileExtractedTextSchema } from "@krak-stack/registry/service-file-extraction/schema";
|
|
24
26
|
import { NotificationService } from "@krak-stack/registry/service-notification";
|
|
25
27
|
```
|
|
26
28
|
|
|
@@ -1,13 +1,112 @@
|
|
|
1
1
|
import { type PaginationMessages } from "./pagination.js";
|
|
2
|
-
import { type ValidateFromPath } from "@tanstack/react-router";
|
|
3
|
-
import { type Column, type ColumnDef, type Header, type RowData, type Table as TanstackTable, type VisibilityState } from "@tanstack/react-table";
|
|
4
|
-
declare module "@tanstack/react-table" {
|
|
5
|
-
interface ColumnMeta<TData extends RowData, TValue> {
|
|
6
|
-
truncate?: boolean;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
import { type HTMLAttributes, type ReactNode } from "react";
|
|
10
2
|
import { Schema } from "effect";
|
|
3
|
+
import { type HTMLAttributes, type ReactNode } from "react";
|
|
4
|
+
import { type ValidateFromPath } from "@tanstack/react-router";
|
|
5
|
+
import { type Column, type ColumnDef, type Header, type RowData, type ColumnVisibilityState, type AppReactTable, type TableState } from "@tanstack/react-table";
|
|
6
|
+
type DataTableColumnMeta = {
|
|
7
|
+
truncate?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const dataTableFeatures: {
|
|
10
|
+
columnFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
11
|
+
columnResizingFeature: import("@tanstack/react-table").TableFeature;
|
|
12
|
+
columnSizingFeature: import("@tanstack/react-table").TableFeature;
|
|
13
|
+
columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
|
|
14
|
+
globalFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
15
|
+
rowPaginationFeature: import("@tanstack/react-table").TableFeature;
|
|
16
|
+
rowSelectionFeature: import("@tanstack/react-table").TableFeature;
|
|
17
|
+
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
18
|
+
filteredRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
19
|
+
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
20
|
+
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
21
|
+
columnMeta: DataTableColumnMeta;
|
|
22
|
+
};
|
|
23
|
+
export declare const createDataTableColumnHelper: <TData extends RowData>() => import("@tanstack/react-table").AppColumnHelper<{
|
|
24
|
+
columnFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
25
|
+
columnResizingFeature: import("@tanstack/react-table").TableFeature;
|
|
26
|
+
columnSizingFeature: import("@tanstack/react-table").TableFeature;
|
|
27
|
+
columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
|
|
28
|
+
globalFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
29
|
+
rowPaginationFeature: import("@tanstack/react-table").TableFeature;
|
|
30
|
+
rowSelectionFeature: import("@tanstack/react-table").TableFeature;
|
|
31
|
+
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
32
|
+
filteredRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
33
|
+
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
34
|
+
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
35
|
+
columnMeta: DataTableColumnMeta;
|
|
36
|
+
}, TData, {}, {}>, useDataTable: <TData extends RowData, TSelected = import("@tanstack/react-table").TableState_ColumnFiltering & import("@tanstack/react-table").TableState_ColumnResizing & import("@tanstack/react-table").TableState_ColumnSizing & import("@tanstack/react-table").TableState_ColumnVisibility & import("@tanstack/react-table").TableState_GlobalFiltering & import("@tanstack/react-table").TableState_RowPagination & import("@tanstack/react-table").TableState_RowSelection & import("@tanstack/react-table").TableState_RowSorting>(tableOptions: Omit<import("@tanstack/react-table").TableOptions<{
|
|
37
|
+
columnFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
38
|
+
columnResizingFeature: import("@tanstack/react-table").TableFeature;
|
|
39
|
+
columnSizingFeature: import("@tanstack/react-table").TableFeature;
|
|
40
|
+
columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
|
|
41
|
+
globalFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
42
|
+
rowPaginationFeature: import("@tanstack/react-table").TableFeature;
|
|
43
|
+
rowSelectionFeature: import("@tanstack/react-table").TableFeature;
|
|
44
|
+
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
45
|
+
filteredRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
46
|
+
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
47
|
+
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
48
|
+
columnMeta: DataTableColumnMeta;
|
|
49
|
+
}, TData>, "features">, selector?: ((state: import("@tanstack/react-table").TableState_ColumnFiltering & import("@tanstack/react-table").TableState_ColumnResizing & import("@tanstack/react-table").TableState_ColumnSizing & import("@tanstack/react-table").TableState_ColumnVisibility & import("@tanstack/react-table").TableState_GlobalFiltering & import("@tanstack/react-table").TableState_RowPagination & import("@tanstack/react-table").TableState_RowSelection & import("@tanstack/react-table").TableState_RowSorting) => TSelected) | undefined) => AppReactTable<{
|
|
50
|
+
columnFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
51
|
+
columnResizingFeature: import("@tanstack/react-table").TableFeature;
|
|
52
|
+
columnSizingFeature: import("@tanstack/react-table").TableFeature;
|
|
53
|
+
columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
|
|
54
|
+
globalFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
55
|
+
rowPaginationFeature: import("@tanstack/react-table").TableFeature;
|
|
56
|
+
rowSelectionFeature: import("@tanstack/react-table").TableFeature;
|
|
57
|
+
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
58
|
+
filteredRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
59
|
+
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
60
|
+
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
61
|
+
columnMeta: DataTableColumnMeta;
|
|
62
|
+
}, TData, TSelected, {}, {}, {}>, useDataTableCellContext: <TValue extends import("@tanstack/react-table").CellData = unknown>() => import("@tanstack/react-table").Cell_Core<{
|
|
63
|
+
columnFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
64
|
+
columnResizingFeature: import("@tanstack/react-table").TableFeature;
|
|
65
|
+
columnSizingFeature: import("@tanstack/react-table").TableFeature;
|
|
66
|
+
columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
|
|
67
|
+
globalFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
68
|
+
rowPaginationFeature: import("@tanstack/react-table").TableFeature;
|
|
69
|
+
rowSelectionFeature: import("@tanstack/react-table").TableFeature;
|
|
70
|
+
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
71
|
+
filteredRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
72
|
+
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
73
|
+
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
74
|
+
columnMeta: DataTableColumnMeta;
|
|
75
|
+
}, any, TValue> & {
|
|
76
|
+
FlexRender: () => ReactNode;
|
|
77
|
+
}, useDataTableHeaderContext: <TValue extends import("@tanstack/react-table").CellData = unknown>() => import("@tanstack/react-table").Header_Core<{
|
|
78
|
+
columnFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
79
|
+
columnResizingFeature: import("@tanstack/react-table").TableFeature;
|
|
80
|
+
columnSizingFeature: import("@tanstack/react-table").TableFeature;
|
|
81
|
+
columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
|
|
82
|
+
globalFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
83
|
+
rowPaginationFeature: import("@tanstack/react-table").TableFeature;
|
|
84
|
+
rowSelectionFeature: import("@tanstack/react-table").TableFeature;
|
|
85
|
+
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
86
|
+
filteredRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
87
|
+
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
88
|
+
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
89
|
+
columnMeta: DataTableColumnMeta;
|
|
90
|
+
}, any, TValue> & import("@tanstack/react-table").Header_ColumnResizing & import("@tanstack/react-table").Header_ColumnSizing & {
|
|
91
|
+
FlexRender: () => ReactNode;
|
|
92
|
+
}, useDataTableContext: <TData extends RowData = RowData, TSelected = import("@tanstack/react-table").TableState_ColumnFiltering & import("@tanstack/react-table").TableState_ColumnResizing & import("@tanstack/react-table").TableState_ColumnSizing & import("@tanstack/react-table").TableState_ColumnVisibility & import("@tanstack/react-table").TableState_GlobalFiltering & import("@tanstack/react-table").TableState_RowPagination & import("@tanstack/react-table").TableState_RowSelection & import("@tanstack/react-table").TableState_RowSorting>() => AppReactTable<{
|
|
93
|
+
columnFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
94
|
+
columnResizingFeature: import("@tanstack/react-table").TableFeature;
|
|
95
|
+
columnSizingFeature: import("@tanstack/react-table").TableFeature;
|
|
96
|
+
columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
|
|
97
|
+
globalFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
98
|
+
rowPaginationFeature: import("@tanstack/react-table").TableFeature;
|
|
99
|
+
rowSelectionFeature: import("@tanstack/react-table").TableFeature;
|
|
100
|
+
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
101
|
+
filteredRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
102
|
+
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
103
|
+
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
104
|
+
columnMeta: DataTableColumnMeta;
|
|
105
|
+
}, TData, TSelected, {}, {}, {}>;
|
|
106
|
+
export type DataTableColumnDef<TData extends RowData, TValue = unknown> = ColumnDef<typeof dataTableFeatures, TData, TValue>;
|
|
107
|
+
type DataTableColumn<TData extends RowData, TValue = unknown> = Column<typeof dataTableFeatures, TData, TValue>;
|
|
108
|
+
type DataTableHeader<TData extends RowData, TValue = unknown> = Header<typeof dataTableFeatures, TData, TValue>;
|
|
109
|
+
type DataTableInstance<TData extends RowData> = AppReactTable<typeof dataTableFeatures, TData, TableState<typeof dataTableFeatures>, Record<never, never>, Record<never, never>, Record<never, never>>;
|
|
11
110
|
export declare const TableSearchSchema: Schema.Struct<{
|
|
12
111
|
readonly page: Schema.optional<Schema.Int>;
|
|
13
112
|
readonly pageSize: Schema.optional<Schema.Int>;
|
|
@@ -42,6 +141,8 @@ export type DataTableMessages = PaginationMessages & {
|
|
|
42
141
|
reorder: string;
|
|
43
142
|
resizeColumn: (column: string) => string;
|
|
44
143
|
listOthers: (count: number) => string;
|
|
144
|
+
selectAllRows: string;
|
|
145
|
+
selectRow: string;
|
|
45
146
|
};
|
|
46
147
|
export type DataTableMessageOverrides = Partial<DataTableMessages>;
|
|
47
148
|
export declare const dataTableMessages: (overrides?: DataTableMessageOverrides) => {
|
|
@@ -74,6 +175,8 @@ export declare const dataTableMessages: (overrides?: DataTableMessageOverrides)
|
|
|
74
175
|
reorder: string;
|
|
75
176
|
resizeColumn: (column: string) => string;
|
|
76
177
|
listOthers: (count: number) => string;
|
|
178
|
+
selectAllRows: string;
|
|
179
|
+
selectRow: string;
|
|
77
180
|
} | {
|
|
78
181
|
pageSize: string;
|
|
79
182
|
results: (count: number) => string;
|
|
@@ -104,6 +207,8 @@ export declare const dataTableMessages: (overrides?: DataTableMessageOverrides)
|
|
|
104
207
|
reorder: string;
|
|
105
208
|
resizeColumn: (column: string) => string;
|
|
106
209
|
listOthers: (count: number) => string;
|
|
210
|
+
selectAllRows: string;
|
|
211
|
+
selectRow: string;
|
|
107
212
|
};
|
|
108
213
|
export interface DataTableGroupingField<TData> {
|
|
109
214
|
id: string;
|
|
@@ -177,7 +282,12 @@ export interface DataTableRowActionsFeature<TData> {
|
|
|
177
282
|
items: readonly DataTableRowAction<TData>[];
|
|
178
283
|
}
|
|
179
284
|
export interface DataTableColumnVisibilityFeature {
|
|
180
|
-
default?:
|
|
285
|
+
default?: ColumnVisibilityState;
|
|
286
|
+
}
|
|
287
|
+
export interface DataTableSelectionFeature<TData> {
|
|
288
|
+
getRowId: (row: TData) => string;
|
|
289
|
+
isRowSelectable?: (row: TData) => boolean;
|
|
290
|
+
onSelectionChange?: (rows: TData[]) => void;
|
|
181
291
|
}
|
|
182
292
|
export interface DataTableFeatures<TData> {
|
|
183
293
|
pagination?: DataTablePaginationFeature;
|
|
@@ -187,12 +297,13 @@ export interface DataTableFeatures<TData> {
|
|
|
187
297
|
gallery?: false | DataTableGalleryConfig;
|
|
188
298
|
sorting?: boolean;
|
|
189
299
|
rowActions?: false | DataTableRowActionsFeature<TData>;
|
|
300
|
+
selection?: false | DataTableSelectionFeature<TData>;
|
|
190
301
|
}
|
|
191
302
|
type LegacyDataTableRowAction<TData> = Omit<DataTableRowAction<TData>, "id"> & {
|
|
192
303
|
id?: string;
|
|
193
304
|
};
|
|
194
|
-
interface DataTableProps<TData
|
|
195
|
-
columns:
|
|
305
|
+
interface DataTableProps<TData extends RowData> {
|
|
306
|
+
columns: DataTableColumnDef<TData>[];
|
|
196
307
|
data: TData[];
|
|
197
308
|
state?: DataTableState;
|
|
198
309
|
search?: TableParams;
|
|
@@ -221,18 +332,18 @@ export declare const DataTableRowActions: <TData>({ actions, contentClassName, r
|
|
|
221
332
|
row: TData;
|
|
222
333
|
title?: string | undefined;
|
|
223
334
|
}) => import("react").JSX.Element | null;
|
|
224
|
-
export declare const getHeaderNames: (headers:
|
|
335
|
+
export declare const getHeaderNames: <TData extends RowData>(headers: DataTableHeader<TData, unknown>[]) => string[];
|
|
225
336
|
export type CsvValue = string | number | boolean | null | undefined;
|
|
226
337
|
export declare const downloadCsv: (headers: CsvValue[], data: CsvValue[][], fileName?: string) => void;
|
|
227
338
|
export declare const downloadJson: (data: unknown, fileName?: string) => void;
|
|
228
|
-
export declare function DataTable<TData
|
|
229
|
-
interface DataTablePaginationProps<TData> {
|
|
339
|
+
export declare function DataTable<TData extends RowData>({ columns, data, state, search: controlledSearch, onSearchChange, searchState, emptyLabel, messages, exportFileName, isLoading: legacyIsLoading, onRefresh, onRowClick, from, routeFrom, grouping, gallery, rowActions: legacyRowActions, reordering, serverPagination, features, }: DataTableProps<TData>): import("react").JSX.Element;
|
|
340
|
+
interface DataTablePaginationProps<TData extends RowData> {
|
|
230
341
|
messages?: DataTableMessageOverrides;
|
|
231
342
|
pageSizes?: readonly number[] | undefined;
|
|
232
343
|
rowCount?: number | undefined;
|
|
233
|
-
table:
|
|
344
|
+
table: DataTableInstance<TData>;
|
|
234
345
|
}
|
|
235
|
-
export declare function DataTablePagination<TData>({ messages, pageSizes, rowCount, table, }: DataTablePaginationProps<TData>): import("react").JSX.Element;
|
|
346
|
+
export declare function DataTablePagination<TData extends RowData>({ messages, pageSizes, rowCount, table, }: DataTablePaginationProps<TData>): import("react").JSX.Element;
|
|
236
347
|
export declare function DataTableRelationshipCell({ emptyLabel, manageLabel, onAdd, onRemove, options, value, }: {
|
|
237
348
|
emptyLabel: string;
|
|
238
349
|
from?: ValidateFromPath;
|
|
@@ -255,10 +366,10 @@ export declare function DataTableListSummary({ emptyLabel, expandable, items, ov
|
|
|
255
366
|
variant?: "icon" | "text" | undefined;
|
|
256
367
|
visibleCount?: number | undefined;
|
|
257
368
|
}): import("react").JSX.Element;
|
|
258
|
-
interface DataTableColumnHeaderProps<TData, TValue> extends HTMLAttributes<HTMLDivElement> {
|
|
259
|
-
column:
|
|
369
|
+
interface DataTableColumnHeaderProps<TData extends RowData, TValue> extends HTMLAttributes<HTMLDivElement> {
|
|
370
|
+
column: DataTableColumn<TData, TValue>;
|
|
260
371
|
messages?: DataTableMessageOverrides;
|
|
261
372
|
title: string;
|
|
262
373
|
}
|
|
263
|
-
export declare function DataTableColumnHeader<TData, TValue>({ column, messages, title, className, }: DataTableColumnHeaderProps<TData, TValue>): import("react").JSX.Element;
|
|
374
|
+
export declare function DataTableColumnHeader<TData extends RowData, TValue>({ column, messages, title, className, }: DataTableColumnHeaderProps<TData, TValue>): import("react").JSX.Element;
|
|
264
375
|
export {};
|