@yuktishaalaa/yuktai 5.3.4 → 5.3.7

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 CHANGED
@@ -1,5 +1,5 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode, CSSProperties } from 'react';
1
+ import * as react from 'react';
2
+ import react__default, { ReactNode, CSSProperties } from 'react';
3
3
  export { AbcIcon, AccessibilityIcon, AdminIcon, AlertIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, ApiIcon, ArchitectureIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, BarChartIcon, BoldIcon, BookIcon, BookmarkIcon, BrainIcon, BugReportIcon, BulbIcon, CakeIcon, CalendarIcon, CardsIcon, ChatIcon, CheckIcon, ChevronLeftIcon, ChevronRightIcon, ChevronsIcon, CleaningIcon, ClockIcon, CloseIcon, CloudIcon, CodeIcon, ComputerIcon, ContrastIcon, CopyIcon, DashboardIcon, DataObjectIcon, DeleteIcon, DocumentScannerIcon, DownloadIcon, DragHandleIcon, ExploreIcon, ExternalIcon, EyeIcon, EyeOffIcon, FactCheckIcon, FileIcon, FilterIcon, FirstIcon, FontIcon, FormIcon, FullscreenExitIcon, FullscreenIcon, GavelIcon, GiftIcon, GlobeIcon, GridIcon, HeadphonesIcon, HeartFilledIcon, HeartIcon, HelpIcon, HomeIcon, HubIcon, ICON_MIN_CONTRAST, ICON_NAMES, ICON_PATHS, IconBase, IconName, IconProps, IconShape, IconSvgOptions, IconVariant, ImageIcon, ImageSearchIcon, InfoIcon, InsightsIcon, InstallIcon, IntegrationIcon, ItalicIcon, JoinIcon, KeyIcon, KeyboardIcon, LabelIcon, LampIcon, LastIcon, LayoutIcon, LinkIcon, LoaderIcon, LockIcon, LoginIcon, LogoutIcon, MapIcon, MeditateIcon, MenuIcon, MergeIcon, MicIcon, MinusIcon, MoonIcon, MotionIcon, MovieIcon, MusicIcon, MusicOffIcon, MusicVideoIcon, NamaskarIcon, PageBreakIcon, PaletteIcon, PauseIcon, PenIcon, PersonIcon, PhoneIcon, PinIcon, PlayIcon, PlugIcon, PlusIcon, QuoteIcon, RadioCheckedIcon, RadioIcon, ReadingIcon, RedoIcon, RepeatIcon, ResetIcon, RobotIcon, SaveIcon, SchoolIcon, SearchIcon, SearchOffIcon, SendIcon, SentimentSadIcon, ShareIcon, ShieldCheckIcon, ShuffleIcon, SkipIcon, SlideshowIcon, SortDownIcon, SortIcon, SortUpIcon, SparkIcon, SpeakerIcon, SpeedIcon, SpellcheckIcon, StarIcon, StopIcon, StorageIcon, StyleIcon, SunIcon, SunriseIcon, SunsetIcon, SwapIcon, TargetIcon, TempleIcon, TextIcon, TitleIcon, ToolsIcon, TouchIcon, TrendingDownIcon, TrendingUpIcon, TrophyIcon, UnderlineIcon, UndoIcon, UnlockIcon, UploadIcon, UsersIcon, VolumeOffIcon, VolunteerIcon, WalletIcon, WandIcon, WifiIcon, WifiOffIcon, YuktaiIcon, YuktaiIconProps, ZoomInIcon, ZoomOutIcon, iconContrast, iconSvg, pickGlyphColor } from './icons.mjs';
4
4
 
