@marketrix.ai/widget 3.8.10 → 3.8.40

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.
Files changed (215) hide show
  1. package/README.md +158 -169
  2. package/dist/src/components/MarketrixWidget.d.ts +0 -1
  3. package/dist/src/components/base/Avatar.d.ts +0 -1
  4. package/dist/src/components/base/Badge.d.ts +0 -1
  5. package/dist/src/components/base/Button.d.ts +0 -1
  6. package/dist/src/components/base/Card.d.ts +0 -1
  7. package/dist/src/components/base/Dialog.d.ts +6 -7
  8. package/dist/src/components/base/Flex.d.ts +0 -1
  9. package/dist/src/components/base/Icon.d.ts +0 -1
  10. package/dist/src/components/base/IconButton.d.ts +0 -1
  11. package/dist/src/components/base/Indicator.d.ts +0 -1
  12. package/dist/src/components/base/Menu.d.ts +4 -5
  13. package/dist/src/components/base/Pill.d.ts +0 -1
  14. package/dist/src/components/base/Spinner.d.ts +0 -1
  15. package/dist/src/components/base/Stack.d.ts +0 -1
  16. package/dist/src/components/base/Surface.d.ts +0 -1
  17. package/dist/src/components/base/Text.d.ts +0 -1
  18. package/dist/src/components/base/Textarea.d.ts +0 -1
  19. package/dist/src/components/base/Video.d.ts +0 -1
  20. package/dist/src/components/base/icons.d.ts +0 -1
  21. package/dist/src/components/base/layoutProps.d.ts +0 -1
  22. package/dist/src/components/base/tokens.d.ts +0 -1
  23. package/dist/src/components/base/useDisclosure.d.ts +0 -1
  24. package/dist/src/components/blocks/ChatInput.d.ts +0 -1
  25. package/dist/src/components/blocks/HeaderBar.d.ts +0 -1
  26. package/dist/src/components/blocks/NotificationToast.d.ts +0 -1
  27. package/dist/src/components/blocks/TabBar.d.ts +1 -2
  28. package/dist/src/components/blocks/WidgetDialog.d.ts +0 -1
  29. package/dist/src/components/blocks/WidgetFab.d.ts +0 -1
  30. package/dist/src/components/chat/MessageContent.d.ts +0 -1
  31. package/dist/src/components/chat/MessageItem.d.ts +0 -1
  32. package/dist/src/components/chat/MessageList.d.ts +1 -2
  33. package/dist/src/components/chat/ProgressLine.d.ts +0 -1
  34. package/dist/src/components/chat/SuggestedActions.d.ts +0 -1
  35. package/dist/src/components/chat/TaskStatusIcon.d.ts +0 -1
  36. package/dist/src/components/chat/ThinkingIndicator.d.ts +0 -1
  37. package/dist/src/components/chat/VideoStreamDisplay.d.ts +0 -1
  38. package/dist/src/components/navigation/MessengerShell.d.ts +0 -1
  39. package/dist/src/components/navigation/ResizeHandles.d.ts +0 -1
  40. package/dist/src/components/navigation/ShellTabBar.d.ts +0 -1
  41. package/dist/src/components/navigation/ViewTransition.d.ts +0 -1
  42. package/dist/src/components/ui/StateMessage.d.ts +0 -1
  43. package/dist/src/components/ui/WidgetSettingsLoader.d.ts +1 -2
  44. package/dist/src/components/views/ChatView.d.ts +0 -1
  45. package/dist/src/components/views/HomeView.d.ts +0 -1
  46. package/dist/src/constants/config.d.ts +0 -1
  47. package/dist/src/constants/theme.d.ts +0 -1
  48. package/dist/src/context/ChatContext.d.ts +0 -1
  49. package/dist/src/context/TaskContext.d.ts +0 -1
  50. package/dist/src/context/UIStateContext.d.ts +0 -1
  51. package/dist/src/context/WidgetProviders.d.ts +0 -1
  52. package/dist/src/context/sseReducer.d.ts +0 -1
  53. package/dist/src/design-system/component-tokens.d.ts +0 -1
  54. package/dist/src/design-system/layers.d.ts +0 -1
  55. package/dist/src/design-system/semantic-tokens.d.ts +0 -1
  56. package/dist/src/design-system/shadows.d.ts +0 -1
  57. package/dist/src/design-system/token-adapter.d.ts +0 -1
  58. package/dist/src/hooks/useDragSnap.d.ts +0 -1
  59. package/dist/src/hooks/useFocusTrap.d.ts +0 -1
  60. package/dist/src/hooks/useResize.d.ts +0 -1
  61. package/dist/src/hooks/useScreenShare.d.ts +0 -1
  62. package/dist/src/hooks/useScrollLock.d.ts +0 -1
  63. package/dist/src/hooks/useWidget.d.ts +0 -1
  64. package/dist/src/index.d.ts +0 -1
  65. package/dist/src/lib/utils.d.ts +0 -1
  66. package/dist/src/sdk/contract.d.ts +0 -371
  67. package/dist/src/sdk/contracts/activityLog.d.ts +0 -25
  68. package/dist/src/sdk/contracts/application.d.ts +54 -5
  69. package/dist/src/sdk/contracts/chat.d.ts +0 -1
  70. package/dist/src/sdk/contracts/common.d.ts +10 -14
  71. package/dist/src/sdk/contracts/entities.d.ts +12 -271
  72. package/dist/src/sdk/contracts/widget.d.ts +0 -973
  73. package/dist/src/sdk/index.d.ts +1 -372
  74. package/dist/src/services/ApiService.d.ts +1 -3
  75. package/dist/src/services/ChatService.d.ts +2 -4
  76. package/dist/src/services/ConfigManager.d.ts +0 -1
  77. package/dist/src/services/DomService.d.ts +3 -4
  78. package/dist/src/services/ScreenShareService.d.ts +0 -6
  79. package/dist/src/services/SessionManager.d.ts +0 -1
  80. package/dist/src/services/SessionRecorder.d.ts +0 -1
  81. package/dist/src/services/ShowModeService.d.ts +0 -1
  82. package/dist/src/services/StorageService.d.ts +0 -1
  83. package/dist/src/services/StreamClient.d.ts +0 -2
  84. package/dist/src/services/ToolService.d.ts +3 -4
  85. package/dist/src/services/ValidationService.d.ts +9 -12
  86. package/dist/src/services/WidgetService.d.ts +0 -2
  87. package/dist/src/test/a11y-utils.d.ts +0 -1
  88. package/dist/src/test/fixtures.d.ts +0 -1
  89. package/dist/src/test/setup.d.ts +0 -1
  90. package/dist/src/types/browserTools.d.ts +0 -7
  91. package/dist/src/types/index.d.ts +3 -10
  92. package/dist/src/utils/apiUtils.d.ts +0 -1
  93. package/dist/src/utils/bootstrap.d.ts +0 -1
  94. package/dist/src/utils/chat.d.ts +0 -11
  95. package/dist/src/utils/common.d.ts +0 -1
  96. package/dist/src/utils/dom.d.ts +0 -6
  97. package/dist/src/utils/format.d.ts +0 -1
  98. package/dist/src/utils/suggestedActions.d.ts +0 -1
  99. package/dist/src/utils/validation.d.ts +0 -5
  100. package/dist/src/utils/widgetPositioning.d.ts +0 -1
  101. package/dist/widget.mjs +65 -65
  102. package/dist/widget.mjs.map +1 -1
  103. package/package.json +12 -12
  104. package/dist/index.html +0 -1697
  105. package/dist/src/components/MarketrixWidget.d.ts.map +0 -1
  106. package/dist/src/components/base/Avatar.d.ts.map +0 -1
  107. package/dist/src/components/base/Badge.d.ts.map +0 -1
  108. package/dist/src/components/base/Button.d.ts.map +0 -1
  109. package/dist/src/components/base/Card.d.ts.map +0 -1
  110. package/dist/src/components/base/Dialog.d.ts.map +0 -1
  111. package/dist/src/components/base/Flex.d.ts.map +0 -1
  112. package/dist/src/components/base/Icon.d.ts.map +0 -1
  113. package/dist/src/components/base/IconButton.d.ts.map +0 -1
  114. package/dist/src/components/base/Indicator.d.ts.map +0 -1
  115. package/dist/src/components/base/Menu.d.ts.map +0 -1
  116. package/dist/src/components/base/Pill.d.ts.map +0 -1
  117. package/dist/src/components/base/Spinner.d.ts.map +0 -1
  118. package/dist/src/components/base/Stack.d.ts.map +0 -1
  119. package/dist/src/components/base/Surface.d.ts.map +0 -1
  120. package/dist/src/components/base/Text.d.ts.map +0 -1
  121. package/dist/src/components/base/Textarea.d.ts.map +0 -1
  122. package/dist/src/components/base/Video.d.ts.map +0 -1
  123. package/dist/src/components/base/icons.d.ts.map +0 -1
  124. package/dist/src/components/base/index.d.ts +0 -22
  125. package/dist/src/components/base/index.d.ts.map +0 -1
  126. package/dist/src/components/base/layoutProps.d.ts.map +0 -1
  127. package/dist/src/components/base/tokens.d.ts.map +0 -1
  128. package/dist/src/components/base/useDisclosure.d.ts.map +0 -1
  129. package/dist/src/components/blocks/ChatInput.d.ts.map +0 -1
  130. package/dist/src/components/blocks/HeaderBar.d.ts.map +0 -1
  131. package/dist/src/components/blocks/NotificationToast.d.ts.map +0 -1
  132. package/dist/src/components/blocks/TabBar.d.ts.map +0 -1
  133. package/dist/src/components/blocks/WidgetDialog.d.ts.map +0 -1
  134. package/dist/src/components/blocks/WidgetFab.d.ts.map +0 -1
  135. package/dist/src/components/blocks/index.d.ts +0 -7
  136. package/dist/src/components/blocks/index.d.ts.map +0 -1
  137. package/dist/src/components/chat/MessageContent.d.ts.map +0 -1
  138. package/dist/src/components/chat/MessageItem.d.ts.map +0 -1
  139. package/dist/src/components/chat/MessageList.d.ts.map +0 -1
  140. package/dist/src/components/chat/ProgressLine.d.ts.map +0 -1
  141. package/dist/src/components/chat/SuggestedActions.d.ts.map +0 -1
  142. package/dist/src/components/chat/TaskStatusIcon.d.ts.map +0 -1
  143. package/dist/src/components/chat/ThinkingIndicator.d.ts.map +0 -1
  144. package/dist/src/components/chat/VideoStreamDisplay.d.ts.map +0 -1
  145. package/dist/src/components/navigation/MessengerShell.d.ts.map +0 -1
  146. package/dist/src/components/navigation/ResizeHandles.d.ts.map +0 -1
  147. package/dist/src/components/navigation/ShellTabBar.d.ts.map +0 -1
  148. package/dist/src/components/navigation/ViewTransition.d.ts.map +0 -1
  149. package/dist/src/components/ui/StateMessage.d.ts.map +0 -1
  150. package/dist/src/components/ui/WidgetSettingsLoader.d.ts.map +0 -1
  151. package/dist/src/components/views/ChatView.d.ts.map +0 -1
  152. package/dist/src/components/views/HomeView.d.ts.map +0 -1
  153. package/dist/src/constants/config.d.ts.map +0 -1
  154. package/dist/src/constants/theme.d.ts.map +0 -1
  155. package/dist/src/context/ChatContext.d.ts.map +0 -1
  156. package/dist/src/context/TaskContext.d.ts.map +0 -1
  157. package/dist/src/context/UIStateContext.d.ts.map +0 -1
  158. package/dist/src/context/WidgetProviders.d.ts.map +0 -1
  159. package/dist/src/context/sseReducer.d.ts.map +0 -1
  160. package/dist/src/design-system/component-tokens.d.ts.map +0 -1
  161. package/dist/src/design-system/layers.d.ts.map +0 -1
  162. package/dist/src/design-system/semantic-tokens.d.ts.map +0 -1
  163. package/dist/src/design-system/shadows.d.ts.map +0 -1
  164. package/dist/src/design-system/themes/default.d.ts +0 -7
  165. package/dist/src/design-system/themes/default.d.ts.map +0 -1
  166. package/dist/src/design-system/themes/high-contrast.d.ts +0 -4
  167. package/dist/src/design-system/themes/high-contrast.d.ts.map +0 -1
  168. package/dist/src/design-system/themes/index.d.ts +0 -3
  169. package/dist/src/design-system/themes/index.d.ts.map +0 -1
  170. package/dist/src/design-system/token-adapter.d.ts.map +0 -1
  171. package/dist/src/hooks/useDragSnap.d.ts.map +0 -1
  172. package/dist/src/hooks/useFocusTrap.d.ts.map +0 -1
  173. package/dist/src/hooks/useResize.d.ts.map +0 -1
  174. package/dist/src/hooks/useScreenShare.d.ts.map +0 -1
  175. package/dist/src/hooks/useScrollLock.d.ts.map +0 -1
  176. package/dist/src/hooks/useWidget.d.ts.map +0 -1
  177. package/dist/src/index.d.ts.map +0 -1
  178. package/dist/src/lib/utils.d.ts.map +0 -1
  179. package/dist/src/sdk/contract.d.ts.map +0 -1
  180. package/dist/src/sdk/contracts/activityLog.d.ts.map +0 -1
  181. package/dist/src/sdk/contracts/agent.d.ts +0 -3243
  182. package/dist/src/sdk/contracts/agent.d.ts.map +0 -1
  183. package/dist/src/sdk/contracts/application.d.ts.map +0 -1
  184. package/dist/src/sdk/contracts/chat.d.ts.map +0 -1
  185. package/dist/src/sdk/contracts/common.d.ts.map +0 -1
  186. package/dist/src/sdk/contracts/entities.d.ts.map +0 -1
  187. package/dist/src/sdk/contracts/widget.d.ts.map +0 -1
  188. package/dist/src/sdk/index.d.ts.map +0 -1
  189. package/dist/src/services/ApiService.d.ts.map +0 -1
  190. package/dist/src/services/ChatService.d.ts.map +0 -1
  191. package/dist/src/services/ConfigManager.d.ts.map +0 -1
  192. package/dist/src/services/DomService.d.ts.map +0 -1
  193. package/dist/src/services/ScreenShareService.d.ts.map +0 -1
  194. package/dist/src/services/SessionManager.d.ts.map +0 -1
  195. package/dist/src/services/SessionRecorder.d.ts.map +0 -1
  196. package/dist/src/services/ShowModeService.d.ts.map +0 -1
  197. package/dist/src/services/StorageService.d.ts.map +0 -1
  198. package/dist/src/services/StreamClient.d.ts.map +0 -1
  199. package/dist/src/services/ToolService.d.ts.map +0 -1
  200. package/dist/src/services/ValidationService.d.ts.map +0 -1
  201. package/dist/src/services/WidgetService.d.ts.map +0 -1
  202. package/dist/src/test/a11y-utils.d.ts.map +0 -1
  203. package/dist/src/test/fixtures.d.ts.map +0 -1
  204. package/dist/src/test/setup.d.ts.map +0 -1
  205. package/dist/src/types/browserTools.d.ts.map +0 -1
  206. package/dist/src/types/index.d.ts.map +0 -1
  207. package/dist/src/utils/apiUtils.d.ts.map +0 -1
  208. package/dist/src/utils/bootstrap.d.ts.map +0 -1
  209. package/dist/src/utils/chat.d.ts.map +0 -1
  210. package/dist/src/utils/common.d.ts.map +0 -1
  211. package/dist/src/utils/dom.d.ts.map +0 -1
  212. package/dist/src/utils/format.d.ts.map +0 -1
  213. package/dist/src/utils/suggestedActions.d.ts.map +0 -1
  214. package/dist/src/utils/validation.d.ts.map +0 -1
  215. package/dist/src/utils/widgetPositioning.d.ts.map +0 -1
