@yuktishaalaa/yuktai 5.3.6 → 5.3.8
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 +52 -0
- package/dist/icons.d.mts +169 -169
- package/dist/icons.d.ts +169 -169
- package/dist/index.d.mts +39 -8
- package/dist/index.d.ts +39 -8
- package/dist/index.js +82 -81
- package/dist/index.mjs +39 -38
- package/package.json +2 -2
- package/vanilla/README.md +2 -0
- package/vanilla/index.js +1373 -766
- package/vanilla/index.min.js +54 -53
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
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):
|
|
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;
|
|
@@ -158,6 +158,16 @@ declare class GridCore {
|
|
|
158
158
|
sortByKeys(keys: Float64Array, desc: boolean): Uint32Array | null;
|
|
159
159
|
}
|
|
160
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
|
+
}
|
|
161
171
|
interface GridColumn<T = Record<string, unknown>> {
|
|
162
172
|
key: keyof T & string;
|
|
163
173
|
label: string;
|
|
@@ -373,6 +383,13 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
|
|
|
373
383
|
* text sorting always uses TypeScript (browser locale rules for Telugu).
|
|
374
384
|
*/
|
|
375
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;
|
|
376
393
|
/**
|
|
377
394
|
* Every result from the Agent.
|
|
378
395
|
*/
|
|
@@ -383,7 +400,7 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
|
|
|
383
400
|
}) => void;
|
|
384
401
|
}
|
|
385
402
|
|
|
386
|
-
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, }: YuktaiGridProps<T>):
|
|
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;
|
|
387
404
|
|
|
388
405
|
/**
|
|
389
406
|
* gridTools — the ONE place where YuktaiGrid tools are defined.
|
|
@@ -539,6 +556,8 @@ interface UseGridReturn<T> {
|
|
|
539
556
|
setPageSize: (s: number) => void;
|
|
540
557
|
isMobile: boolean;
|
|
541
558
|
reset: () => void;
|
|
559
|
+
/** Last search/sort: time in ms and which engine answered (null when neither ran) */
|
|
560
|
+
searchTime: GridSearchTime | null;
|
|
542
561
|
}
|
|
543
562
|
declare function useGrid<T extends Record<string, unknown>>(options: UseGridOptions<T>): UseGridReturn<T>;
|
|
544
563
|
|
|
@@ -584,7 +603,7 @@ interface YuktaiGridAIProps<T> {
|
|
|
584
603
|
*/
|
|
585
604
|
onInputLanguageChange?: (language: InputLanguage) => void;
|
|
586
605
|
}
|
|
587
|
-
declare function YuktaiGridAI<T extends Record<string, unknown>>({ data, columns, onSearch, onSort, theme, language, inputLanguage, embedded, agent, onInputLanguageChange, }: YuktaiGridAIProps<T>):
|
|
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;
|
|
588
607
|
|
|
589
608
|
type ModelContextTool = {
|
|
590
609
|
name: string;
|
|
@@ -1075,6 +1094,12 @@ interface ContextIndexOptions<T = Record<string, unknown>> {
|
|
|
1075
1094
|
id: string;
|
|
1076
1095
|
text: string;
|
|
1077
1096
|
}>;
|
|
1097
|
+
/**
|
|
1098
|
+
* Search engine: "ts" (default), "rust" (always) or "auto" (Rust from 1,000
|
|
1099
|
+
* passages). Same passages, same scores, same order; Rust is faster on long
|
|
1100
|
+
* pages and big grids. Works offline (the engine is embedded).
|
|
1101
|
+
*/
|
|
1102
|
+
engine?: GridEngine;
|
|
1078
1103
|
}
|
|
1079
1104
|
declare function createContextIndex<T>(options?: ContextIndexOptions<T>): {
|
|
1080
1105
|
search: (question: string, k?: number) => ContextHit[];
|
|
@@ -1086,6 +1111,10 @@ declare function createContextIndex<T>(options?: ContextIndexOptions<T>): {
|
|
|
1086
1111
|
rebuild: () => void;
|
|
1087
1112
|
update(next: Partial<ContextIndexOptions<T>>): void;
|
|
1088
1113
|
size: () => number;
|
|
1114
|
+
/** "rust" when the Rust engine answers searches for this index, else "ts". */
|
|
1115
|
+
readonly engine: "rust" | "ts";
|
|
1116
|
+
/** Resolves "rust" or "ts" once the engine is loaded (or not wanted). */
|
|
1117
|
+
whenEngineReady: () => Promise<"ts" | "rust">;
|
|
1089
1118
|
};
|
|
1090
1119
|
|
|
1091
1120
|
type TaskAction = "filter" | "highlight" | "sort" | "clear" | "count" | "summarize" | "anomalies" | "open" | "select";
|
|
@@ -1244,7 +1273,7 @@ declare function AgenticGridBar({ grid, placeholder, examples, style, }: {
|
|
|
1244
1273
|
placeholder?: string;
|
|
1245
1274
|
examples?: string[];
|
|
1246
1275
|
style?: CSSProperties;
|
|
1247
|
-
}):
|
|
1276
|
+
}): react.JSX.Element;
|
|
1248
1277
|
type Tab = "copilot" | "qa" | "forms" | "design" | "ask" | "voice";
|
|
1249
1278
|
interface AgenticPanelProps {
|
|
1250
1279
|
defaultTab?: Tab;
|
|
@@ -1252,9 +1281,11 @@ interface AgenticPanelProps {
|
|
|
1252
1281
|
voiceLang?: string;
|
|
1253
1282
|
/** Optional model hook for Ask page, e.g. Gemini Nano or your own API. */
|
|
1254
1283
|
generate?: (question: string, context: string) => Promise<string>;
|
|
1284
|
+
/** Ask page search engine: "ts" (default), "rust" or "auto". Same answers; Rust is faster on long pages. */
|
|
1285
|
+
engine?: GridEngine;
|
|
1255
1286
|
style?: CSSProperties;
|
|
1256
1287
|
}
|
|
1257
|
-
declare function AgenticPanel({ defaultTab, voiceLang, generate, style }: AgenticPanelProps):
|
|
1288
|
+
declare function AgenticPanel({ defaultTab, voiceLang, generate, engine, style }: AgenticPanelProps): react.JSX.Element;
|
|
1258
1289
|
|
|
1259
1290
|
declare global {
|
|
1260
1291
|
var __yuktai_runtime__: Runtime | undefined;
|
|
@@ -1289,4 +1320,4 @@ declare const YuktAI: {
|
|
|
1289
1320
|
scan(): A11yReport;
|
|
1290
1321
|
};
|
|
1291
1322
|
|
|
1292
|
-
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 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 };
|
|
1323
|
+
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
|
|
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):
|
|
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;
|
|
@@ -158,6 +158,16 @@ declare class GridCore {
|
|
|
158
158
|
sortByKeys(keys: Float64Array, desc: boolean): Uint32Array | null;
|
|
159
159
|
}
|
|
160
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
|
+
}
|
|
161
171
|
interface GridColumn<T = Record<string, unknown>> {
|
|
162
172
|
key: keyof T & string;
|
|
163
173
|
label: string;
|
|
@@ -373,6 +383,13 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
|
|
|
373
383
|
* text sorting always uses TypeScript (browser locale rules for Telugu).
|
|
374
384
|
*/
|
|
375
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;
|
|
376
393
|
/**
|
|
377
394
|
* Every result from the Agent.
|
|
378
395
|
*/
|
|
@@ -383,7 +400,7 @@ interface YuktaiGridProps<T = Record<string, unknown>> {
|
|
|
383
400
|
}) => void;
|
|
384
401
|
}
|
|
385
402
|
|
|
386
|
-
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, }: YuktaiGridProps<T>):
|
|
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;
|
|
387
404
|
|
|
388
405
|
/**
|
|
389
406
|
* gridTools — the ONE place where YuktaiGrid tools are defined.
|
|
@@ -539,6 +556,8 @@ interface UseGridReturn<T> {
|
|
|
539
556
|
setPageSize: (s: number) => void;
|
|
540
557
|
isMobile: boolean;
|
|
541
558
|
reset: () => void;
|
|
559
|
+
/** Last search/sort: time in ms and which engine answered (null when neither ran) */
|
|
560
|
+
searchTime: GridSearchTime | null;
|
|
542
561
|
}
|
|
543
562
|
declare function useGrid<T extends Record<string, unknown>>(options: UseGridOptions<T>): UseGridReturn<T>;
|
|
544
563
|
|
|
@@ -584,7 +603,7 @@ interface YuktaiGridAIProps<T> {
|
|
|
584
603
|
*/
|
|
585
604
|
onInputLanguageChange?: (language: InputLanguage) => void;
|
|
586
605
|
}
|
|
587
|
-
declare function YuktaiGridAI<T extends Record<string, unknown>>({ data, columns, onSearch, onSort, theme, language, inputLanguage, embedded, agent, onInputLanguageChange, }: YuktaiGridAIProps<T>):
|
|
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;
|
|
588
607
|
|
|
589
608
|
type ModelContextTool = {
|
|
590
609
|
name: string;
|
|
@@ -1075,6 +1094,12 @@ interface ContextIndexOptions<T = Record<string, unknown>> {
|
|
|
1075
1094
|
id: string;
|
|
1076
1095
|
text: string;
|
|
1077
1096
|
}>;
|
|
1097
|
+
/**
|
|
1098
|
+
* Search engine: "ts" (default), "rust" (always) or "auto" (Rust from 1,000
|
|
1099
|
+
* passages). Same passages, same scores, same order; Rust is faster on long
|
|
1100
|
+
* pages and big grids. Works offline (the engine is embedded).
|
|
1101
|
+
*/
|
|
1102
|
+
engine?: GridEngine;
|
|
1078
1103
|
}
|
|
1079
1104
|
declare function createContextIndex<T>(options?: ContextIndexOptions<T>): {
|
|
1080
1105
|
search: (question: string, k?: number) => ContextHit[];
|
|
@@ -1086,6 +1111,10 @@ declare function createContextIndex<T>(options?: ContextIndexOptions<T>): {
|
|
|
1086
1111
|
rebuild: () => void;
|
|
1087
1112
|
update(next: Partial<ContextIndexOptions<T>>): void;
|
|
1088
1113
|
size: () => number;
|
|
1114
|
+
/** "rust" when the Rust engine answers searches for this index, else "ts". */
|
|
1115
|
+
readonly engine: "rust" | "ts";
|
|
1116
|
+
/** Resolves "rust" or "ts" once the engine is loaded (or not wanted). */
|
|
1117
|
+
whenEngineReady: () => Promise<"ts" | "rust">;
|
|
1089
1118
|
};
|
|
1090
1119
|
|
|
1091
1120
|
type TaskAction = "filter" | "highlight" | "sort" | "clear" | "count" | "summarize" | "anomalies" | "open" | "select";
|
|
@@ -1244,7 +1273,7 @@ declare function AgenticGridBar({ grid, placeholder, examples, style, }: {
|
|
|
1244
1273
|
placeholder?: string;
|
|
1245
1274
|
examples?: string[];
|
|
1246
1275
|
style?: CSSProperties;
|
|
1247
|
-
}):
|
|
1276
|
+
}): react.JSX.Element;
|
|
1248
1277
|
type Tab = "copilot" | "qa" | "forms" | "design" | "ask" | "voice";
|
|
1249
1278
|
interface AgenticPanelProps {
|
|
1250
1279
|
defaultTab?: Tab;
|
|
@@ -1252,9 +1281,11 @@ interface AgenticPanelProps {
|
|
|
1252
1281
|
voiceLang?: string;
|
|
1253
1282
|
/** Optional model hook for Ask page, e.g. Gemini Nano or your own API. */
|
|
1254
1283
|
generate?: (question: string, context: string) => Promise<string>;
|
|
1284
|
+
/** Ask page search engine: "ts" (default), "rust" or "auto". Same answers; Rust is faster on long pages. */
|
|
1285
|
+
engine?: GridEngine;
|
|
1255
1286
|
style?: CSSProperties;
|
|
1256
1287
|
}
|
|
1257
|
-
declare function AgenticPanel({ defaultTab, voiceLang, generate, style }: AgenticPanelProps):
|
|
1288
|
+
declare function AgenticPanel({ defaultTab, voiceLang, generate, engine, style }: AgenticPanelProps): react.JSX.Element;
|
|
1258
1289
|
|
|
1259
1290
|
declare global {
|
|
1260
1291
|
var __yuktai_runtime__: Runtime | undefined;
|
|
@@ -1289,4 +1320,4 @@ declare const YuktAI: {
|
|
|
1289
1320
|
scan(): A11yReport;
|
|
1290
1321
|
};
|
|
1291
1322
|
|
|
1292
|
-
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 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 };
|
|
1323
|
+
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 };
|