5
5
  interface Plugin {
@@ -100,7 +100,7 @@ interface YuktAIWrapperProps {
100
100
  showRag?: boolean;
101
101
  showAgent?: boolean;
102
102
  }
103
- declare function YuktAIWrapper({ position, children, config: configOverrides, showRag, showAgent, }: YuktAIWrapperProps): react_jsx_runtime.JSX.Element;
103
+ declare function YuktAIWrapper({ position, children, config: configOverrides, showRag, showAgent, }: YuktAIWrapperProps): react__default.JSX.Element;
104
104
 
105
105
  declare const aiPlugin: {
106
106
  name: string;
@@ -112,6 +112,62 @@ declare const voicePlugin: {
112
112
  execute(input: string): Promise<string>;
113
113
  };
114
114
 
115
+ /** Which engine sorts and searches the grid. */
116
+ type GridEngine = "ts" | "rust" | "auto";
117
+ /** `engine: "auto"` switches to Rust from this many rows. */
118
+ declare const RUST_AUTO_MIN_ROWS = 10000;
119
+ declare function wantsRustEngine(engine: GridEngine | undefined, rowCount: number): boolean;
120
+ /**
121
+ * Compiles the Rust engine once per page. Resolves `null` when WebAssembly is
122
+ * not available; the grid then simply keeps using TypeScript.
123
+ */
124
+ declare function loadGridCore(): Promise<WebAssembly.Module | null>;
125
+ /**
126
+ * One engine per grid. Holds that grid's search text inside the WebAssembly
127
+ * memory, so each keystroke only sends the query.
128
+ */
129
+ declare class GridCore {
130
+ private readonly x;
131
+ private readonly base;
132
+ private readonly encoder;
133
+ private offsetsPtr;
134
+ private textPtr;
135
+ private textLen;
136
+ private rows;
137
+ private hasIndex;
138
+ private freePtr;
139
+ private constructor();
140
+ /** Creates an engine from a compiled module (default: the one already loaded). */
141
+ static create(mod?: WebAssembly.Module | null): GridCore | null;
142
+ private ensure;
143
+ /**
144
+ * Stores one search text per row (the grid joins its columns with
145
+ * SEARCH_SEPARATOR). Returns false when Rust can't match TypeScript
146
+ * exactly for this data; the grid then searches in TypeScript.
147
+ */
148
+ setSearchTexts(texts: string[]): boolean;
149
+ /**
150
+ * Positions (in the array given to setSearchTexts) of the rows whose text
151
+ * contains `query`, in original order. Null means "use TypeScript".
152
+ */
153
+ search(query: string): Uint32Array | null;
154
+ /**
155
+ * Row positions sorted by `keys` (NaN = empty, always last; equal keys keep
156
+ * their order). Null means "use TypeScript".
157
+ */
158
+ sortByKeys(keys: Float64Array, desc: boolean): Uint32Array | null;
159
+ }
160
+
161
+ /** One search/sort run: what was searched, how long it took, which engine answered. */
162
+ interface GridSearchTime {
163
+ /** The search text ("" when only sorting) */
164
+ query: string;
165
+ /** Milliseconds for search + filters + sort */
166
+ ms: number;
167
+ /** Rows after search and filters */
168
+ rows: number;
169
+ engine: "rust" | "ts";
170
+ }
115
171
  interface GridColumn<T = Record<string, unknown>> {
116
172
  key: keyof T & string;
117
173
  label: string;
@@ -316,6 +372,24 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
316
372
  * ]}
317
373
  */
318
374
  customRules?: YuktaiGridRule<T>[];
375
+ /**
376
+ * Search and sort engine.
377
+ *
378
+ * - "ts" (default): TypeScript, as before
379
+ * - "rust": the Rust (WebAssembly) engine, about 13 KB, embedded
380
+ * - "auto": Rust from 10,000 rows, TypeScript below
381
+ *
382
+ * Results are identical. Rust handles search and number/date sorting;
383
+ * text sorting always uses TypeScript (browser locale rules for Telugu).
384
+ */
385
+ engine?: GridEngine;
386
+ /**
387
+ * Show how long the last search/sort took and which engine answered,
388
+ * next to the row count, e.g. "12 rows · 0.9 ms · Rust". Default: false.
389
+ */
390
+ showSearchTime?: boolean;
391
+ /** Called after every search or sort with its time and engine. */
392
+ onSearchTime?: (info: GridSearchTime) => void;
319
393
  /**
320
394
  * Every result from the Agent.
321
395
  */
@@ -326,7 +400,7 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
326
400
  }) => void;
327
401
  }
328
402
 
329
- declare function YuktaiGrid<T extends Record<string, unknown>>({ data, columns, rowKey, view, mobileBreakpoint, theme, locale, ai, search, selectable, selectedKeys, onSelectionChange, pagination, loading, highlightIds, highlightColor, autoScrollToHighlight, onRowClick, onSortChange, empty, className, inputLanguage, toolName, toolDescriptions, webmcp, onWebMCPStatusChange, onAgentResult, customRules, }: YuktaiGridProps<T>): react_jsx_runtime.JSX.Element;
403
+ declare function YuktaiGrid<T extends Record<string, unknown>>({ data, columns, rowKey, view, mobileBreakpoint, theme, locale, ai, search, selectable, selectedKeys, onSelectionChange, pagination, loading, highlightIds, highlightColor, autoScrollToHighlight, onRowClick, onSortChange, empty, className, inputLanguage, toolName, toolDescriptions, webmcp, onWebMCPStatusChange, onAgentResult, customRules, engine, showSearchTime, onSearchTime, }: YuktaiGridProps<T>): react__default.JSX.Element;
330
404
 
331
405
  /**
332
406
  * gridTools — the ONE place where YuktaiGrid tools are defined.
@@ -449,6 +523,11 @@ interface UseGridOptions<T> {
449
523
  locale?: string;
450
524
  /** Starting filters (optional) */
451
525
  initialFilters?: GridToolFilter[];
526
+ /**
527
+ * Search and sort engine: "ts" (default), "rust" (always) or "auto" (Rust
528
+ * from 10,000 rows). Same results either way; Rust is faster on big data.
529
+ */
530
+ engine?: GridEngine;
452
531
  }