@@ -4,4 +4,3 @@ import type { MarketrixConfig } from '../types';
4
4
  * Use with WidgetProviders previewMode to avoid network calls.
5
5
  */
6
6
  export declare function getMockWidgetConfig(overrides?: Partial<MarketrixConfig>): MarketrixConfig;
7
- //# sourceMappingURL=fixtures.d.ts.map
@@ -1,2 +1 @@
1
1
  import '@testing-library/jest-dom/vitest';
2
- //# sourceMappingURL=setup.d.ts.map
@@ -14,12 +14,5 @@ interface BrowserToolMetadata {
14
14
  category: 'navigation' | 'interaction' | 'extraction' | 'utility';
15
15
  actionType: string;
16
16
  }
17
- export declare const BROWSER_TOOL_CATEGORIES: {
18
- readonly navigation: "Navigation";
19
- readonly interaction: "Interaction";
20
- readonly extraction: "Extraction";
21
- readonly utility: "Utility";
22
- };
23
17
  export declare const BROWSER_TOOLS: BrowserToolMetadata[];
24
18
  export {};
25
- //# sourceMappingURL=browserTools.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { InstructionType, WidgetSettingsData } from '../sdk';
2
- export type { AgentData, ApplicationData, InstructionType, UserData, WidgetChip, WidgetData, WidgetSettingsData, WorkspaceData, } from '../sdk';
2
+ export type { ApplicationData, InstructionType, UserData, WidgetChip, WidgetData, WidgetSettingsData, WorkspaceData, } from '../sdk';
3
3
  /**
4
4
  * MarketrixConfig - Single source of truth for all widget configuration
5
5
  *
@@ -20,7 +20,6 @@ export type MarketrixConfig = Partial<WidgetSettingsData> & {
20
20
  mtxId?: string;
21
21
  mtxKey?: string;
22
22
  mtxApp?: number;
23
- mtxAgent?: number;
24
23
  userId?: number;
25
24
  mtxApiHost?: string;
26
25
  widget_position_offset?: {
@@ -33,8 +32,6 @@ export type MarketrixConfig = Partial<WidgetSettingsData> & {
33
32
  show_widget?: boolean;
34
33
  /** Controls screen sharing prompts and button. When false, screen access requests are auto-denied and Share Screen button is hidden. Default: true */
