@axiom-lattice/react-sdk 2.1.37 → 2.1.38
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 +272 -9
- package/dist/index.d.ts +272 -9
- package/dist/index.js +10269 -7914
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10356 -8008
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,8 @@ import React__default, { ReactNode } from 'react';
|
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
import { Client, Assistant, CreateAssistantOptions, UpdateAssistantOptions } from '@axiom-lattice/client-sdk';
|
|
8
8
|
import { Prompts } from '@ant-design/x';
|
|
9
|
-
import { GetProp } from 'antd';
|
|
9
|
+
import { GetProp, ThemeConfig } from 'antd';
|
|
10
|
+
export { ThemeConfig } from 'antd';
|
|
10
11
|
import { NodeProps, Node } from '@xyflow/react';
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -323,6 +324,8 @@ declare function useAgentChat<T extends UseChatOptions>(options?: T): ChatStateW
|
|
|
323
324
|
loadMessages: (limit?: number) => Promise<void>;
|
|
324
325
|
clearMessages: () => void;
|
|
325
326
|
clearError: () => void;
|
|
327
|
+
customRunConfig: Record<string, any>;
|
|
328
|
+
updateCustomRunConfig: (config: Record<string, any>) => void;
|
|
326
329
|
};
|
|
327
330
|
|
|
328
331
|
/**
|
|
@@ -397,6 +400,8 @@ interface AgentThreadContextValue<T extends UseChatOptions> {
|
|
|
397
400
|
loadMessages: (limit?: number) => Promise<void>;
|
|
398
401
|
clearMessages: () => void;
|
|
399
402
|
clearError: () => void;
|
|
403
|
+
customRunConfig: Record<string, any>;
|
|
404
|
+
updateCustomRunConfig: (config: Record<string, any>) => void;
|
|
400
405
|
}
|
|
401
406
|
/**
|
|
402
407
|
* Props for AgentThreadProvider
|
|
@@ -610,6 +615,9 @@ interface ChatingProps {
|
|
|
610
615
|
showSender?: boolean;
|
|
611
616
|
showHITL?: boolean;
|
|
612
617
|
showRefreshButton?: boolean;
|
|
618
|
+
emptyStateGreeting?: React__default.ReactNode;
|
|
619
|
+
emptyStateQuestion?: string;
|
|
620
|
+
welcomePrefix?: string;
|
|
613
621
|
}
|
|
614
622
|
declare const Chating: React__default.FC<ChatingProps>;
|
|
615
623
|
|
|
@@ -720,6 +728,8 @@ declare const useChatUIContext: () => {
|
|
|
720
728
|
interface ConversationThread {
|
|
721
729
|
id: string;
|
|
722
730
|
label: string;
|
|
731
|
+
createdAt?: string;
|
|
732
|
+
updatedAt?: string;
|
|
723
733
|
}
|
|
724
734
|
/**
|
|
725
735
|
* Conversation context value
|
|
@@ -785,6 +795,15 @@ interface ConversationContextValue {
|
|
|
785
795
|
* Refresh threads for the current assistant
|
|
786
796
|
*/
|
|
787
797
|
refresh: () => Promise<void>;
|
|
798
|
+
/**
|
|
799
|
+
* Custom run configuration (cross-thread, assistant-level)
|
|
800
|
+
* Used for metrics datasource and other assistant-wide settings
|
|
801
|
+
*/
|
|
802
|
+
customRunConfig: Record<string, any>;
|
|
803
|
+
/**
|
|
804
|
+
* Update custom run configuration
|
|
805
|
+
*/
|
|
806
|
+
updateCustomRunConfig: (config: Record<string, any>) => void;
|
|
788
807
|
}
|
|
789
808
|
/**
|
|
790
809
|
* Conversation context
|
|
@@ -796,6 +815,11 @@ declare const ConversationContext: React$1.Context<ConversationContextValue>;
|
|
|
796
815
|
interface ConversationContextProviderProps {
|
|
797
816
|
children: React.ReactNode;
|
|
798
817
|
}
|
|
818
|
+
/**
|
|
819
|
+
* Generate a thread label from the first message content
|
|
820
|
+
* Extracts first 15 characters of text content, excluding attachments
|
|
821
|
+
*/
|
|
822
|
+
declare function generateLabelFromMessage(message: string): string;
|
|
799
823
|
/**
|
|
800
824
|
* Provider component for ConversationContext
|
|
801
825
|
* Manages conversation thread state for assistants
|
|
@@ -899,6 +923,26 @@ declare const AssistantContextProvider: ({ children, autoLoad, initialAssistantI
|
|
|
899
923
|
*/
|
|
900
924
|
declare const useAssistantContext: () => AssistantContextValue;
|
|
901
925
|
|
|
926
|
+
/**
|
|
927
|
+
* Analysis item for BusinessAnalysisPrompts
|
|
928
|
+
*/
|
|
929
|
+
interface AnalysisItem {
|
|
930
|
+
key: string;
|
|
931
|
+
icon?: ReactNode;
|
|
932
|
+
label: string;
|
|
933
|
+
description?: string;
|
|
934
|
+
content: string;
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* Analysis category for BusinessAnalysisPrompts
|
|
938
|
+
*/
|
|
939
|
+
interface AnalysisCategory {
|
|
940
|
+
key: string;
|
|
941
|
+
title: string;
|
|
942
|
+
icon?: ReactNode;
|
|
943
|
+
color?: string;
|
|
944
|
+
items: AnalysisItem[];
|
|
945
|
+
}
|
|
902
946
|
/**
|
|
903
947
|
* Middleware tool definition
|
|
904
948
|
*/
|
|
@@ -964,7 +1008,7 @@ interface MiddlewareConfigDefinition {
|
|
|
964
1008
|
/**
|
|
965
1009
|
* Sidebar menu item type
|
|
966
1010
|
*/
|
|
967
|
-
type SideMenuItemType = "drawer" | "route";
|
|
1011
|
+
type SideMenuItemType = "drawer" | "route" | "action";
|
|
968
1012
|
interface ResourceFolderConfig {
|
|
969
1013
|
name: string;
|
|
970
1014
|
displayName?: string;
|
|
@@ -984,8 +1028,8 @@ interface SideMenuItemConfig {
|
|
|
984
1028
|
icon?: ReactNode;
|
|
985
1029
|
/** Order for sorting menu items (lower values first) */
|
|
986
1030
|
order?: number;
|
|
987
|
-
/** Whether this is a builtin menu item (
|
|
988
|
-
builtin?: "
|
|
1031
|
+
/** Whether this is a builtin menu item (new-analysis, thread-history, assistants, skill, tools, workspace, settings, database, metrics, projects) */
|
|
1032
|
+
builtin?: "new-analysis" | "thread-history" | "assistants" | "skill" | "tools" | "workspace" | "settings" | "database" | "metrics" | "projects";
|
|
989
1033
|
/**
|
|
990
1034
|
* Menu group for organizing items
|
|
991
1035
|
*/
|
|
@@ -1001,6 +1045,24 @@ interface SideMenuItemConfig {
|
|
|
1001
1045
|
title?: string;
|
|
1002
1046
|
/** Drawer width in pixels or percentage (for drawer type) */
|
|
1003
1047
|
width?: string | number;
|
|
1048
|
+
/**
|
|
1049
|
+
* Whether to display drawer content inline in expanded sidebar mode
|
|
1050
|
+
* When true, content shows below the menu item instead of in a drawer
|
|
1051
|
+
* Defaults to false, but true for "workspace" builtin
|
|
1052
|
+
*/
|
|
1053
|
+
inline?: boolean;
|
|
1054
|
+
/**
|
|
1055
|
+
* Maximum height for inline drawer content in pixels
|
|
1056
|
+
* Only applies when inline is true
|
|
1057
|
+
* Defaults to 400
|
|
1058
|
+
*/
|
|
1059
|
+
inlineMaxHeight?: number;
|
|
1060
|
+
/**
|
|
1061
|
+
* Whether inline drawer is expanded by default
|
|
1062
|
+
* Only applies when inline is true
|
|
1063
|
+
* Defaults to false
|
|
1064
|
+
*/
|
|
1065
|
+
inlineDefaultExpanded?: boolean;
|
|
1004
1066
|
/** Component to render in SideApp (for route type) */
|
|
1005
1067
|
sideAppComponent?: ReactNode;
|
|
1006
1068
|
}
|
|
@@ -1091,11 +1153,23 @@ interface LatticeChatShellConfig {
|
|
|
1091
1153
|
*/
|
|
1092
1154
|
enableSkillSlot?: boolean;
|
|
1093
1155
|
/**
|
|
1094
|
-
*
|
|
1095
|
-
*
|
|
1096
|
-
*
|
|
1097
|
-
* Defaults to "icon"
|
|
1156
|
+
* Whether to enable the agent picker slot in the chat sender
|
|
1157
|
+
* When enabled, shows an agent selection button in the sender footer
|
|
1158
|
+
* Defaults to true
|
|
1098
1159
|
*/
|
|
1160
|
+
enableAgentSlot?: boolean;
|
|
1161
|
+
/**
|
|
1162
|
+
* Whether to enable the metrics datasource picker slot in the chat sender
|
|
1163
|
+
* When enabled, shows a metrics datasource selection button in the sender footer
|
|
1164
|
+
* Defaults to true
|
|
1165
|
+
*/
|
|
1166
|
+
enableMetricsDataSourceSlot?: boolean;
|
|
1167
|
+
/**
|
|
1168
|
+
* Sidebar display mode
|
|
1169
|
+
* - "icon": Show only icons (default)
|
|
1170
|
+
* - "expanded": Show icons with labels and groups
|
|
1171
|
+
* Defaults to "icon"
|
|
1172
|
+
*/
|
|
1099
1173
|
sidebarMode?: "icon" | "expanded";
|
|
1100
1174
|
/**
|
|
1101
1175
|
* Whether sidebar is expanded by default (only applies when sidebarMode is "expanded")
|
|
@@ -1122,6 +1196,12 @@ interface LatticeChatShellConfig {
|
|
|
1122
1196
|
* If not provided, defaults to Cpu icon
|
|
1123
1197
|
*/
|
|
1124
1198
|
sidebarLogoIcon?: React.ReactNode;
|
|
1199
|
+
/**
|
|
1200
|
+
* Custom analysis prompts data for BusinessAnalysisPrompts component
|
|
1201
|
+
* Allows registering custom analysis categories and items via shell config
|
|
1202
|
+
* If not provided, default analysis data will be used
|
|
1203
|
+
*/
|
|
1204
|
+
analysisPromptsData?: AnalysisCategory[];
|
|
1125
1205
|
}
|
|
1126
1206
|
/**
|
|
1127
1207
|
* Lattice Chat Shell context value interface
|
|
@@ -1373,4 +1453,187 @@ interface SkillCategoryPromptsProps {
|
|
|
1373
1453
|
}
|
|
1374
1454
|
declare const SkillCategoryPrompts: React__default.FC<SkillCategoryPromptsProps>;
|
|
1375
1455
|
|
|
1376
|
-
|
|
1456
|
+
/**
|
|
1457
|
+
* iOS 26 Liquid Glass Design System
|
|
1458
|
+
* Design tokens and constants for iOS 26 style UI components
|
|
1459
|
+
*/
|
|
1460
|
+
declare const ios26Colors: {
|
|
1461
|
+
glassBackground: string;
|
|
1462
|
+
glassBackgroundHover: string;
|
|
1463
|
+
glassBackgroundActive: string;
|
|
1464
|
+
glassBorder: string;
|
|
1465
|
+
glassBorderStrong: string;
|
|
1466
|
+
backdropBlur: string;
|
|
1467
|
+
backdropBlurSmall: string;
|
|
1468
|
+
iosBlue: string;
|
|
1469
|
+
iosBlueLight: string;
|
|
1470
|
+
iosGreen: string;
|
|
1471
|
+
iosRed: string;
|
|
1472
|
+
iosOrange: string;
|
|
1473
|
+
iosYellow: string;
|
|
1474
|
+
iosPurple: string;
|
|
1475
|
+
iosPink: string;
|
|
1476
|
+
iosTeal: string;
|
|
1477
|
+
iosIndigo: string;
|
|
1478
|
+
iosGray: string;
|
|
1479
|
+
iosGray2: string;
|
|
1480
|
+
iosGray3: string;
|
|
1481
|
+
iosGray4: string;
|
|
1482
|
+
iosGray5: string;
|
|
1483
|
+
iosGray6: string;
|
|
1484
|
+
textPrimary: string;
|
|
1485
|
+
textSecondary: string;
|
|
1486
|
+
textTertiary: string;
|
|
1487
|
+
textWhite: string;
|
|
1488
|
+
bgPrimary: string;
|
|
1489
|
+
bgSecondary: string;
|
|
1490
|
+
bgTertiary: string;
|
|
1491
|
+
};
|
|
1492
|
+
declare const ios26ColorsDark: {
|
|
1493
|
+
glassBackground: string;
|
|
1494
|
+
glassBackgroundHover: string;
|
|
1495
|
+
glassBackgroundActive: string;
|
|
1496
|
+
glassBorder: string;
|
|
1497
|
+
glassBorderStrong: string;
|
|
1498
|
+
textPrimary: string;
|
|
1499
|
+
textSecondary: string;
|
|
1500
|
+
textTertiary: string;
|
|
1501
|
+
bgPrimary: string;
|
|
1502
|
+
bgSecondary: string;
|
|
1503
|
+
bgTertiary: string;
|
|
1504
|
+
};
|
|
1505
|
+
declare const ios26Radius: {
|
|
1506
|
+
none: string;
|
|
1507
|
+
small: string;
|
|
1508
|
+
medium: string;
|
|
1509
|
+
large: string;
|
|
1510
|
+
xlarge: string;
|
|
1511
|
+
xxlarge: string;
|
|
1512
|
+
pill: string;
|
|
1513
|
+
circle: string;
|
|
1514
|
+
};
|
|
1515
|
+
declare const ios26ContainerRadius = "20px";
|
|
1516
|
+
declare const ios26Spacing: {
|
|
1517
|
+
xs: string;
|
|
1518
|
+
sm: string;
|
|
1519
|
+
md: string;
|
|
1520
|
+
lg: string;
|
|
1521
|
+
xl: string;
|
|
1522
|
+
xxl: string;
|
|
1523
|
+
xxxl: string;
|
|
1524
|
+
};
|
|
1525
|
+
declare const ios26Shadows: {
|
|
1526
|
+
none: string;
|
|
1527
|
+
small: string;
|
|
1528
|
+
medium: string;
|
|
1529
|
+
large: string;
|
|
1530
|
+
xlarge: string;
|
|
1531
|
+
glow: string;
|
|
1532
|
+
};
|
|
1533
|
+
declare const ios26Typography: {
|
|
1534
|
+
fontFamily: string;
|
|
1535
|
+
fontFamilyMono: string;
|
|
1536
|
+
sizeXSmall: string;
|
|
1537
|
+
sizeSmall: string;
|
|
1538
|
+
sizeBody: string;
|
|
1539
|
+
sizeMedium: string;
|
|
1540
|
+
sizeLarge: string;
|
|
1541
|
+
sizeXLarge: string;
|
|
1542
|
+
sizeXXLarge: string;
|
|
1543
|
+
weightRegular: number;
|
|
1544
|
+
weightMedium: number;
|
|
1545
|
+
weightSemibold: number;
|
|
1546
|
+
weightBold: number;
|
|
1547
|
+
lineHeightTight: number;
|
|
1548
|
+
lineHeightNormal: number;
|
|
1549
|
+
lineHeightRelaxed: number;
|
|
1550
|
+
letterSpacingTight: string;
|
|
1551
|
+
letterSpacingNormal: string;
|
|
1552
|
+
letterSpacingWide: string;
|
|
1553
|
+
};
|
|
1554
|
+
declare const ios26Animations: {
|
|
1555
|
+
durationFast: string;
|
|
1556
|
+
durationNormal: string;
|
|
1557
|
+
durationSlow: string;
|
|
1558
|
+
easeDefault: string;
|
|
1559
|
+
easeSpring: string;
|
|
1560
|
+
easeIn: string;
|
|
1561
|
+
easeOut: string;
|
|
1562
|
+
transitionFast: string;
|
|
1563
|
+
transitionNormal: string;
|
|
1564
|
+
transitionSpring: string;
|
|
1565
|
+
};
|
|
1566
|
+
declare const ios26Components: {
|
|
1567
|
+
card: {
|
|
1568
|
+
background: string;
|
|
1569
|
+
borderRadius: string;
|
|
1570
|
+
border: string;
|
|
1571
|
+
backdropFilter: string;
|
|
1572
|
+
boxShadow: string;
|
|
1573
|
+
padding: string;
|
|
1574
|
+
};
|
|
1575
|
+
button: {
|
|
1576
|
+
height: string;
|
|
1577
|
+
borderRadius: string;
|
|
1578
|
+
fontWeight: number;
|
|
1579
|
+
fontSize: string;
|
|
1580
|
+
padding: string;
|
|
1581
|
+
};
|
|
1582
|
+
input: {
|
|
1583
|
+
height: string;
|
|
1584
|
+
borderRadius: string;
|
|
1585
|
+
fontSize: string;
|
|
1586
|
+
padding: string;
|
|
1587
|
+
background: string;
|
|
1588
|
+
border: string;
|
|
1589
|
+
};
|
|
1590
|
+
avatar: {
|
|
1591
|
+
borderRadius: string;
|
|
1592
|
+
border: string;
|
|
1593
|
+
};
|
|
1594
|
+
badge: {
|
|
1595
|
+
borderRadius: string;
|
|
1596
|
+
fontSize: string;
|
|
1597
|
+
fontWeight: number;
|
|
1598
|
+
padding: string;
|
|
1599
|
+
};
|
|
1600
|
+
};
|
|
1601
|
+
declare const ios26Breakpoints: {
|
|
1602
|
+
xs: string;
|
|
1603
|
+
sm: string;
|
|
1604
|
+
md: string;
|
|
1605
|
+
lg: string;
|
|
1606
|
+
xl: string;
|
|
1607
|
+
};
|
|
1608
|
+
declare const ios26ZIndex: {
|
|
1609
|
+
base: number;
|
|
1610
|
+
dropdown: number;
|
|
1611
|
+
sticky: number;
|
|
1612
|
+
fixed: number;
|
|
1613
|
+
modalBackdrop: number;
|
|
1614
|
+
modal: number;
|
|
1615
|
+
popover: number;
|
|
1616
|
+
tooltip: number;
|
|
1617
|
+
toast: number;
|
|
1618
|
+
};
|
|
1619
|
+
|
|
1620
|
+
/**
|
|
1621
|
+
* iOS 26 Ant Design Theme Configuration
|
|
1622
|
+
* Modern, clean design - minimal component overrides
|
|
1623
|
+
*/
|
|
1624
|
+
|
|
1625
|
+
/**
|
|
1626
|
+
* iOS 26 Light Theme for Ant Design
|
|
1627
|
+
* Clean, modern, minimal overrides
|
|
1628
|
+
*/
|
|
1629
|
+
declare const ios26AntdTheme: ThemeConfig;
|
|
1630
|
+
/**
|
|
1631
|
+
* iOS 26 Dark Theme
|
|
1632
|
+
*/
|
|
1633
|
+
declare const ios26AntdThemeDark: ThemeConfig;
|
|
1634
|
+
/**
|
|
1635
|
+
* Get theme based on color scheme
|
|
1636
|
+
*/
|
|
1637
|
+
declare const getIOS26AntdTheme: (isDark?: boolean) => ThemeConfig;
|
|
1638
|
+
|
|
1639
|
+
export { type AgentChatProps, AgentConversations, type AgentConversationsProps, type AgentState, AgentThreadProvider, type AgentThreadProviderProps, type AnalysisCategory, type AnalysisItem, AssistantContext, AssistantContextProvider, type AssistantContextProviderProps, type AssistantContextValue, AssistantFlow, type AssistantFlowProps, AssistantNode, type AssistantNodeData, type AssistantState, type AttachFile, type AuthContextValue, AuthProvider, AxiomLatticeProvider, type AxiomLatticeProviderProps, type ChatResponse, type ChatState, type ChatStateWithAgent, ChatUIContext, ChatUIContextProvider, Chating, type ChatingProps, type ClientConfig, ColumnLayout, type ColumnLayoutProps, ConversationContext, ConversationContextProvider, type ConversationContextProviderProps, type ConversationContextValue, type ConversationThread, CreateAssistantModal, type ElementMeta, type ElementProps, type ExplorerFile, FileExplorer, type FileExplorerProps, LatticeChat, LatticeChatShell, type LatticeChatShellConfig, LatticeChatShellContext, LatticeChatShellContextProvider, type LatticeChatShellContextProviderProps, type LatticeChatShellContextValue, type LatticeChatShellProps, LoginForm, type LoginFormProps, LoginPage, type LoginPageProps, MDResponse, MDViewFormItem, MetricsConfigDrawerContent, type MiddlewareConfigDefinition, type MiddlewareConfigSchema, type MiddlewareConfigSchemaProperty, type MiddlewareToolDefinition, type MiddlewareTypeDefinition, ProtectedRoute, type ProtectedRouteProps, RegisterForm, type RegisterFormProps, type ResourceFolderConfig, ScheduleButton, type ScheduleButtonProps, SideAppViewBrowser, type SideMenuItemConfig, type SideMenuItemType, SkillCategoryPrompts, type SkillCategoryPromptsProps, SkillFlow, type SkillFlowProps, SkillNode, type SkillNodeData, type StreamEventHandlerOptions, TenantGuard, type TenantGuardProps, TenantSelector, type TenantSelectorProps, TenantSwitcher, type TenantSwitcherProps, type ThreadState, type ToolCallData, type UIMessage, type UseAgentStateOptions, type UseAgentStateReturn, type UseAxiomLatticeOptions, type UseChatOptions, type UseTenantsOptions, type UseTenantsReturn, type UseUsersOptions, type UseUsersReturn, UserProfile, type UserProfileProps, type UserTenantInfo, generateLabelFromMessage, getElement, getIOS26AntdTheme, ios26Animations, ios26AntdTheme, ios26AntdThemeDark, ios26Breakpoints, ios26Colors, ios26ColorsDark, ios26Components, ios26ContainerRadius, ios26Radius, ios26Shadows, ios26Spacing, ios26Typography, ios26ZIndex, regsiterElement, useAgentChat, useAgentGraph, useAgentState, useAgentThreadContext, useAssistantContext, useAuth, useAxiomLattice, useChat, useChatUIContext, useConversationContext, useLatticeChatShellContext, useTenants, useUsers };
|