@yuktishaalaa/yuktai 4.4.0 → 4.5.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/README.md +325 -314
- package/dist/index.d.mts +75 -4
- package/dist/index.d.ts +75 -4
- package/dist/index.js +62 -57
- package/dist/index.mjs +30 -25
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -125,7 +125,7 @@ interface YuktaiGridAIProps$1<T> {
|
|
|
125
125
|
}
|
|
126
126
|
declare function YuktaiGrid<T extends Record<string, unknown>>({ data, columns, onSearch, onSort, theme, language, }: YuktaiGridAIProps$1<T>): react_jsx_runtime.JSX.Element;
|
|
127
127
|
|
|
128
|
-
interface GridColumn<T = Record<string, unknown>> {
|
|
128
|
+
interface GridColumn$1<T = Record<string, unknown>> {
|
|
129
129
|
/** Unique key — must match a property in your data */
|
|
130
130
|
key: keyof T & string;
|
|
131
131
|
/** Display label for the header */
|
|
@@ -206,7 +206,7 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
|
|
|
206
206
|
/** The data to display */
|
|
207
207
|
data: T[];
|
|
208
208
|
/** Column definitions */
|
|
209
|
-
columns: GridColumn<T>[];
|
|
209
|
+
columns: GridColumn$1<T>[];
|
|
210
210
|
/** View mode — "auto" picks based on screen size */
|
|
211
211
|
view?: ViewMode;
|
|
212
212
|
/** Mobile breakpoint in pixels (default: 768) */
|
|
@@ -243,7 +243,7 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
|
|
|
243
243
|
|
|
244
244
|
interface UseGridOptions<T> {
|
|
245
245
|
data: T[];
|
|
246
|
-
columns: GridColumn<T>[];
|
|
246
|
+
columns: GridColumn$1<T>[];
|
|
247
247
|
pagination?: boolean | PaginationConfig;
|
|
248
248
|
mobileBreakpoint?: number;
|
|
249
249
|
}
|
|
@@ -278,6 +278,77 @@ interface YuktaiGridAIProps<T> {
|
|
|
278
278
|
theme?: "light" | "dark";
|
|
279
279
|
language?: "en-US" | "en-IN" | "hi-IN" | "te-IN";
|
|
280
280
|
}
|
|
281
|
+
declare function YuktaiGridAI<T extends Record<string, unknown>>({ data, columns, onSearch, onSort, theme, language, }: YuktaiGridAIProps<T>): react_jsx_runtime.JSX.Element;
|
|
282
|
+
|
|
283
|
+
declare global {
|
|
284
|
+
interface Document {
|
|
285
|
+
modelContext?: {
|
|
286
|
+
registerTool: (tool: {
|
|
287
|
+
name: string;
|
|
288
|
+
title: string;
|
|
289
|
+
description: string;
|
|
290
|
+
inputSchema: Record<string, unknown>;
|
|
291
|
+
execute: (input: any) => Promise<unknown> | unknown;
|
|
292
|
+
}, options?: {
|
|
293
|
+
signal?: AbortSignal;
|
|
294
|
+
}) => Promise<void>;
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
type YuktaiGridWebMCPProps<T> = {
|
|
299
|
+
data: T[];
|
|
300
|
+
columns: {
|
|
301
|
+
key: string;
|
|
302
|
+
label: string;
|
|
303
|
+
type?: "text" | "number" | "date";
|
|
304
|
+
}[];
|
|
305
|
+
name?: string;
|
|
306
|
+
onSelectRow?: (id: string) => void;
|
|
307
|
+
onHighlightRows?: (ids: string[]) => void;
|
|
308
|
+
onOpenRow?: (id: string) => void;
|
|
309
|
+
};
|
|
310
|
+
declare function YuktaiGridWebMCP<T extends Record<string, unknown>>({ data, columns, name, onSelectRow, onHighlightRows, onOpenRow, }: YuktaiGridWebMCPProps<T>): null;
|
|
311
|
+
|
|
312
|
+
type GridAgentTool = {
|
|
313
|
+
name: string;
|
|
314
|
+
description: string;
|
|
315
|
+
execute: (input: Record<string, unknown>) => Promise<unknown> | unknown;
|
|
316
|
+
};
|
|
317
|
+
type YuktaiGridAgentProps = {
|
|
318
|
+
tools: GridAgentTool[];
|
|
319
|
+
onResult?: (result: unknown) => void;
|
|
320
|
+
onError?: (error: Error) => void;
|
|
321
|
+
};
|
|
322
|
+
declare function useYuktaiGridAgent({ tools, onResult, onError, }: YuktaiGridAgentProps): {
|
|
323
|
+
loading: boolean;
|
|
324
|
+
tools: GridAgentTool[];
|
|
325
|
+
executeTool: (name: string, input?: Record<string, unknown>) => Promise<unknown>;
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
type GridColumn = {
|
|
329
|
+
key: string;
|
|
330
|
+
label: string;
|
|
331
|
+
type?: "text" | "number" | "date";
|
|
332
|
+
};
|
|
333
|
+
type GridToolContext<T> = {
|
|
334
|
+
data: T[];
|
|
335
|
+
columns: GridColumn[];
|
|
336
|
+
onSelectRow?: (id: string) => void;
|
|
337
|
+
onHighlightRows?: (ids: string[]) => void;
|
|
338
|
+
onOpenRow?: (id: string) => void;
|
|
339
|
+
};
|
|
340
|
+
type GridToolResult<T = unknown> = {
|
|
341
|
+
success: boolean;
|
|
342
|
+
message: string;
|
|
343
|
+
data?: T;
|
|
344
|
+
};
|
|
345
|
+
declare function searchGrid<T extends Record<string, unknown>>(context: GridToolContext<T>, query: string): GridToolResult<T[]>;
|
|
346
|
+
declare function countGrid<T>(context: GridToolContext<T>): GridToolResult<number>;
|
|
347
|
+
declare function getColumns<T>(context: GridToolContext<T>): GridToolResult<GridColumn[]>;
|
|
348
|
+
declare function getRow<T extends Record<string, unknown>>(context: GridToolContext<T>, id: string): GridToolResult<T>;
|
|
349
|
+
declare function highlightRows<T extends Record<string, unknown>>(context: GridToolContext<T>, ids: string[]): GridToolResult<string[]>;
|
|
350
|
+
declare function selectRow<T extends Record<string, unknown>>(context: GridToolContext<T>, id: string): GridToolResult<string>;
|
|
351
|
+
declare function openRow<T extends Record<string, unknown>>(context: GridToolContext<T>, id: string): GridToolResult<string>;
|
|
281
352
|
|
|
282
353
|
interface IconProps extends React.SVGAttributes<SVGSVGElement> {
|
|
283
354
|
/** Size in pixels — applied to both width and height. Default: 20 */
|
|
@@ -344,4 +415,4 @@ declare const YuktAI: {
|
|
|
344
415
|
scan(): A11yReport;
|
|
345
416
|
};
|
|
346
417
|
|
|
347
|
-
export { type A11yConfig, type A11yFix, type A11yReport, type AIFeatures, CheckIcon, ChevronLeftIcon, ChevronRightIcon, CloseIcon, type ColorBlindMode, type FilterConfig, type FilterOperator, type GridColumn, type GridLocale, type GridTheme, 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, type YuktaiGridAIProps, type YuktaiGridProps, aiPlugin, YuktAIWrapper as default, useGrid, voicePlugin, wcagPlugin as wcag, wcagPlugin };
|
|
418
|
+
export { type A11yConfig, type A11yFix, type A11yReport, type AIFeatures, CheckIcon, ChevronLeftIcon, ChevronRightIcon, CloseIcon, type ColorBlindMode, type FilterConfig, type FilterOperator, type GridAgentTool, type GridColumn$1 as GridColumn, type GridLocale, type GridTheme, 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
|
@@ -125,7 +125,7 @@ interface YuktaiGridAIProps$1<T> {
|
|
|
125
125
|
}
|
|
126
126
|
declare function YuktaiGrid<T extends Record<string, unknown>>({ data, columns, onSearch, onSort, theme, language, }: YuktaiGridAIProps$1<T>): react_jsx_runtime.JSX.Element;
|
|
127
127
|
|
|
128
|
-
interface GridColumn<T = Record<string, unknown>> {
|
|
128
|
+
interface GridColumn$1<T = Record<string, unknown>> {
|
|
129
129
|
/** Unique key — must match a property in your data */
|
|
130
130
|
key: keyof T & string;
|
|
131
131
|
/** Display label for the header */
|
|
@@ -206,7 +206,7 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
|
|
|
206
206
|
/** The data to display */
|
|
207
207
|
data: T[];
|
|
208
208
|
/** Column definitions */
|
|
209
|
-
columns: GridColumn<T>[];
|
|
209
|
+
columns: GridColumn$1<T>[];
|
|
210
210
|
/** View mode — "auto" picks based on screen size */
|
|
211
211
|
view?: ViewMode;
|
|
212
212
|
/** Mobile breakpoint in pixels (default: 768) */
|
|
@@ -243,7 +243,7 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
|
|
|
243
243
|
|
|
244
244
|
interface UseGridOptions<T> {
|
|
245
245
|
data: T[];
|
|
246
|
-
columns: GridColumn<T>[];
|
|
246
|
+
columns: GridColumn$1<T>[];
|
|
247
247
|
pagination?: boolean | PaginationConfig;
|
|
248
248
|
mobileBreakpoint?: number;
|
|
249
249
|
}
|
|
@@ -278,6 +278,77 @@ interface YuktaiGridAIProps<T> {
|
|
|
278
278
|
theme?: "light" | "dark";
|
|
279
279
|
language?: "en-US" | "en-IN" | "hi-IN" | "te-IN";
|
|
280
280
|
}
|
|
281
|
+
declare function YuktaiGridAI<T extends Record<string, unknown>>({ data, columns, onSearch, onSort, theme, language, }: YuktaiGridAIProps<T>): react_jsx_runtime.JSX.Element;
|
|
282
|
+
|
|
283
|
+
declare global {
|
|
284
|
+
interface Document {
|
|
285
|
+
modelContext?: {
|
|
286
|
+
registerTool: (tool: {
|
|
287
|
+
name: string;
|
|
288
|
+
title: string;
|
|
289
|
+
description: string;
|
|
290
|
+
inputSchema: Record<string, unknown>;
|
|
291
|
+
execute: (input: any) => Promise<unknown> | unknown;
|
|
292
|
+
}, options?: {
|
|
293
|
+
signal?: AbortSignal;
|
|
294
|
+
}) => Promise<void>;
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
type YuktaiGridWebMCPProps<T> = {
|
|
299
|
+
data: T[];
|
|
300
|
+
columns: {
|
|
301
|
+
key: string;
|
|
302
|
+
label: string;
|
|
303
|
+
type?: "text" | "number" | "date";
|
|
304
|
+
}[];
|
|
305
|
+
name?: string;
|
|
306
|
+
onSelectRow?: (id: string) => void;
|
|
307
|
+
onHighlightRows?: (ids: string[]) => void;
|
|
308
|
+
onOpenRow?: (id: string) => void;
|
|
309
|
+
};
|
|
310
|
+
declare function YuktaiGridWebMCP<T extends Record<string, unknown>>({ data, columns, name, onSelectRow, onHighlightRows, onOpenRow, }: YuktaiGridWebMCPProps<T>): null;
|
|
311
|
+
|
|
312
|
+
type GridAgentTool = {
|
|
313
|
+
name: string;
|
|
314
|
+
description: string;
|
|
315
|
+
execute: (input: Record<string, unknown>) => Promise<unknown> | unknown;
|
|
316
|
+
};
|
|
317
|
+
type YuktaiGridAgentProps = {
|
|
318
|
+
tools: GridAgentTool[];
|
|
319
|
+
onResult?: (result: unknown) => void;
|
|
320
|
+
onError?: (error: Error) => void;
|
|
321
|
+
};
|
|
322
|
+
declare function useYuktaiGridAgent({ tools, onResult, onError, }: YuktaiGridAgentProps): {
|
|
323
|
+
loading: boolean;
|
|
324
|
+
tools: GridAgentTool[];
|
|
325
|
+
executeTool: (name: string, input?: Record<string, unknown>) => Promise<unknown>;
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
type GridColumn = {
|
|
329
|
+
key: string;
|
|
330
|
+
label: string;
|
|
331
|
+
type?: "text" | "number" | "date";
|
|
332
|
+
};
|
|
333
|
+
type GridToolContext<T> = {
|
|
334
|
+
data: T[];
|
|
335
|
+
columns: GridColumn[];
|
|
336
|
+
onSelectRow?: (id: string) => void;
|
|
337
|
+
onHighlightRows?: (ids: string[]) => void;
|
|
338
|
+
onOpenRow?: (id: string) => void;
|
|
339
|
+
};
|
|
340
|
+
type GridToolResult<T = unknown> = {
|
|
341
|
+
success: boolean;
|
|
342
|
+
message: string;
|
|
343
|
+
data?: T;
|
|
344
|
+
};
|
|
345
|
+
declare function searchGrid<T extends Record<string, unknown>>(context: GridToolContext<T>, query: string): GridToolResult<T[]>;
|
|
346
|
+
declare function countGrid<T>(context: GridToolContext<T>): GridToolResult<number>;
|
|
347
|
+
declare function getColumns<T>(context: GridToolContext<T>): GridToolResult<GridColumn[]>;
|
|
348
|
+
declare function getRow<T extends Record<string, unknown>>(context: GridToolContext<T>, id: string): GridToolResult<T>;
|
|
349
|
+
declare function highlightRows<T extends Record<string, unknown>>(context: GridToolContext<T>, ids: string[]): GridToolResult<string[]>;
|
|
350
|
+
declare function selectRow<T extends Record<string, unknown>>(context: GridToolContext<T>, id: string): GridToolResult<string>;
|
|
351
|
+
declare function openRow<T extends Record<string, unknown>>(context: GridToolContext<T>, id: string): GridToolResult<string>;
|
|
281
352
|
|
|
282
353
|
interface IconProps extends React.SVGAttributes<SVGSVGElement> {
|
|
283
354
|
/** Size in pixels — applied to both width and height. Default: 20 */
|
|
@@ -344,4 +415,4 @@ declare const YuktAI: {
|
|
|
344
415
|
scan(): A11yReport;
|
|
345
416
|
};
|
|
346
417
|
|
|
347
|
-
export { type A11yConfig, type A11yFix, type A11yReport, type AIFeatures, CheckIcon, ChevronLeftIcon, ChevronRightIcon, CloseIcon, type ColorBlindMode, type FilterConfig, type FilterOperator, type GridColumn, type GridLocale, type GridTheme, 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, type YuktaiGridAIProps, type YuktaiGridProps, aiPlugin, YuktAIWrapper as default, useGrid, voicePlugin, wcagPlugin as wcag, wcagPlugin };
|
|
418
|
+
export { type A11yConfig, type A11yFix, type A11yReport, type AIFeatures, CheckIcon, ChevronLeftIcon, ChevronRightIcon, CloseIcon, type ColorBlindMode, type FilterConfig, type FilterOperator, type GridAgentTool, type GridColumn$1 as GridColumn, type GridLocale, type GridTheme, 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 };
|