453
532
  interface UseGridReturn<T> {
454
533
  displayedData: T[];
@@ -477,6 +556,8 @@ interface UseGridReturn<T> {
477
556
  setPageSize: (s: number) => void;
478
557
  isMobile: boolean;
479
558
  reset: () => void;
559
+ /** Last search/sort: time in ms and which engine answered (null when neither ran) */
560
+ searchTime: GridSearchTime | null;
480
561
  }
481
562
  declare function useGrid<T extends Record<string, unknown>>(options: UseGridOptions<T>): UseGridReturn<T>;
482
563
 
@@ -522,7 +603,7 @@ interface YuktaiGridAIProps<T> {
522
603
  */
523
604
  onInputLanguageChange?: (language: InputLanguage) => void;
524
605
  }
525
- declare function YuktaiGridAI<T extends Record<string, unknown>>({ data, columns, onSearch, onSort, theme, language, inputLanguage, embedded, agent, onInputLanguageChange, }: YuktaiGridAIProps<T>): react_jsx_runtime.JSX.Element;
606
+ declare function YuktaiGridAI<T extends Record<string, unknown>>({ data, columns, onSearch, onSort, theme, language, inputLanguage, embedded, agent, onInputLanguageChange, }: YuktaiGridAIProps<T>): react__default.JSX.Element;
526
607
 
527
608
  type ModelContextTool = {
528
609
  name: string;
@@ -1182,7 +1263,7 @@ declare function AgenticGridBar({ grid, placeholder, examples, style, }: {
1182
1263
  placeholder?: string;
1183
1264
  examples?: string[];
1184
1265
  style?: CSSProperties;
1185
- }): react_jsx_runtime.JSX.Element;
1266
+ }): react.JSX.Element;
1186
1267
  type Tab = "copilot" | "qa" | "forms" | "design" | "ask" | "voice";
