@marketrix.ai/widget 3.8.9 → 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.
- package/README.md +159 -161
- package/dist/src/components/MarketrixWidget.d.ts +0 -1
- package/dist/src/components/base/Avatar.d.ts +0 -1
- package/dist/src/components/base/Badge.d.ts +0 -1
- package/dist/src/components/base/Button.d.ts +0 -1
- package/dist/src/components/base/Card.d.ts +0 -1
- package/dist/src/components/base/Dialog.d.ts +6 -7
- package/dist/src/components/base/Flex.d.ts +0 -1
- package/dist/src/components/base/Icon.d.ts +0 -1
- package/dist/src/components/base/IconButton.d.ts +0 -1
- package/dist/src/components/base/Indicator.d.ts +0 -1
- package/dist/src/components/base/Menu.d.ts +4 -5
- package/dist/src/components/base/Pill.d.ts +0 -1
- package/dist/src/components/base/Spinner.d.ts +0 -1
- package/dist/src/components/base/Stack.d.ts +0 -1
- package/dist/src/components/base/Surface.d.ts +0 -1
- package/dist/src/components/base/Text.d.ts +0 -1
- package/dist/src/components/base/Textarea.d.ts +0 -1
- package/dist/src/components/base/Video.d.ts +0 -1
- package/dist/src/components/base/icons.d.ts +0 -1
- package/dist/src/components/base/layoutProps.d.ts +0 -1
- package/dist/src/components/base/tokens.d.ts +0 -1
- package/dist/src/components/base/useDisclosure.d.ts +0 -1
- package/dist/src/components/blocks/ChatInput.d.ts +0 -1
- package/dist/src/components/blocks/HeaderBar.d.ts +0 -1
- package/dist/src/components/blocks/NotificationToast.d.ts +0 -1
- package/dist/src/components/blocks/TabBar.d.ts +1 -2
- package/dist/src/components/blocks/WidgetDialog.d.ts +0 -1
- package/dist/src/components/blocks/WidgetFab.d.ts +0 -1
- package/dist/src/components/chat/MessageContent.d.ts +0 -1
- package/dist/src/components/chat/MessageItem.d.ts +0 -1
- package/dist/src/components/chat/MessageList.d.ts +1 -2
- package/dist/src/components/chat/ProgressLine.d.ts +0 -1
- package/dist/src/components/chat/SuggestedActions.d.ts +0 -1
- package/dist/src/components/chat/TaskStatusIcon.d.ts +0 -1
- package/dist/src/components/chat/ThinkingIndicator.d.ts +0 -1
- package/dist/src/components/chat/VideoStreamDisplay.d.ts +0 -1
- package/dist/src/components/navigation/MessengerShell.d.ts +0 -1
- package/dist/src/components/navigation/ResizeHandles.d.ts +0 -1
- package/dist/src/components/navigation/ShellTabBar.d.ts +0 -1
- package/dist/src/components/navigation/ViewTransition.d.ts +0 -1
- package/dist/src/components/ui/StateMessage.d.ts +0 -1
- package/dist/src/components/ui/WidgetSettingsLoader.d.ts +1 -2
- package/dist/src/components/views/ChatView.d.ts +0 -1
- package/dist/src/components/views/HomeView.d.ts +0 -1
- package/dist/src/constants/config.d.ts +0 -1
- package/dist/src/constants/theme.d.ts +0 -1
- package/dist/src/context/ChatContext.d.ts +0 -1
- package/dist/src/context/TaskContext.d.ts +0 -1
- package/dist/src/context/UIStateContext.d.ts +0 -1
- package/dist/src/context/WidgetProviders.d.ts +0 -1
- package/dist/src/context/sseReducer.d.ts +0 -1
- package/dist/src/design-system/component-tokens.d.ts +0 -1
- package/dist/src/design-system/layers.d.ts +0 -1
- package/dist/src/design-system/semantic-tokens.d.ts +0 -1
- package/dist/src/design-system/shadows.d.ts +0 -1
- package/dist/src/design-system/token-adapter.d.ts +0 -1
- package/dist/src/hooks/useDragSnap.d.ts +0 -1
- package/dist/src/hooks/useFocusTrap.d.ts +0 -1
- package/dist/src/hooks/useResize.d.ts +0 -1
- package/dist/src/hooks/useScreenShare.d.ts +0 -1
- package/dist/src/hooks/useScrollLock.d.ts +0 -1
- package/dist/src/hooks/useWidget.d.ts +0 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/lib/utils.d.ts +0 -1
- package/dist/src/sdk/contract.d.ts +0 -371
- package/dist/src/sdk/contracts/activityLog.d.ts +0 -25
- package/dist/src/sdk/contracts/application.d.ts +54 -5
- package/dist/src/sdk/contracts/chat.d.ts +0 -1
- package/dist/src/sdk/contracts/common.d.ts +10 -14
- package/dist/src/sdk/contracts/entities.d.ts +12 -271
- package/dist/src/sdk/contracts/widget.d.ts +0 -973
- package/dist/src/sdk/index.d.ts +1 -372
- package/dist/src/services/ApiService.d.ts +1 -3
- package/dist/src/services/ChatService.d.ts +2 -4
- package/dist/src/services/ConfigManager.d.ts +0 -1
- package/dist/src/services/DomService.d.ts +3 -4
- package/dist/src/services/ScreenShareService.d.ts +0 -6
- package/dist/src/services/SessionManager.d.ts +0 -1
- package/dist/src/services/SessionRecorder.d.ts +0 -1
- package/dist/src/services/ShowModeService.d.ts +0 -1
- package/dist/src/services/StorageService.d.ts +0 -1
- package/dist/src/services/StreamClient.d.ts +0 -2
- package/dist/src/services/ToolService.d.ts +3 -4
- package/dist/src/services/ValidationService.d.ts +9 -12
- package/dist/src/services/WidgetService.d.ts +0 -2
- package/dist/src/test/a11y-utils.d.ts +0 -1
- package/dist/src/test/fixtures.d.ts +0 -1
- package/dist/src/test/setup.d.ts +0 -1
- package/dist/src/types/browserTools.d.ts +0 -7
- package/dist/src/types/index.d.ts +3 -10
- package/dist/src/utils/apiUtils.d.ts +0 -1
- package/dist/src/utils/bootstrap.d.ts +0 -1
- package/dist/src/utils/chat.d.ts +0 -11
- package/dist/src/utils/common.d.ts +0 -1
- package/dist/src/utils/dom.d.ts +0 -6
- package/dist/src/utils/format.d.ts +0 -1
- package/dist/src/utils/suggestedActions.d.ts +0 -1
- package/dist/src/utils/validation.d.ts +0 -5
- package/dist/src/utils/widgetPositioning.d.ts +0 -1
- package/dist/widget.mjs +65 -65
- package/dist/widget.mjs.map +1 -1
- package/package.json +12 -12
- package/dist/index.html +0 -1697
- package/dist/src/components/MarketrixWidget.d.ts.map +0 -1
- package/dist/src/components/base/Avatar.d.ts.map +0 -1
- package/dist/src/components/base/Badge.d.ts.map +0 -1
- package/dist/src/components/base/Button.d.ts.map +0 -1
- package/dist/src/components/base/Card.d.ts.map +0 -1
- package/dist/src/components/base/Dialog.d.ts.map +0 -1
- package/dist/src/components/base/Flex.d.ts.map +0 -1
- package/dist/src/components/base/Icon.d.ts.map +0 -1
- package/dist/src/components/base/IconButton.d.ts.map +0 -1
- package/dist/src/components/base/Indicator.d.ts.map +0 -1
- package/dist/src/components/base/Menu.d.ts.map +0 -1
- package/dist/src/components/base/Pill.d.ts.map +0 -1
- package/dist/src/components/base/Spinner.d.ts.map +0 -1
- package/dist/src/components/base/Stack.d.ts.map +0 -1
- package/dist/src/components/base/Surface.d.ts.map +0 -1
- package/dist/src/components/base/Text.d.ts.map +0 -1
- package/dist/src/components/base/Textarea.d.ts.map +0 -1
- package/dist/src/components/base/Video.d.ts.map +0 -1
- package/dist/src/components/base/icons.d.ts.map +0 -1
- package/dist/src/components/base/index.d.ts +0 -22
- package/dist/src/components/base/index.d.ts.map +0 -1
- package/dist/src/components/base/layoutProps.d.ts.map +0 -1
- package/dist/src/components/base/tokens.d.ts.map +0 -1
- package/dist/src/components/base/useDisclosure.d.ts.map +0 -1
- package/dist/src/components/blocks/ChatInput.d.ts.map +0 -1
- package/dist/src/components/blocks/HeaderBar.d.ts.map +0 -1
- package/dist/src/components/blocks/NotificationToast.d.ts.map +0 -1
- package/dist/src/components/blocks/TabBar.d.ts.map +0 -1
- package/dist/src/components/blocks/WidgetDialog.d.ts.map +0 -1
- package/dist/src/components/blocks/WidgetFab.d.ts.map +0 -1
- package/dist/src/components/blocks/index.d.ts +0 -7
- package/dist/src/components/blocks/index.d.ts.map +0 -1
- package/dist/src/components/chat/MessageContent.d.ts.map +0 -1
- package/dist/src/components/chat/MessageItem.d.ts.map +0 -1
- package/dist/src/components/chat/MessageList.d.ts.map +0 -1
- package/dist/src/components/chat/ProgressLine.d.ts.map +0 -1
- package/dist/src/components/chat/SuggestedActions.d.ts.map +0 -1
- package/dist/src/components/chat/TaskStatusIcon.d.ts.map +0 -1
- package/dist/src/components/chat/ThinkingIndicator.d.ts.map +0 -1
- package/dist/src/components/chat/VideoStreamDisplay.d.ts.map +0 -1
- package/dist/src/components/navigation/MessengerShell.d.ts.map +0 -1
- package/dist/src/components/navigation/ResizeHandles.d.ts.map +0 -1
- package/dist/src/components/navigation/ShellTabBar.d.ts.map +0 -1
- package/dist/src/components/navigation/ViewTransition.d.ts.map +0 -1
- package/dist/src/components/ui/StateMessage.d.ts.map +0 -1
- package/dist/src/components/ui/WidgetSettingsLoader.d.ts.map +0 -1
- package/dist/src/components/views/ChatView.d.ts.map +0 -1
- package/dist/src/components/views/HomeView.d.ts.map +0 -1
- package/dist/src/constants/config.d.ts.map +0 -1
- package/dist/src/constants/theme.d.ts.map +0 -1
- package/dist/src/context/ChatContext.d.ts.map +0 -1
- package/dist/src/context/TaskContext.d.ts.map +0 -1
- package/dist/src/context/UIStateContext.d.ts.map +0 -1
- package/dist/src/context/WidgetProviders.d.ts.map +0 -1
- package/dist/src/context/sseReducer.d.ts.map +0 -1
- package/dist/src/design-system/component-tokens.d.ts.map +0 -1
- package/dist/src/design-system/layers.d.ts.map +0 -1
- package/dist/src/design-system/semantic-tokens.d.ts.map +0 -1
- package/dist/src/design-system/shadows.d.ts.map +0 -1
- package/dist/src/design-system/themes/default.d.ts +0 -7
- package/dist/src/design-system/themes/default.d.ts.map +0 -1
- package/dist/src/design-system/themes/high-contrast.d.ts +0 -4
- package/dist/src/design-system/themes/high-contrast.d.ts.map +0 -1
- package/dist/src/design-system/themes/index.d.ts +0 -3
- package/dist/src/design-system/themes/index.d.ts.map +0 -1
- package/dist/src/design-system/token-adapter.d.ts.map +0 -1
- package/dist/src/hooks/useDragSnap.d.ts.map +0 -1
- package/dist/src/hooks/useFocusTrap.d.ts.map +0 -1
- package/dist/src/hooks/useResize.d.ts.map +0 -1
- package/dist/src/hooks/useScreenShare.d.ts.map +0 -1
- package/dist/src/hooks/useScrollLock.d.ts.map +0 -1
- package/dist/src/hooks/useWidget.d.ts.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/lib/utils.d.ts.map +0 -1
- package/dist/src/sdk/contract.d.ts.map +0 -1
- package/dist/src/sdk/contracts/activityLog.d.ts.map +0 -1
- package/dist/src/sdk/contracts/agent.d.ts +0 -3243
- package/dist/src/sdk/contracts/agent.d.ts.map +0 -1
- package/dist/src/sdk/contracts/application.d.ts.map +0 -1
- package/dist/src/sdk/contracts/chat.d.ts.map +0 -1
- package/dist/src/sdk/contracts/common.d.ts.map +0 -1
- package/dist/src/sdk/contracts/entities.d.ts.map +0 -1
- package/dist/src/sdk/contracts/widget.d.ts.map +0 -1
- package/dist/src/sdk/index.d.ts.map +0 -1
- package/dist/src/services/ApiService.d.ts.map +0 -1
- package/dist/src/services/ChatService.d.ts.map +0 -1
- package/dist/src/services/ConfigManager.d.ts.map +0 -1
- package/dist/src/services/DomService.d.ts.map +0 -1
- package/dist/src/services/ScreenShareService.d.ts.map +0 -1
- package/dist/src/services/SessionManager.d.ts.map +0 -1
- package/dist/src/services/SessionRecorder.d.ts.map +0 -1
- package/dist/src/services/ShowModeService.d.ts.map +0 -1
- package/dist/src/services/StorageService.d.ts.map +0 -1
- package/dist/src/services/StreamClient.d.ts.map +0 -1
- package/dist/src/services/ToolService.d.ts.map +0 -1
- package/dist/src/services/ValidationService.d.ts.map +0 -1
- package/dist/src/services/WidgetService.d.ts.map +0 -1
- package/dist/src/test/a11y-utils.d.ts.map +0 -1
- package/dist/src/test/fixtures.d.ts.map +0 -1
- package/dist/src/test/setup.d.ts.map +0 -1
- package/dist/src/types/browserTools.d.ts.map +0 -1
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/utils/apiUtils.d.ts.map +0 -1
- package/dist/src/utils/bootstrap.d.ts.map +0 -1
- package/dist/src/utils/chat.d.ts.map +0 -1
- package/dist/src/utils/common.d.ts.map +0 -1
- package/dist/src/utils/dom.d.ts.map +0 -1
- package/dist/src/utils/format.d.ts.map +0 -1
- package/dist/src/utils/suggestedActions.d.ts.map +0 -1
- package/dist/src/utils/validation.d.ts.map +0 -1
- package/dist/src/utils/widgetPositioning.d.ts.map +0 -1
package/dist/src/test/setup.d.ts
CHANGED
|
@@ -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 {
|
|
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'
|
|
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 {
|
|
148
|
-
//# sourceMappingURL=index.d.ts.map
|
|
141
|
+
export { BROWSER_TOOLS } from './browserTools';
|
|
@@ -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
|
package/dist/src/utils/chat.d.ts
CHANGED
|
@@ -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
|
package/dist/src/utils/dom.d.ts
CHANGED
|
@@ -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
|
|
@@ -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
|