35
34
  use_screenshare?: boolean;
36
- agent_name?: string;
37
- agent_description?: string;
38
35
  };
39
36
  export interface ChatMessage {
40
37
  id: string;
@@ -67,7 +64,7 @@ export interface TaskProgress {
67
64
  mode: string;
68
65
  timestamp: number;
69
66
  }
70
- export type WidgetView = 'home' | 'chat' | 'help' | 'news';
67
+ export type WidgetView = 'home' | 'chat';
71
68
  export interface WidgetState {
72
69
  isOpen: boolean;
73
70
  isMinimized: boolean;
@@ -107,19 +104,16 @@ export type AddWidgetConfig = ({
107
104
  mtxId?: never;
108
105
  mtxKey?: never;
109
106
  mtxApp?: never;
110
- mtxAgent?: never;
111
107
  } | {
112
108
  settings?: never;
113
109
  mtxId: string;
114
110
  mtxKey: string;
115
111
  mtxApp?: never;
116
- mtxAgent?: never;
117
112
  } | {
118
113
  settings?: never;
119
114
  mtxId?: never;
120
115
  mtxKey?: never;
121
116
  mtxApp: number;
122
- mtxAgent: number;
123
117
  }) & {
124
118
  container?: HTMLElement;
125
119
  mtxApiHost?: string;
@@ -144,5 +138,4 @@ export interface MarketrixWidgetProps {
144
138
  mtxKey?: string;
145
139
  mtxApiHost?: string;
146
140
  }
147
- export { BROWSER_TOOL_CATEGORIES, BROWSER_TOOLS } from './browserTools';
148
- //# sourceMappingURL=index.d.ts.map
141
+ export { BROWSER_TOOLS } from './browserTools';
@@ -12,4 +12,3 @@ export declare function handleApiError(error: unknown, context?: string, config?
12
12
  isValid: false;
13
13
  error: string;
14
14
  };
15
- //# sourceMappingURL=apiUtils.d.ts.map
@@ -91,4 +91,3 @@ export declare const autoInitializeWidget: (retryCount?: number) => void;
91
91
  * @param initWidget - Function to initialize the widget (passed to avoid circular dependency)
92
92
  */
93
93
  export declare const registerAutoInit: (initWidget: (config: MarketrixConfig) => Promise<void>) => void;
94
- //# sourceMappingURL=bootstrap.d.ts.map
@@ -21,10 +21,6 @@ export declare function hasThinkingMarker(content: string): boolean;
21
21
  * Add thinking marker to content
22
22
  */
23
23
  export declare function addThinkingMarker(content: string): string;
24
- /**
25
- * Find the index of the last task message (agent message that's not system/placeholder/screen access)
26
- */
27
- export declare function findTaskMessageIndex(messages: ChatMessage[]): number;
28
24
  /**
29
25
  * Message Finder Utility
30
26
  *
@@ -54,12 +50,6 @@ export declare function findMessageForProgress(options: FindMessageOptions): {
54
50
  index: number;
55
51
  message: ChatMessage;
56
52
  } | null;
57
- /**
58
- * Tools that should show an icon and standard text style.
59
- * These are "mouse and keyboard" interactions.
60
- * All other tools will have hidden icons and muted text.
61
- */
62
- export declare const INTERACTIVE_TOOLS: Set<string>;
63
53
  /**
64
54
  * Tools that, in `show` mode, pause for the user to perform the action
65
55
  * themselves (DOM-mutating "mouse and keyboard" actions, minus `scroll`).
@@ -92,4 +82,3 @@ export declare const TOOL_NAME_MAPPING: Record<string, string>;
92
82
  * Converts snake_case to Title Case if no mapping exists
93
83
  */
94
84
  export declare function getFriendlyToolName(toolName: string): string;
95
- //# sourceMappingURL=chat.d.ts.map
@@ -13,4 +13,3 @@ export declare function createLogger(prefix: string): {
13
13
  warn: (message: string, ...args: unknown[]) => void;
14
14
  error: (message: string, ...args: unknown[]) => void;
15
15
  };
16
- //# sourceMappingURL=common.d.ts.map
@@ -4,11 +4,6 @@
4
4
  * Centralized utilities for common DOM operations to reduce code duplication
5
5
  * and ensure consistent error handling.
6
6
  */
7
- /**
8
- * Get all interactive elements on the page, ordered by DOM position.
9
- * Interactive elements include: buttons, inputs, links, select elements, etc.
10
- */
11
- export declare function getAllInteractiveElements(): HTMLElement[];
12
7
  /**
13
8
  * Get an interactive element by its index.
14
9
  * First tries to use data-id from get_html indexing, then falls back to current behavior.
@@ -17,4 +12,3 @@ export declare function getAllInteractiveElements(): HTMLElement[];
17
12
  */
18
13
  export declare function getElementByIndex(index: number): HTMLElement | null;
19
14
  export declare function isInteractable(el: Element | null): boolean;
20
- //# sourceMappingURL=dom.d.ts.map
@@ -24,4 +24,3 @@ export declare function addOpacity(color: string, opacity: number): string;
24
24
  export declare function darkenColor(color: string, amount: number): string;
25
25
  export declare const formatMessageTime: (date: Date | undefined) => string;
26
26
  export declare const getModeDisplayName: (mode: "show" | "tell" | "do") => string;
27
- //# sourceMappingURL=format.d.ts.map
@@ -8,4 +8,3 @@ export interface SuggestedActionItem {
8
8
  isShow: boolean;
9
9
  }
10
10
  export declare function getSuggestedActionsFromConfig(config: MarketrixConfig): SuggestedActionItem[];
11
- //# sourceMappingURL=suggestedActions.d.ts.map
@@ -9,10 +9,6 @@ import type { WidgetSettingsData } from '../sdk';
9
9
  * Check if an object has a specific property
10
10
  */
11
11
  export declare function hasProperty<K extends string>(obj: unknown, key: K): obj is Record<K, unknown>;
12
- /**
13
- * Check if a value is a non-null object
14
- */
15
- export declare function isNonNullObject(value: unknown): value is Record<string, unknown>;
16
12
  /**
17
13
  * Type guard for WidgetSettingsData
18
14
  */
@@ -25,4 +21,3 @@ export declare function isHTMLElement(element: Element | null): element is HTMLE
25
21
  * Type guard for HTMLScriptElement
26
22
  */
27
23
  export declare function isHTMLScriptElement(element: Element | null): element is HTMLScriptElement;
28
- //# sourceMappingURL=validation.d.ts.map
@@ -13,4 +13,3 @@ export declare const getNearestCornerByTranslation: (translation: {
13
13
  dx: number;
14
14
  dy: number;
15
15
  }, position: WidgetPosition, vw: number, vh: number, w: number, h: number) => WidgetPosition;
16
- //# sourceMappingURL=widgetPositioning.d.ts.map