1187
1268
  interface AgenticPanelProps {
1188
1269
  defaultTab?: Tab;
@@ -1192,7 +1273,7 @@ interface AgenticPanelProps {
1192
1273
  generate?: (question: string, context: string) => Promise<string>;
1193
1274
  style?: CSSProperties;
1194
1275
  }
1195
- declare function AgenticPanel({ defaultTab, voiceLang, generate, style }: AgenticPanelProps): react_jsx_runtime.JSX.Element;
1276
+ declare function AgenticPanel({ defaultTab, voiceLang, generate, style }: AgenticPanelProps): react.JSX.Element;
1196
1277
 
1197
1278
  declare global {
1198
1279
  var __yuktai_runtime__: Runtime | undefined;
@@ -1227,4 +1308,4 @@ declare const YuktAI: {
1227
1308
  scan(): A11yReport;
1228
1309
  };
1229
1310
 
1230
- export { type A11yConfig, type A11yCopilot, type A11yCopilotOptions, type A11yFix, type A11yReport, type AIFeatures, AUDIT_RULES, type AgenticAnswerKind, AgenticGridBar, AgenticPanel, type AgenticPanelProps, type Aggregation, type AuditCheck, type AuditIssue, type AuditOptions, type AuditReport, type AuditRoot, type AuditRuleId, type AuditSeverity, type ColorBlindMode, type ComparePeriodsOptions, type ContextAnswer, type ContextHit, type ContextIndexOptions, type ContextPassage, type CopilotFixResult, type CopilotState, type CreateGridToolsOptions, DEFAULT_A11Y_SETTINGS, type DesignCategory, type DesignFinding, type DesignReview, type DesignReviewOptions, FONT_MAX, FONT_MIN, FONT_STEP, type FilterConfig, type FilterOperator, type FormField, type FormFinding, type FormFindingLevel, type FormReview, type FormReviewOptions, type GridAgentErrorCode, type GridAgentResult, type GridAgentStep, type GridAgentTool, type GridAnomaly, type GridAnswer, type GridColumn, type GridInputLanguage, type GridIntent, type GridIntentContext, type GridLocale, type GridNavAction, type GridQueryResult, type GridTheme, type GridTool, type GridToolColumn, type GridToolContext, type GridToolErrorCode, type GridToolFilter, type GridToolFilterOperator, type GridToolId, type GridToolLocale, type GridToolResult, type GridToolSort, type GridTranslations, type GroupResult, type IndicLanguageLocale, type InsightAnswer, type PageAnswer, type PageIntent, type PageOutline, type PaginationConfig, type ParseOptions, type ParsedGridQuery, type Period, type PeriodChange, type PeriodComparison, type PlannedStep, type RGBA, type RunTasksOptions, Runtime, type Severity, type SortConfig, type SortDirection, type StepResult, type TaskAction, type TaskRunResult, type UseAgenticGridOptions, type UseGridOptions, type UseGridReturn, type ViewMode, type VoiceA11yCommand, type VoiceA11yControllerOptions, type VoiceFeatures, type WebMCPState, type WebMCPStatus, YuktAI, YuktAIWrapper, type YuktAIWrapperProps, YuktaiGrid, YuktaiGridAI, type YuktaiGridAIProps, useYuktaiGridAgent as YuktaiGridAgent, type YuktaiGridAgentProps, type YuktaiGridProps, type YuktaiGridRule, type YuktaiGridRuleContext, YuktaiGridWebMCP, type YuktaiGridWebMCPProps, accessibleName, addPeriods, aggregate, aiPlugin, analyzePage, answerGridQuestion, applyGridFilters, askAboutPage, askInsight, auditToJSON, auditToMarkdown, clearFilters, clearSort, comparePeriods, contrastRatio, countGrid, createA11yCopilot, createContextIndex, createGridTools, createVoiceA11yController, YuktAIWrapper as default, detectAnomalies, detectPageIntent, executeGridQuery, filterGrid, findMentionedColumn, getColumns, getRow, getRowId, gridPassages, groupBy, highlightRows, moveGridRowFocus, openRow, pagePassages, parseAmount, parseColor, parseGridIntent, parseGridQuery, parseVoiceA11yCommand, planTasks, readFormFields, relativeLuminance, reviewDesign, reviewForm, reviewForms, runGridQuery, runQaAudit, runTasks, searchGrid, selectRow, sortGrid, startOfPeriod, summarizeRows, toGridToolColumns, tokenize, trend, useAgenticGrid, useGrid, useYuktaiGridAgent, voicePlugin, wcagPlugin as wcag, wcagPlugin };
1311
+ export { type A11yConfig, type A11yCopilot, type A11yCopilotOptions, type A11yFix, type A11yReport, type AIFeatures, AUDIT_RULES, type AgenticAnswerKind, AgenticGridBar, AgenticPanel, type AgenticPanelProps, type Aggregation, type AuditCheck, type AuditIssue, type AuditOptions, type AuditReport, type AuditRoot, type AuditRuleId, type AuditSeverity, type ColorBlindMode, type ComparePeriodsOptions, type ContextAnswer, type ContextHit, type ContextIndexOptions, type ContextPassage, type CopilotFixResult, type CopilotState, type CreateGridToolsOptions, DEFAULT_A11Y_SETTINGS, type DesignCategory, type DesignFinding, type DesignReview, type DesignReviewOptions, FONT_MAX, FONT_MIN, FONT_STEP, type FilterConfig, type FilterOperator, type FormField, type FormFinding, type FormFindingLevel, type FormReview, type FormReviewOptions, type GridAgentErrorCode, type GridAgentResult, type GridAgentStep, type GridAgentTool, type GridAnomaly, type GridAnswer, type GridColumn, GridCore, type GridEngine, type GridInputLanguage, type GridIntent, type GridIntentContext, type GridLocale, type GridNavAction, type GridQueryResult, type GridSearchTime, type GridTheme, type GridTool, type GridToolColumn, type GridToolContext, type GridToolErrorCode, type GridToolFilter, type GridToolFilterOperator, type GridToolId, type GridToolLocale, type GridToolResult, type GridToolSort, type GridTranslations, type GroupResult, type IndicLanguageLocale, type InsightAnswer, type PageAnswer, type PageIntent, type PageOutline, type PaginationConfig, type ParseOptions, type ParsedGridQuery, type Period, type PeriodChange, type PeriodComparison, type PlannedStep, type RGBA, RUST_AUTO_MIN_ROWS, type RunTasksOptions, Runtime, type Severity, type SortConfig, type SortDirection, type StepResult, type TaskAction, type TaskRunResult, type UseAgenticGridOptions, type UseGridOptions, type UseGridReturn, type ViewMode, type VoiceA11yCommand, type VoiceA11yControllerOptions, type VoiceFeatures, type WebMCPState, type WebMCPStatus, YuktAI, YuktAIWrapper, type YuktAIWrapperProps, YuktaiGrid, YuktaiGridAI, type YuktaiGridAIProps, useYuktaiGridAgent as YuktaiGridAgent, type YuktaiGridAgentProps, type YuktaiGridProps, type YuktaiGridRule, type YuktaiGridRuleContext, YuktaiGridWebMCP, type YuktaiGridWebMCPProps, accessibleName, addPeriods, aggregate, aiPlugin, analyzePage, answerGridQuestion, applyGridFilters, askAboutPage, askInsight, auditToJSON, auditToMarkdown, clearFilters, clearSort, comparePeriods, contrastRatio, countGrid, createA11yCopilot, createContextIndex, createGridTools, createVoiceA11yController, YuktAIWrapper as default, detectAnomalies, detectPageIntent, executeGridQuery, filterGrid, findMentionedColumn, getColumns, getRow, getRowId, gridPassages, groupBy, highlightRows, loadGridCore, moveGridRowFocus, openRow, pagePassages, parseAmount, parseColor, parseGridIntent, parseGridQuery, parseVoiceA11yCommand, planTasks, readFormFields, relativeLuminance, reviewDesign, reviewForm, reviewForms, runGridQuery, runQaAudit, runTasks, searchGrid, selectRow, sortGrid, startOfPeriod, summarizeRows, toGridToolColumns, tokenize, trend, useAgenticGrid, useGrid, useYuktaiGridAgent, voicePlugin, wantsRustEngine, wcagPlugin as wcag, wcagPlugin };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode, CSSProperties } from 'react';
1
+ import * as react from 'react';
2
+ import react__default, { ReactNode, CSSProperties } from 'react';
3
3
  export { AbcIcon, AccessibilityIcon, AdminIcon, AlertIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, ApiIcon, ArchitectureIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, BarChartIcon, BoldIcon, BookIcon, BookmarkIcon, BrainIcon, BugReportIcon, BulbIcon, CakeIcon, CalendarIcon, CardsIcon, ChatIcon, CheckIcon, ChevronLeftIcon, ChevronRightIcon, ChevronsIcon, CleaningIcon, ClockIcon, CloseIcon, CloudIcon, CodeIcon, ComputerIcon, ContrastIcon, CopyIcon, DashboardIcon, DataObjectIcon, DeleteIcon, DocumentScannerIcon, DownloadIcon, DragHandleIcon, ExploreIcon, ExternalIcon, EyeIcon, EyeOffIcon, FactCheckIcon, FileIcon, FilterIcon, FirstIcon, FontIcon, FormIcon, FullscreenExitIcon, FullscreenIcon, GavelIcon, GiftIcon, GlobeIcon, GridIcon, HeadphonesIcon, HeartFilledIcon, HeartIcon, HelpIcon, HomeIcon, HubIcon, ICON_MIN_CONTRAST, ICON_NAMES, ICON_PATHS, IconBase, IconName, IconProps, IconShape, IconSvgOptions, IconVariant, ImageIcon, ImageSearchIcon, InfoIcon, InsightsIcon, InstallIcon, IntegrationIcon, ItalicIcon, JoinIcon, KeyIcon, KeyboardIcon, LabelIcon, LampIcon, LastIcon, LayoutIcon, LinkIcon, LoaderIcon, LockIcon, LoginIcon, LogoutIcon, MapIcon, MeditateIcon, MenuIcon, MergeIcon, MicIcon, MinusIcon, MoonIcon, MotionIcon, MovieIcon, MusicIcon, MusicOffIcon, MusicVideoIcon, NamaskarIcon, PageBreakIcon, PaletteIcon, PauseIcon, PenIcon, PersonIcon, PhoneIcon, PinIcon, PlayIcon, PlugIcon, PlusIcon, QuoteIcon, RadioCheckedIcon, RadioIcon, ReadingIcon, RedoIcon, RepeatIcon, ResetIcon, RobotIcon, SaveIcon, SchoolIcon, SearchIcon, SearchOffIcon, SendIcon, SentimentSadIcon, ShareIcon, ShieldCheckIcon, ShuffleIcon, SkipIcon, SlideshowIcon, SortDownIcon, SortIcon, SortUpIcon, SparkIcon, SpeakerIcon, SpeedIcon, SpellcheckIcon, StarIcon, StopIcon, StorageIcon, StyleIcon, SunIcon, SunriseIcon, SunsetIcon, SwapIcon, TargetIcon, TempleIcon, TextIcon, TitleIcon, ToolsIcon, TouchIcon, TrendingDownIcon, TrendingUpIcon, TrophyIcon, UnderlineIcon, UndoIcon, UnlockIcon, UploadIcon, UsersIcon, VolumeOffIcon, VolunteerIcon, WalletIcon, WandIcon, WifiIcon, WifiOffIcon, YuktaiIcon, YuktaiIconProps, ZoomInIcon, ZoomOutIcon, iconContrast, iconSvg, pickGlyphColor } from './icons.js';
4
4
 
5
5
  interface Plugin {
@@ -100,7 +100,7 @@ interface YuktAIWrapperProps {
100
100
  showRag?: boolean;
101
101
  showAgent?: boolean;
102
102
  }
103
- declare function YuktAIWrapper({ position, children, config: configOverrides, showRag, showAgent, }: YuktAIWrapperProps): react_jsx_runtime.JSX.Element;
103
+ declare function YuktAIWrapper({ position, children, config: configOverrides, showRag, showAgent, }: YuktAIWrapperProps): react__default.JSX.Element;
104
104
 
105
105
  declare const aiPlugin: {
106
106
  name: string;
@@ -112,6 +112,62 @@ declare const voicePlugin: {
112
112
  execute(input: string): Promise<string>;
113
113
  };
114
114
 
115
+ /** Which engine sorts and searches the grid. */
116
+ type GridEngine = "ts" | "rust" | "auto";
117
+ /** `engine: "auto"` switches to Rust from this many rows. */
118
+ declare const RUST_AUTO_MIN_ROWS = 10000;
119
+ declare function wantsRustEngine(engine: GridEngine | undefined, rowCount: number): boolean;
120
+ /**
121
+ * Compiles the Rust engine once per page. Resolves `null` when WebAssembly is
122
+ * not available; the grid then simply keeps using TypeScript.
123
+ */
124
+ declare function loadGridCore(): Promise<WebAssembly.Module | null>;
125
+ /**
126
+ * One engine per grid. Holds that grid's search text inside the WebAssembly
127
+ * memory, so each keystroke only sends the query.
128
+ */
129
+ declare class GridCore {
130
+ private readonly x;
131
+ private readonly base;
132
+ private readonly encoder;
133
+ private offsetsPtr;
134
+ private textPtr;
135
+ private textLen;
136
+ private rows;
137
+ private hasIndex;
138
+ private freePtr;
139
+ private constructor();
140
+ /** Creates an engine from a compiled module (default: the one already loaded). */
141
+ static create(mod?: WebAssembly.Module | null): GridCore | null;
142
+ private ensure;
143
+ /**
144
+ * Stores one search text per row (the grid joins its columns with
145
+ * SEARCH_SEPARATOR). Returns false when Rust can't match TypeScript
146
+ * exactly for this data; the grid then searches in TypeScript.
147
+ */
148
+ setSearchTexts(texts: string[]): boolean;
149
+ /**
150
+ * Positions (in the array given to setSearchTexts) of the rows whose text
151
+ * contains `query`, in original order. Null means "use TypeScript".
152
+ */
153
+ search(query: string): Uint32Array | null;
154
+ /**
155
+ * Row positions sorted by `keys` (NaN = empty, always last; equal keys keep
156
+ * their order). Null means "use TypeScript".
157
+ */
158
+ sortByKeys(keys: Float64Array, desc: boolean): Uint32Array | null;
159
+ }
160
+
161
+ /** One search/sort run: what was searched, how long it took, which engine answered. */
162
+ interface GridSearchTime {
163
+ /** The search text ("" when only sorting) */
164
+ query: string;
165
+ /** Milliseconds for search + filters + sort */
166
+ ms: number;
167
+ /** Rows after search and filters */
168
+ rows: number;
169
+ engine: "rust" | "ts";
170
+ }
115
171
  interface GridColumn<T = Record<string, unknown>> {
116
172
  key: keyof T & string;
117
173
  label: string;
@@ -316,6 +372,24 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
316
372
  * ]}
317
373
  */
318
374
  customRules?: YuktaiGridRule<T>[];
375
+ /**
376
+ * Search and sort engine.
377
+ *
378
+ * - "ts" (default): TypeScript, as before
379
+ * - "rust": the Rust (WebAssembly) engine, about 13 KB, embedded
380
+ * - "auto": Rust from 10,000 rows, TypeScript below
381
+ *
382
+ * Results are identical. Rust handles search and number/date sorting;
383
+ * text sorting always uses TypeScript (browser locale rules for Telugu).
384
+ */
385
+ engine?: GridEngine;
386
+ /**
387
+ * Show how long the last search/sort took and which engine answered,
388
+ * next to the row count, e.g. "12 rows · 0.9 ms · Rust". Default: false.
389
+ */
390
+ showSearchTime?: boolean;
391
+ /** Called after every search or sort with its time and engine. */
392
+ onSearchTime?: (info: GridSearchTime) => void;
319
393
  /**
320
394
  * Every result from the Agent.
321
395
  */
@@ -326,7 +400,7 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
326
400
  }) => void;
