@yuktishaalaa/yuktai 4.6.1 → 4.6.3
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/index.d.mts +17 -56
- package/dist/index.d.ts +17 -56
- package/dist/index.js +57 -55
- package/dist/index.mjs +38 -36
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -111,40 +111,16 @@ declare const voicePlugin: {
|
|
|
111
111
|
execute(input: string): Promise<string>;
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
interface
|
|
115
|
-
data: T[];
|
|
116
|
-
columns: {
|
|
117
|
-
key: string;
|
|
118
|
-
label: string;
|
|
119
|
-
type?: "number" | "text" | "date";
|
|
120
|
-
}[];
|
|
121
|
-
onSearch: (query: string) => void;
|
|
122
|
-
onSort?: (key: string, dir: "asc" | "desc") => void;
|
|
123
|
-
theme?: "light" | "dark";
|
|
124
|
-
language?: "en-US" | "en-IN" | "hi-IN" | "te-IN";
|
|
125
|
-
}
|
|
126
|
-
declare function YuktaiGrid<T extends Record<string, unknown>>({ data, columns, onSearch, onSort, theme, language, }: YuktaiGridAIProps$1<T>): react_jsx_runtime.JSX.Element;
|
|
127
|
-
|
|
128
|
-
interface GridColumn$1<T = Record<string, unknown>> {
|
|
129
|
-
/** Unique key — must match a property in your data */
|
|
114
|
+
interface GridColumn<T = Record<string, unknown>> {
|
|
130
115
|
key: keyof T & string;
|
|
131
|
-
/** Display label for the header */
|
|
132
116
|
label: string;
|
|
133
|
-
/** Allow sorting on this column (default: true) */
|
|
134
117
|
sortable?: boolean;
|
|
135
|
-
/** Allow filtering on this column (default: true) */
|
|
136
118
|
filterable?: boolean;
|
|
137
|
-
/** Hide this column on mobile (default: false) */
|
|
138
119
|
hiddenOnMobile?: boolean;
|
|
139
|
-
/** Pin this column on tablet view */
|
|
140
120
|
pinned?: boolean;
|
|
141
|
-
/** Column width — number (px) or string (%, fr) */
|
|
142
121
|
width?: number | string;
|
|
143
|
-
/** Custom cell renderer */
|
|
144
122
|
render?: (value: T[keyof T], row: T, index: number) => ReactNode;
|
|
145
|
-
/** Cell alignment */
|
|
146
123
|
align?: "left" | "center" | "right";
|
|
147
|
-
/** Type — affects default formatting and filter UI */
|
|
148
124
|
type?: "text" | "number" | "date" | "boolean" | "badge";
|
|
149
125
|
}
|
|
150
126
|
type SortDirection = "asc" | "desc" | null;
|
|
@@ -162,23 +138,15 @@ type ViewMode = "table" | "card" | "auto";
|
|
|
162
138
|
type GridTheme = "default" | "high-contrast" | "dark" | "color-blind" | "dyslexia";
|
|
163
139
|
type GridLocale = "en-IN" | "en-US" | "te-IN" | "hi-IN" | "ta-IN" | "bn-IN" | "mr-IN" | "kn-IN" | "ml-IN" | "gu-IN" | "pa-IN" | "ur-IN";
|
|
164
140
|
interface AIFeatures {
|
|
165
|
-
/** Enable AI semantic search */
|
|
166
141
|
search?: boolean;
|
|
167
|
-
/** Enable AI row summary */
|
|
168
142
|
summary?: boolean;
|
|
169
|
-
/** Enable anomaly detection */
|
|
170
143
|
anomaly?: boolean;
|
|
171
|
-
/** Enable suggestions */
|
|
172
144
|
suggest?: boolean;
|
|
173
145
|
}
|
|
174
146
|
interface VoiceFeatures {
|
|
175
|
-
/** Voice commands for search/filter/sort */
|
|
176
147
|
control?: boolean;
|
|
177
|
-
/** Read rows aloud on focus */
|
|
178
148
|
speakOnFocus?: boolean;
|
|
179
|
-
/** Read filtered data summary aloud */
|
|
180
149
|
speakSummary?: boolean;
|
|
181
|
-
/** Voice language (defaults to locale) */
|
|
182
150
|
language?: string;
|
|
183
151
|
}
|
|
184
152
|
interface PaginationConfig {
|
|
@@ -203,47 +171,40 @@ interface GridTranslations {
|
|
|
203
171
|
ask: string;
|
|
204
172
|
}
|
|
205
173
|
interface YuktaiGridProps<T = Record<string, unknown>> {
|
|
206
|
-
/** The data to display */
|
|
207
174
|
data: T[];
|
|
208
|
-
|
|
209
|
-
columns: GridColumn$1<T>[];
|
|
210
|
-
/** View mode — "auto" picks based on screen size */
|
|
175
|
+
columns: GridColumn<T>[];
|
|
211
176
|
view?: ViewMode;
|
|
212
|
-
/** Mobile breakpoint in pixels (default: 768) */
|
|
213
177
|
mobileBreakpoint?: number;
|
|
214
|
-
/** WCAG theme (default: "default") */
|
|
215
178
|
theme?: GridTheme;
|
|
216
|
-
/** Locale (default: "en-US") */
|
|
217
179
|
locale?: GridLocale;
|
|
218
|
-
/** AI features */
|
|
219
180
|
ai?: boolean | AIFeatures;
|
|
220
|
-
/** Voice features */
|
|
221
181
|
voice?: boolean | VoiceFeatures;
|
|
222
|
-
/** Pagination */
|
|
223
182
|
pagination?: boolean | PaginationConfig;
|
|
224
|
-
/** Show search bar */
|
|
225
183
|
search?: boolean;
|
|
226
|
-
/** Multi-row selection */
|
|
227
184
|
selectable?: boolean;
|
|
228
|
-
/** Selected row keys */
|
|
229
185
|
selectedKeys?: string[];
|
|
230
|
-
/** Row key field (default: "id") */
|
|
231
186
|
rowKey?: keyof T & string;
|
|
232
|
-
/** Loading state */
|
|
233
187
|
loading?: boolean;
|
|
234
|
-
/** Custom empty state */
|
|
235
188
|
empty?: ReactNode;
|
|
236
|
-
|
|
189
|
+
highlightIds?: (string | number)[];
|
|
190
|
+
highlightColor?: string;
|
|
191
|
+
autoScrollToHighlight?: boolean;
|
|
237
192
|
onSelectionChange?: (keys: string[]) => void;
|
|
238
193
|
onRowClick?: (row: T, index: number) => void;
|
|
239
194
|
onSortChange?: (sort: SortConfig | null) => void;
|
|
240
|
-
/** Custom className */
|
|
241
195
|
className?: string;
|
|
242
196
|
}
|
|
243
197
|
|
|
198
|
+
type YuktaiGridPropsWithHighlight<T extends Record<string, unknown>> = YuktaiGridProps<T> & {
|
|
199
|
+
highlightIds?: (string | number)[];
|
|
200
|
+
highlightColor?: string;
|
|
201
|
+
autoScrollToHighlight?: boolean;
|
|
202
|
+
};
|
|
203
|
+
declare function YuktaiGrid<T extends Record<string, unknown>>({ data, columns, rowKey, view, mobileBreakpoint, theme, locale, search, selectable, selectedKeys, onSelectionChange, pagination, loading, highlightIds, highlightColor, autoScrollToHighlight, onRowClick, onSortChange, empty, className, }: YuktaiGridPropsWithHighlight<T>): react_jsx_runtime.JSX.Element;
|
|
204
|
+
|
|
244
205
|
interface UseGridOptions<T> {
|
|
245
206
|
data: T[];
|
|
246
|
-
columns: GridColumn
|
|
207
|
+
columns: GridColumn<T>[];
|
|
247
208
|
pagination?: boolean | PaginationConfig;
|
|
248
209
|
mobileBreakpoint?: number;
|
|
249
210
|
}
|
|
@@ -326,14 +287,14 @@ declare function useYuktaiGridAgent({ tools, onResult, onError, }: YuktaiGridAge
|
|
|
326
287
|
executeTool: (name: string, input?: Record<string, unknown>) => Promise<unknown>;
|
|
327
288
|
};
|
|
328
289
|
|
|
329
|
-
type
|
|
290
|
+
type GridToolColumn = {
|
|
330
291
|
key: string;
|
|
331
292
|
label: string;
|
|
332
293
|
type?: "text" | "number" | "date";
|
|
333
294
|
};
|
|
334
295
|
type GridToolContext<T> = {
|
|
335
296
|
data: T[];
|
|
336
|
-
columns:
|
|
297
|
+
columns: GridToolColumn[];
|
|
337
298
|
onSelectRow?: (id: string) => void;
|
|
338
299
|
onHighlightRows?: (ids: string[]) => void;
|
|
339
300
|
onOpenRow?: (id: string) => void;
|
|
@@ -345,7 +306,7 @@ type GridToolResult<T = unknown> = {
|
|
|
345
306
|
};
|
|
346
307
|
declare function searchGrid<T extends Record<string, unknown>>(context: GridToolContext<T>, query: string): GridToolResult<T[]>;
|
|
347
308
|
declare function countGrid<T>(context: GridToolContext<T>): GridToolResult<number>;
|
|
348
|
-
declare function getColumns<T>(context: GridToolContext<T>): GridToolResult<
|
|
309
|
+
declare function getColumns<T>(context: GridToolContext<T>): GridToolResult<GridToolColumn[]>;
|
|
349
310
|
declare function getRow<T extends Record<string, unknown>>(context: GridToolContext<T>, id: string): GridToolResult<T>;
|
|
350
311
|
declare function highlightRows<T extends Record<string, unknown>>(context: GridToolContext<T>, ids: string[]): GridToolResult<string[]>;
|
|
351
312
|
declare function selectRow<T extends Record<string, unknown>>(context: GridToolContext<T>, id: string): GridToolResult<string>;
|
|
@@ -416,4 +377,4 @@ declare const YuktAI: {
|
|
|
416
377
|
scan(): A11yReport;
|
|
417
378
|
};
|
|
418
379
|
|
|
419
|
-
export { type A11yConfig, type A11yFix, type A11yReport, type AIFeatures, CheckIcon, ChevronLeftIcon, ChevronRightIcon, CloseIcon, type ColorBlindMode, type FilterConfig, type FilterOperator, type GridAgentTool, type GridColumn
|
|
380
|
+
export { type A11yConfig, type A11yFix, type A11yReport, type AIFeatures, CheckIcon, ChevronLeftIcon, ChevronRightIcon, CloseIcon, type ColorBlindMode, type FilterConfig, type FilterOperator, type GridAgentTool, type GridColumn, type GridLocale, type GridTheme, type GridToolColumn, type GridToolContext, type GridToolResult, type GridTranslations, IconBase, type IconProps, type PaginationConfig, Runtime, SearchIcon, type Severity, type SortConfig, type SortDirection, SortDownIcon, SortUpIcon, type ViewMode, type VoiceFeatures, YuktAI, YuktAIWrapper, type YuktAIWrapperProps, YuktaiGrid, YuktaiGridAI, type YuktaiGridAIProps, useYuktaiGridAgent as YuktaiGridAgent, type YuktaiGridAgentProps, type YuktaiGridProps, YuktaiGridWebMCP, type YuktaiGridWebMCPProps, aiPlugin, countGrid, YuktAIWrapper as default, getColumns, getRow, highlightRows, openRow, searchGrid, selectRow, useGrid, useYuktaiGridAgent, voicePlugin, wcagPlugin as wcag, wcagPlugin };
|
package/dist/index.d.ts
CHANGED
|
@@ -111,40 +111,16 @@ declare const voicePlugin: {
|
|
|
111
111
|
execute(input: string): Promise<string>;
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
interface
|
|
115
|
-
data: T[];
|
|
116
|
-
columns: {
|
|
117
|
-
key: string;
|
|
118
|
-
label: string;
|
|
119
|
-
type?: "number" | "text" | "date";
|
|
120
|
-
}[];
|
|
121
|
-
onSearch: (query: string) => void;
|
|
122
|
-
onSort?: (key: string, dir: "asc" | "desc") => void;
|
|
123
|
-
theme?: "light" | "dark";
|
|
124
|
-
language?: "en-US" | "en-IN" | "hi-IN" | "te-IN";
|
|
125
|
-
}
|
|
126
|
-
declare function YuktaiGrid<T extends Record<string, unknown>>({ data, columns, onSearch, onSort, theme, language, }: YuktaiGridAIProps$1<T>): react_jsx_runtime.JSX.Element;
|
|
127
|
-
|
|
128
|
-
interface GridColumn$1<T = Record<string, unknown>> {
|
|
129
|
-
/** Unique key — must match a property in your data */
|
|
114
|
+
interface GridColumn<T = Record<string, unknown>> {
|
|
130
115
|
key: keyof T & string;
|
|
131
|
-
/** Display label for the header */
|
|
132
116
|
label: string;
|
|
133
|
-
/** Allow sorting on this column (default: true) */
|
|
134
117
|
sortable?: boolean;
|
|
135
|
-
/** Allow filtering on this column (default: true) */
|
|
136
118
|
filterable?: boolean;
|
|
137
|
-
/** Hide this column on mobile (default: false) */
|
|
138
119
|
hiddenOnMobile?: boolean;
|
|
139
|
-
/** Pin this column on tablet view */
|
|
140
120
|
pinned?: boolean;
|
|
141
|
-
/** Column width — number (px) or string (%, fr) */
|
|
142
121
|
width?: number | string;
|
|
143
|
-
/** Custom cell renderer */
|
|
144
122
|
render?: (value: T[keyof T], row: T, index: number) => ReactNode;
|
|
145
|
-
/** Cell alignment */
|
|
146
123
|
align?: "left" | "center" | "right";
|
|
147
|
-
/** Type — affects default formatting and filter UI */
|
|
148
124
|
type?: "text" | "number" | "date" | "boolean" | "badge";
|
|
149
125
|
}
|
|
150
126
|
type SortDirection = "asc" | "desc" | null;
|
|
@@ -162,23 +138,15 @@ type ViewMode = "table" | "card" | "auto";
|
|
|
162
138
|
type GridTheme = "default" | "high-contrast" | "dark" | "color-blind" | "dyslexia";
|
|
163
139
|
type GridLocale = "en-IN" | "en-US" | "te-IN" | "hi-IN" | "ta-IN" | "bn-IN" | "mr-IN" | "kn-IN" | "ml-IN" | "gu-IN" | "pa-IN" | "ur-IN";
|
|
164
140
|
interface AIFeatures {
|
|
165
|
-
/** Enable AI semantic search */
|
|
166
141
|
search?: boolean;
|
|
167
|
-
/** Enable AI row summary */
|
|
168
142
|
summary?: boolean;
|
|
169
|
-
/** Enable anomaly detection */
|
|
170
143
|
anomaly?: boolean;
|
|
171
|
-
/** Enable suggestions */
|
|
172
144
|
suggest?: boolean;
|
|
173
145
|
}
|
|
174
146
|
interface VoiceFeatures {
|
|
175
|
-
/** Voice commands for search/filter/sort */
|
|
176
147
|
control?: boolean;
|
|
177
|
-
/** Read rows aloud on focus */
|
|
178
148
|
speakOnFocus?: boolean;
|
|
179
|
-
/** Read filtered data summary aloud */
|
|
180
149
|
speakSummary?: boolean;
|
|
181
|
-
/** Voice language (defaults to locale) */
|
|
182
150
|
language?: string;
|
|
183
151
|
}
|
|
184
152
|
interface PaginationConfig {
|
|
@@ -203,47 +171,40 @@ interface GridTranslations {
|
|
|
203
171
|
ask: string;
|
|
204
172
|
}
|
|
205
173
|
interface YuktaiGridProps<T = Record<string, unknown>> {
|
|
206
|
-
/** The data to display */
|
|
207
174
|
data: T[];
|
|
208
|
-
|
|
209
|
-
columns: GridColumn$1<T>[];
|
|
210
|
-
/** View mode — "auto" picks based on screen size */
|
|
175
|
+
columns: GridColumn<T>[];
|
|
211
176
|
view?: ViewMode;
|
|
212
|
-
/** Mobile breakpoint in pixels (default: 768) */
|
|
213
177
|
mobileBreakpoint?: number;
|
|
214
|
-
/** WCAG theme (default: "default") */
|
|
215
178
|
theme?: GridTheme;
|
|
216
|
-
/** Locale (default: "en-US") */
|
|
217
179
|
locale?: GridLocale;
|
|
218
|
-
/** AI features */
|
|
219
180
|
ai?: boolean | AIFeatures;
|
|
220
|
-
/** Voice features */
|
|
221
181
|
voice?: boolean | VoiceFeatures;
|
|
222
|
-
/** Pagination */
|
|
223
182
|
pagination?: boolean | PaginationConfig;
|
|
224
|
-
/** Show search bar */
|
|
225
183
|
search?: boolean;
|
|
226
|
-
/** Multi-row selection */
|
|
227
184
|
selectable?: boolean;
|
|
228
|
-
/** Selected row keys */
|
|
229
185
|
selectedKeys?: string[];
|
|
230
|
-
/** Row key field (default: "id") */
|
|
231
186
|
rowKey?: keyof T & string;
|
|
232
|
-
/** Loading state */
|
|
233
187
|
loading?: boolean;
|
|
234
|
-
/** Custom empty state */
|
|
235
188
|
empty?: ReactNode;
|
|
236
|
-
|
|
189
|
+
highlightIds?: (string | number)[];
|
|
190
|
+
highlightColor?: string;
|
|
191
|
+
autoScrollToHighlight?: boolean;
|
|
237
192
|
onSelectionChange?: (keys: string[]) => void;
|
|
238
193
|
onRowClick?: (row: T, index: number) => void;
|
|
239
194
|
onSortChange?: (sort: SortConfig | null) => void;
|
|
240
|
-
/** Custom className */
|
|
241
195
|
className?: string;
|
|
242
196
|
}
|
|
243
197
|
|
|
198
|
+
type YuktaiGridPropsWithHighlight<T extends Record<string, unknown>> = YuktaiGridProps<T> & {
|
|
199
|
+
highlightIds?: (string | number)[];
|
|
200
|
+
highlightColor?: string;
|
|
201
|
+
autoScrollToHighlight?: boolean;
|
|
202
|
+
};
|
|
203
|
+
declare function YuktaiGrid<T extends Record<string, unknown>>({ data, columns, rowKey, view, mobileBreakpoint, theme, locale, search, selectable, selectedKeys, onSelectionChange, pagination, loading, highlightIds, highlightColor, autoScrollToHighlight, onRowClick, onSortChange, empty, className, }: YuktaiGridPropsWithHighlight<T>): react_jsx_runtime.JSX.Element;
|
|
204
|
+
|
|
244
205
|
interface UseGridOptions<T> {
|
|
245
206
|
data: T[];
|
|
246
|
-
columns: GridColumn
|
|
207
|
+
columns: GridColumn<T>[];
|
|
247
208
|
pagination?: boolean | PaginationConfig;
|
|
248
209
|
mobileBreakpoint?: number;
|
|
249
210
|
}
|
|
@@ -326,14 +287,14 @@ declare function useYuktaiGridAgent({ tools, onResult, onError, }: YuktaiGridAge
|
|
|
326
287
|
executeTool: (name: string, input?: Record<string, unknown>) => Promise<unknown>;
|
|
327
288
|
};
|
|
328
289
|
|
|
329
|
-
type
|
|
290
|
+
type GridToolColumn = {
|
|
330
291
|
key: string;
|
|
331
292
|
label: string;
|
|
332
293
|
type?: "text" | "number" | "date";
|
|
333
294
|
};
|
|
334
295
|
type GridToolContext<T> = {
|
|
335
296
|
data: T[];
|
|
336
|
-
columns:
|
|
297
|
+
columns: GridToolColumn[];
|
|
337
298
|
onSelectRow?: (id: string) => void;
|
|
338
299
|
onHighlightRows?: (ids: string[]) => void;
|
|
339
300
|
onOpenRow?: (id: string) => void;
|
|
@@ -345,7 +306,7 @@ type GridToolResult<T = unknown> = {
|
|
|
345
306
|
};
|
|
346
307
|
declare function searchGrid<T extends Record<string, unknown>>(context: GridToolContext<T>, query: string): GridToolResult<T[]>;
|
|
347
308
|
declare function countGrid<T>(context: GridToolContext<T>): GridToolResult<number>;
|
|
348
|
-
declare function getColumns<T>(context: GridToolContext<T>): GridToolResult<
|
|
309
|
+
declare function getColumns<T>(context: GridToolContext<T>): GridToolResult<GridToolColumn[]>;
|
|
349
310
|
declare function getRow<T extends Record<string, unknown>>(context: GridToolContext<T>, id: string): GridToolResult<T>;
|
|
350
311
|
declare function highlightRows<T extends Record<string, unknown>>(context: GridToolContext<T>, ids: string[]): GridToolResult<string[]>;
|
|
351
312
|
declare function selectRow<T extends Record<string, unknown>>(context: GridToolContext<T>, id: string): GridToolResult<string>;
|
|
@@ -416,4 +377,4 @@ declare const YuktAI: {
|
|
|
416
377
|
scan(): A11yReport;
|
|
417
378
|
};
|
|
418
379
|
|
|
419
|
-
export { type A11yConfig, type A11yFix, type A11yReport, type AIFeatures, CheckIcon, ChevronLeftIcon, ChevronRightIcon, CloseIcon, type ColorBlindMode, type FilterConfig, type FilterOperator, type GridAgentTool, type GridColumn
|
|
380
|
+
export { type A11yConfig, type A11yFix, type A11yReport, type AIFeatures, CheckIcon, ChevronLeftIcon, ChevronRightIcon, CloseIcon, type ColorBlindMode, type FilterConfig, type FilterOperator, type GridAgentTool, type GridColumn, type GridLocale, type GridTheme, type GridToolColumn, type GridToolContext, type GridToolResult, type GridTranslations, IconBase, type IconProps, type PaginationConfig, Runtime, SearchIcon, type Severity, type SortConfig, type SortDirection, SortDownIcon, SortUpIcon, type ViewMode, type VoiceFeatures, YuktAI, YuktAIWrapper, type YuktAIWrapperProps, YuktaiGrid, YuktaiGridAI, type YuktaiGridAIProps, useYuktaiGridAgent as YuktaiGridAgent, type YuktaiGridAgentProps, type YuktaiGridProps, YuktaiGridWebMCP, type YuktaiGridWebMCPProps, aiPlugin, countGrid, YuktAIWrapper as default, getColumns, getRow, highlightRows, openRow, searchGrid, selectRow, useGrid, useYuktaiGridAgent, voicePlugin, wcagPlugin as wcag, wcagPlugin };
|