@yuktishaalaa/yuktai 4.4.1 → 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 CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  **7,000+ developers** already installed yuktai. Built entirely in free time by [Sandeep Miriyala](https://github.com/sandeepmiriyala03) with help from Claude, GPT, and Gemini.
12
12
 
13
- Live demo → [aksharatantra.vercel.app](https://aksharatantra.vercel.app)
13
+ Live demo → [https://aksharatantra.miriyala.in/staffdirectory](https://aksharatantra.miriyala.in/staffdirectory)
14
14
 
15
15
  ---
16
16
 
package/dist/index.d.mts CHANGED
@@ -111,7 +111,21 @@ declare const voicePlugin: {
111
111
  execute(input: string): Promise<string>;
112
112
  };
113
113
 
114
- interface GridColumn<T = Record<string, unknown>> {
114
+ interface YuktaiGridAIProps$1<T> {
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>> {
115
129
  /** Unique key — must match a property in your data */
116
130
  key: keyof T & string;
117
131
  /** Display label for the header */
@@ -192,7 +206,7 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
192
206
  /** The data to display */
193
207
  data: T[];
194
208
  /** Column definitions */
195
- columns: GridColumn<T>[];
209
+ columns: GridColumn$1<T>[];
196
210
  /** View mode — "auto" picks based on screen size */
197
211
  view?: ViewMode;
198
212
  /** Mobile breakpoint in pixels (default: 768) */
@@ -219,13 +233,6 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
219
233
  loading?: boolean;
220
234
  /** Custom empty state */
221
235
  empty?: ReactNode;
222
- /** ───── v4.2.0 — Ask & Highlight ───── */
223
- /** Row IDs to highlight (glow yellow). Used by "Ask & Highlight" AI feature. */
224
- highlightIds?: (string | number)[];
225
- /** Highlight background color (default: soft yellow) */
226
- highlightColor?: string;
227
- /** Auto-scroll to first highlighted row (default: true) */
228
- autoScrollToHighlight?: boolean;
229
236
  /** Callbacks */
230
237
  onSelectionChange?: (keys: string[]) => void;
231
238
  onRowClick?: (row: T, index: number) => void;
@@ -234,11 +241,9 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
234
241
  className?: string;
235
242
  }
236
243
 
237
- declare function YuktaiGrid<T extends Record<string, unknown>>(props: YuktaiGridProps<T>): react_jsx_runtime.JSX.Element;
238
-
239
244
  interface UseGridOptions<T> {
240
245
  data: T[];
241
- columns: GridColumn<T>[];
246
+ columns: GridColumn$1<T>[];
242
247
  pagination?: boolean | PaginationConfig;
243
248
  mobileBreakpoint?: number;
244
249
  }
@@ -273,6 +278,77 @@ interface YuktaiGridAIProps<T> {
273
278
  theme?: "light" | "dark";
274
279
  language?: "en-US" | "en-IN" | "hi-IN" | "te-IN";
275
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>;
276
352
 
277
353
  interface IconProps extends React.SVGAttributes<SVGSVGElement> {
278
354
  /** Size in pixels — applied to both width and height. Default: 20 */
@@ -339,4 +415,4 @@ declare const YuktAI: {
339
415
  scan(): A11yReport;
340
416
  };
341
417
 
342
- 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
@@ -111,7 +111,21 @@ declare const voicePlugin: {
111
111
  execute(input: string): Promise<string>;
112
112
  };
113
113
 
114
- interface GridColumn<T = Record<string, unknown>> {
114
+ interface YuktaiGridAIProps$1<T> {
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>> {
115
129
  /** Unique key — must match a property in your data */
116
130
  key: keyof T & string;
117
131
  /** Display label for the header */
@@ -192,7 +206,7 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
192
206
  /** The data to display */
193
207
  data: T[];
194
208
  /** Column definitions */
195
- columns: GridColumn<T>[];
209
+ columns: GridColumn$1<T>[];
196
210
  /** View mode — "auto" picks based on screen size */
197
211
  view?: ViewMode;
198
212
  /** Mobile breakpoint in pixels (default: 768) */
@@ -219,13 +233,6 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
219
233
  loading?: boolean;
220
234
  /** Custom empty state */
221
235
  empty?: ReactNode;
222
- /** ───── v4.2.0 — Ask & Highlight ───── */
223
- /** Row IDs to highlight (glow yellow). Used by "Ask & Highlight" AI feature. */
224
- highlightIds?: (string | number)[];
225
- /** Highlight background color (default: soft yellow) */
226
- highlightColor?: string;
227
- /** Auto-scroll to first highlighted row (default: true) */
228
- autoScrollToHighlight?: boolean;
229
236
  /** Callbacks */
230
237
  onSelectionChange?: (keys: string[]) => void;
231
238
  onRowClick?: (row: T, index: number) => void;
@@ -234,11 +241,9 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
234
241
  className?: string;
235
242
  }
236
243
 
237
- declare function YuktaiGrid<T extends Record<string, unknown>>(props: YuktaiGridProps<T>): react_jsx_runtime.JSX.Element;
238
-
239
244
  interface UseGridOptions<T> {
240
245
  data: T[];
241
- columns: GridColumn<T>[];
246
+ columns: GridColumn$1<T>[];
242
247
  pagination?: boolean | PaginationConfig;
243
248
  mobileBreakpoint?: number;
244
249
  }
@@ -273,6 +278,77 @@ interface YuktaiGridAIProps<T> {
273
278
  theme?: "light" | "dark";
274
279
  language?: "en-US" | "en-IN" | "hi-IN" | "te-IN";
275
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>;
276
352
 
277
353
  interface IconProps extends React.SVGAttributes<SVGSVGElement> {
278
354
  /** Size in pixels — applied to both width and height. Default: 20 */
@@ -339,4 +415,4 @@ declare const YuktAI: {
339
415
  scan(): A11yReport;
340
416
  };
341
417
 
342
- 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 };