327
401
  }
328
402
 
329
- declare function YuktaiGrid<T extends Record<string, unknown>>({ data, columns, rowKey, view, mobileBreakpoint, theme, locale, ai, search, selectable, selectedKeys, onSelectionChange, pagination, loading, highlightIds, highlightColor, autoScrollToHighlight, onRowClick, onSortChange, empty, className, inputLanguage, toolName, toolDescriptions, webmcp, onWebMCPStatusChange, onAgentResult, customRules, }: YuktaiGridProps<T>): react_jsx_runtime.JSX.Element;
403
+ declare function YuktaiGrid<T extends Record<string, unknown>>({ data, columns, rowKey, view, mobileBreakpoint, theme, locale, ai, search, selectable, selectedKeys, onSelectionChange, pagination, loading, highlightIds, highlightColor, autoScrollToHighlight, onRowClick, onSortChange, empty, className, inputLanguage, toolName, toolDescriptions, webmcp, onWebMCPStatusChange, onAgentResult, customRules, engine, showSearchTime, onSearchTime, }: YuktaiGridProps<T>): react__default.JSX.Element;
330
404
 
331
405
  /**
332
406
  * gridTools — the ONE place where YuktaiGrid tools are defined.
@@ -449,6 +523,11 @@ interface UseGridOptions<T> {
449
523
  locale?: string;
450
524
  /** Starting filters (optional) */
451
525
  initialFilters?: GridToolFilter[];
526
+ /**
527
+ * Search and sort engine: "ts" (default), "rust" (always) or "auto" (Rust
528
+ * from 10,000 rows). Same results either way; Rust is faster on big data.
529
+ */
530
+ engine?: GridEngine;
452
531
  }
453
532
  interface UseGridReturn<T> {
454
533
  displayedData: T[];
@@ -477,6 +556,8 @@ interface UseGridReturn<T> {
477
556
  setPageSize: (s: number) => void;
478
557
  isMobile: boolean;
479
558
  reset: () => void;
559
+ /** Last search/sort: time in ms and which engine answered (null when neither ran) */
560
+ searchTime: GridSearchTime | null;
480
561
  }
481
562
  declare function useGrid<T extends Record<string, unknown>>(options: UseGridOptions<T>): UseGridReturn<T>;
482
563
 
@@ -522,7 +603,7 @@ interface YuktaiGridAIProps<T> {
522
603
  */
523
604
  onInputLanguageChange?: (language: InputLanguage) => void;
524
605
  }
525
- declare function YuktaiGridAI<T extends Record<string, unknown>>({ data, columns, onSearch, onSort, theme, language, inputLanguage, embedded, agent, onInputLanguageChange, }: YuktaiGridAIProps<T>): react_jsx_runtime.JSX.Element;
606
+ declare function YuktaiGridAI<T extends Record<string, unknown>>({ data, columns, onSearch, onSort, theme, language, inputLanguage, embedded, agent, onInputLanguageChange, }: YuktaiGridAIProps<T>): react__default.JSX.Element;
526
607
 
527
608
  type ModelContextTool = {
528
609
  name: string;
@@ -1182,7 +1263,7 @@ declare function AgenticGridBar({ grid, placeholder, examples, style, }: {
1182
1263
  placeholder?: string;
1183
1264
  examples?: string[];
1184
1265
  style?: CSSProperties;
1185
- }): react_jsx_runtime.JSX.Element;
1266
+ }): react.JSX.Element;
1186
1267
  type Tab = "copilot" | "qa" | "forms" | "design" | "ask" | "voice";
1187
1268
  interface AgenticPanelProps {
1188
1269
  defaultTab?: Tab;
@@ -1192,7 +1273,7 @@ interface AgenticPanelProps {
1192
1273
  generate?: (question: string, context: string) => Promise<string>;
1193
1274
  style?: CSSProperties;
1194
1275
  }
1195
- declare function AgenticPanel({ defaultTab, voiceLang, generate, style }: AgenticPanelProps): react_jsx_runtime.JSX.Element;
1276
+ declare function AgenticPanel({ defaultTab, voiceLang, generate, style }: AgenticPanelProps): react.JSX.Element;
1196
1277
 
1197
1278
  declare global {
1198
1279
  var __yuktai_runtime__: Runtime | undefined;
@@ -1227,4 +1308,4 @@ declare const YuktAI: {
1227
1308
  scan(): A11yReport;
1228
1309
  };
1229
1310
 
1230
- export { type A11yConfig, type A11yCopilot, type A11yCopilotOptions, type A11yFix, type A11yReport, type AIFeatures, AUDIT_RULES, type AgenticAnswerKind, AgenticGridBar, AgenticPanel, type AgenticPanelProps, type Aggregation, type AuditCheck, type AuditIssue, type AuditOptions, type AuditReport, type AuditRoot, type AuditRuleId, type AuditSeverity, type ColorBlindMode, type ComparePeriodsOptions, type ContextAnswer, type ContextHit, type ContextIndexOptions, type ContextPassage, type CopilotFixResult, type CopilotState, type CreateGridToolsOptions, DEFAULT_A11Y_SETTINGS, type DesignCategory, type DesignFinding, type DesignReview, type DesignReviewOptions, FONT_MAX, FONT_MIN, FONT_STEP, type FilterConfig, type FilterOperator, type FormField, type FormFinding, type FormFindingLevel, type FormReview, type FormReviewOptions, type GridAgentErrorCode, type GridAgentResult, type GridAgentStep, type GridAgentTool, type GridAnomaly, type GridAnswer, type GridColumn, type GridInputLanguage, type GridIntent, type GridIntentContext, type GridLocale, type GridNavAction, type GridQueryResult, type GridTheme, type GridTool, type GridToolColumn, type GridToolContext, type GridToolErrorCode, type GridToolFilter, type GridToolFilterOperator, type GridToolId, type GridToolLocale, type GridToolResult, type GridToolSort, type GridTranslations, type GroupResult, type IndicLanguageLocale, type InsightAnswer, type PageAnswer, type PageIntent, type PageOutline, type PaginationConfig, type ParseOptions, type ParsedGridQuery, type Period, type PeriodChange, type PeriodComparison, type PlannedStep, type RGBA, type RunTasksOptions, Runtime, type Severity, type SortConfig, type SortDirection, type StepResult, type TaskAction, type TaskRunResult, type UseAgenticGridOptions, type UseGridOptions, type UseGridReturn, type ViewMode, type VoiceA11yCommand, type VoiceA11yControllerOptions, type VoiceFeatures, type WebMCPState, type WebMCPStatus, YuktAI, YuktAIWrapper, type YuktAIWrapperProps, YuktaiGrid, YuktaiGridAI, type YuktaiGridAIProps, useYuktaiGridAgent as YuktaiGridAgent, type YuktaiGridAgentProps, type YuktaiGridProps, type YuktaiGridRule, type YuktaiGridRuleContext, YuktaiGridWebMCP, type YuktaiGridWebMCPProps, accessibleName, addPeriods, aggregate, aiPlugin, analyzePage, answerGridQuestion, applyGridFilters, askAboutPage, askInsight, auditToJSON, auditToMarkdown, clearFilters, clearSort, comparePeriods, contrastRatio, countGrid, createA11yCopilot, createContextIndex, createGridTools, createVoiceA11yController, YuktAIWrapper as default, detectAnomalies, detectPageIntent, executeGridQuery, filterGrid, findMentionedColumn, getColumns, getRow, getRowId, gridPassages, groupBy, highlightRows, moveGridRowFocus, openRow, pagePassages, parseAmount, parseColor, parseGridIntent, parseGridQuery, parseVoiceA11yCommand, planTasks, readFormFields, relativeLuminance, reviewDesign, reviewForm, reviewForms, runGridQuery, runQaAudit, runTasks, searchGrid, selectRow, sortGrid, startOfPeriod, summarizeRows, toGridToolColumns, tokenize, trend, useAgenticGrid, useGrid, useYuktaiGridAgent, voicePlugin, wcagPlugin as wcag, wcagPlugin };
1311
+ export { type A11yConfig, type A11yCopilot, type A11yCopilotOptions, type A11yFix, type A11yReport, type AIFeatures, AUDIT_RULES, type AgenticAnswerKind, AgenticGridBar, AgenticPanel, type AgenticPanelProps, type Aggregation, type AuditCheck, type AuditIssue, type AuditOptions, type AuditReport, type AuditRoot, type AuditRuleId, type AuditSeverity, type ColorBlindMode, type ComparePeriodsOptions, type ContextAnswer, type ContextHit, type ContextIndexOptions, type ContextPassage, type CopilotFixResult, type CopilotState, type CreateGridToolsOptions, DEFAULT_A11Y_SETTINGS, type DesignCategory, type DesignFinding, type DesignReview, type DesignReviewOptions, FONT_MAX, FONT_MIN, FONT_STEP, type FilterConfig, type FilterOperator, type FormField, type FormFinding, type FormFindingLevel, type FormReview, type FormReviewOptions, type GridAgentErrorCode, type GridAgentResult, type GridAgentStep, type GridAgentTool, type GridAnomaly, type GridAnswer, type GridColumn, GridCore, type GridEngine, type GridInputLanguage, type GridIntent, type GridIntentContext, type GridLocale, type GridNavAction, type GridQueryResult, type GridSearchTime, type GridTheme, type GridTool, type GridToolColumn, type GridToolContext, type GridToolErrorCode, type GridToolFilter, type GridToolFilterOperator, type GridToolId, type GridToolLocale, type GridToolResult, type GridToolSort, type GridTranslations, type GroupResult, type IndicLanguageLocale, type InsightAnswer, type PageAnswer, type PageIntent, type PageOutline, type PaginationConfig, type ParseOptions, type ParsedGridQuery, type Period, type PeriodChange, type PeriodComparison, type PlannedStep, type RGBA, RUST_AUTO_MIN_ROWS, type RunTasksOptions, Runtime, type Severity, type SortConfig, type SortDirection, type StepResult, type TaskAction, type TaskRunResult, type UseAgenticGridOptions, type UseGridOptions, type UseGridReturn, type ViewMode, type VoiceA11yCommand, type VoiceA11yControllerOptions, type VoiceFeatures, type WebMCPState, type WebMCPStatus, YuktAI, YuktAIWrapper, type YuktAIWrapperProps, YuktaiGrid, YuktaiGridAI, type YuktaiGridAIProps, useYuktaiGridAgent as YuktaiGridAgent, type YuktaiGridAgentProps, type YuktaiGridProps, type YuktaiGridRule, type YuktaiGridRuleContext, YuktaiGridWebMCP, type YuktaiGridWebMCPProps, accessibleName, addPeriods, aggregate, aiPlugin, analyzePage, answerGridQuestion, applyGridFilters, askAboutPage, askInsight, auditToJSON, auditToMarkdown, clearFilters, clearSort, comparePeriods, contrastRatio, countGrid, createA11yCopilot, createContextIndex, createGridTools, createVoiceA11yController, YuktAIWrapper as default, detectAnomalies, detectPageIntent, executeGridQuery, filterGrid, findMentionedColumn, getColumns, getRow, getRowId, gridPassages, groupBy, highlightRows, loadGridCore, moveGridRowFocus, openRow, pagePassages, parseAmount, parseColor, parseGridIntent, parseGridQuery, parseVoiceA11yCommand, planTasks, readFormFields, relativeLuminance, reviewDesign, reviewForm, reviewForms, runGridQuery, runQaAudit, runTasks, searchGrid, selectRow, sortGrid, startOfPeriod, summarizeRows, toGridToolColumns, tokenize, trend, useAgenticGrid, useGrid, useYuktaiGridAgent, voicePlugin, wantsRustEngine, wcagPlugin as wcag, wcagPlugin };