@marketrix.ai/widget 3.8.456 → 3.8.458

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 (39) hide show
  1. package/dist/src/components/base/IconButton.d.ts +1 -1
  2. package/dist/src/components/base/Stack.d.ts +3 -15
  3. package/dist/src/components/base/Text.d.ts +1 -3
  4. package/dist/src/components/base/icons.d.ts +0 -32
  5. package/dist/src/components/base/layoutProps.d.ts +0 -11
  6. package/dist/src/components/blocks/HeaderBar.d.ts +2 -2
  7. package/dist/src/components/blocks/WidgetFab.d.ts +2 -15
  8. package/dist/src/components/chat/MessageList.d.ts +3 -7
  9. package/dist/src/components/chat/SuggestedActions.d.ts +3 -9
  10. package/dist/src/components/chat/TaskStatusIcon.d.ts +4 -5
  11. package/dist/src/components/navigation/MessengerShell.d.ts +1 -21
  12. package/dist/src/components/views/ChatView.d.ts +6 -18
  13. package/dist/src/components/views/HomeView.d.ts +0 -3
  14. package/dist/src/context/ChatContext.d.ts +2 -13
  15. package/dist/src/context/UIStateContext.d.ts +2 -10
  16. package/dist/src/context/sseReducer.d.ts +4 -2
  17. package/dist/src/design-system/component-tokens.d.ts +1 -8
  18. package/dist/src/design-system/semantic-tokens.d.ts +2 -7
  19. package/dist/src/hooks/useResize.d.ts +1 -1
  20. package/dist/src/hooks/useWidget.d.ts +4 -11
  21. package/dist/src/sdk/contract.d.ts +0 -10
  22. package/dist/src/sdk/contracts/activityLog.d.ts +0 -30
  23. package/dist/src/sdk/contracts/entities.d.ts +0 -15
  24. package/dist/src/sdk/index.d.ts +0 -10
  25. package/dist/src/services/ApiService.d.ts +4 -3
  26. package/dist/src/services/BrowserToolService.d.ts +0 -4
  27. package/dist/src/services/ChatService.d.ts +5 -5
  28. package/dist/src/services/DomService.d.ts +3 -23
  29. package/dist/src/services/ShowModeService.d.ts +1 -2
  30. package/dist/src/services/StorageService.d.ts +4 -3
  31. package/dist/src/services/StreamClient.d.ts +0 -2
  32. package/dist/src/types/index.d.ts +3 -10
  33. package/dist/src/utils/bootstrap.d.ts +1 -2
  34. package/dist/src/utils/chat.d.ts +5 -8
  35. package/dist/src/utils/color.d.ts +0 -2
  36. package/dist/src/utils/suggestedActions.d.ts +2 -5
  37. package/dist/widget.mjs +62 -60
  38. package/dist/widget.mjs.map +1 -1
  39. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import type { ComponentPropsWithRef } from 'react';
2
2
  import { type TextTone } from '../../design-system/component-tokens';
3
3
  import type { ShadowToken } from '../../design-system/shadows';
4
- type IconButtonVariant = 'primary' | 'secondary' | 'ghost' | 'toolbar';
4
+ type IconButtonVariant = 'primary' | 'secondary' | 'ghost';
5
5
  type IconButtonSize = 'xs' | 'sm';
6
6
  type IconButtonShape = 'circle' | 'theme';
7
7
  export interface IconButtonProps extends ComponentPropsWithRef<'button'> {
@@ -1,15 +1,3 @@
1
- import type { ComponentPropsWithRef, ReactNode } from 'react';
2
- import { type RadiusToken } from '../../design-system/component-tokens';
3
- import type { ShadowToken } from '../../design-system/shadows';
4
- import { type LayoutProps } from './layoutProps';
5
- import { type SurfaceBackground, type SurfacePadding } from './Surface';
6
- export interface StackProps extends LayoutProps, Omit<ComponentPropsWithRef<'div'>, 'className'> {
7
- background?: SurfaceBackground;
8
- elevation?: ShadowToken;
9
- paddingPreset?: SurfacePadding;
10
- radius?: RadiusToken;
11
- /** @internal blocks/ only */
12
- className?: string;
13
- children?: ReactNode;
14
- }
15
- export declare function Stack(props: StackProps): import("react").JSX.Element;
1
+ import { type FlexProps } from './Flex';
2
+ export type StackProps = Omit<FlexProps, 'direction'>;
3
+ export declare const Stack: import("react").ForwardRefExoticComponent<StackProps & import("react").RefAttributes<HTMLElement>>;
@@ -7,8 +7,6 @@ type TextAlign = 'center' | 'right';
7
7
  export interface TextProps extends React.HTMLAttributes<HTMLElement> {
8
8
  as?: ElementType;
9
9
  block?: boolean;
10
- clamp?: 1 | 2 | 3;
11
- code?: boolean;
12
10
  inheritColor?: boolean;
13
11
  italic?: boolean;
14
12
  leading?: TextLeading;
@@ -22,5 +20,5 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
22
20
  className?: string;
23
21
  ref?: Ref<HTMLElement>;
24
22
  }
25
- export declare function Text({ as: Component, block, clamp, code, inheritColor, italic, leading, tone, variant, size, weight, truncate, align, className, ref, style, ...props }: TextProps): import("react").JSX.Element;
23
+ export declare function Text({ as: Component, block, inheritColor, italic, leading, tone, variant, size, weight, truncate, align, className, ref, style, ...props }: TextProps): import("react").JSX.Element;
26
24
  export {};
@@ -35,20 +35,6 @@ export declare const icons: {
35
35
  readonly fill: "currentColor";
36
36
  }];
37
37
  };
38
- readonly timesCircle: {
39
- readonly viewBox: "0 0 512 512";
40
- readonly paths: [{
41
- readonly d: "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z";
42
- readonly fill: "currentColor";
43
- }];
44
- };
45
- readonly ban: {
46
- readonly viewBox: "0 0 512 512";
47
- readonly paths: [{
48
- readonly d: "M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z";
49
- readonly fill: "currentColor";
50
- }];
51
- };
52
38
  readonly arrowUp: {
53
39
  readonly viewBox: "0 0 448 512";
54
40
  readonly paths: [{
@@ -63,24 +49,6 @@ export declare const icons: {
63
49
  readonly fill: "currentColor";
64
50
  }];
65
51
  };
66
- readonly x: {
67
- readonly viewBox: "0 0 24 24";
68
- readonly paths: [{
69
- readonly d: "M18 6L6 18";
70
- readonly fill: "none";
71
- readonly stroke: "currentColor";
72
- readonly strokeWidth: 2;
73
- readonly strokeLinecap: "round";
74
- readonly strokeLinejoin: "round";
75
- }, {
76
- readonly d: "M6 6L18 18";
77
- readonly fill: "none";
78
- readonly stroke: "currentColor";
79
- readonly strokeWidth: 2;
80
- readonly strokeLinecap: "round";
81
- readonly strokeLinejoin: "round";
82
- }];
83
- };
84
52
  readonly chatBubble: {
85
53
  readonly viewBox: "0 0 512 512";
86
54
  readonly paths: [{
@@ -1,5 +1,4 @@
1
1
  import type { CSSProperties, ElementType } from 'react';
2
- import type { ShadowToken } from '../../design-system/shadows';
3
2
  export type SpacingToken = 'none' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
4
3
  export interface LayoutProps {
5
4
  padding?: SpacingToken;
@@ -7,15 +6,9 @@ export interface LayoutProps {
7
6
  paddingY?: SpacingToken;
8
7
  paddingTop?: SpacingToken;
9
8
  paddingBottom?: SpacingToken;
10
- margin?: SpacingToken;
11
- marginX?: SpacingToken;
12
- marginY?: SpacingToken;
13
- marginTop?: SpacingToken;
14
- marginBottom?: SpacingToken;
15
9
  gap?: SpacingToken;
16
10
  align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
17
11
  justify?: 'start' | 'center' | 'end' | 'between' | 'around';
18
- wrap?: boolean;
19
12
  grow?: boolean;
20
13
  shrink?: boolean;
21
14
  position?: 'relative' | 'absolute' | 'fixed' | 'sticky';
@@ -25,12 +18,8 @@ export interface LayoutProps {
25
18
  width?: 'full' | 'auto';
26
19
  height?: 'full' | 'auto';
27
20
  minWidth?: '0';
28
- minHeight?: '0';
29
21
  border?: boolean | 'top' | 'bottom' | 'left' | 'right';
30
22
  rounded?: boolean | 'none' | 'sm' | 'full' | 'lg' | 'theme' | 'md' | 'xl' | 'pill' | 'circle';
31
- shadow?: boolean | ShadowToken | 'theme';
32
- cursor?: 'pointer' | 'default' | 'not-allowed' | 'grab';
33
- opacity?: 0 | 50 | 80 | 100;
34
23
  animate?: 'spin' | 'ping' | 'pulse' | 'fadeIn' | 'none';
35
24
  hidden?: boolean;
36
25
  as?: ElementType;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- export interface HeaderBarProps {
2
+ interface HeaderBarProps {
3
3
  title: string;
4
4
  subtitle?: string;
5
- minimized?: boolean;
6
5
  onClose: () => void;
7
6
  controls?: React.ReactNode;
8
7
  }
9
8
  export declare const HeaderBar: React.FC<HeaderBarProps>;
9
+ export {};
@@ -1,20 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { WidgetPosition } from '../../types';
3
- export interface WidgetFabProps {
4
- open: boolean;
5
- processing?: boolean;
6
- error?: boolean;
7
- taskRunning?: boolean;
8
- onClick: () => void;
9
- onStop?: () => void;
10
- accentColor?: string;
11
- backgroundColor?: string;
12
- borderRadius?: string;
13
- tooltipBgColor?: string;
14
- tooltipTextColor?: string;
15
- zIndex?: number;
16
- position: WidgetPosition;
3
+ interface WidgetFabProps {
17
4
  onDrag: (position: WidgetPosition) => void;
18
- isPreviewMode?: boolean;
19
5
  }
20
6
  export declare const WidgetFab: React.FC<WidgetFabProps>;
7
+ export {};
@@ -1,12 +1,8 @@
1
1
  import React from 'react';
2
- import type { ChatMessage, MarketrixConfig } from '../../types';
3
2
  interface MessageListProps {
4
- messages: ChatMessage[];
5
3
  messagesEndRef: React.RefObject<HTMLDivElement | null>;
6
- config?: MarketrixConfig;
7
- onScreenAccessAllow?: () => void;
8
- onScreenAccessDeny?: () => void;
9
- onClearChat?: () => void | Promise<void>;
4
+ onScreenAccessAllow: () => void;
5
+ onScreenAccessDeny: () => void;
10
6
  }
11
- export declare const MessageList: ({ messages, messagesEndRef, config, onScreenAccessAllow, onScreenAccessDeny, onClearChat, }: MessageListProps) => React.JSX.Element;
7
+ export declare const MessageList: ({ messagesEndRef, onScreenAccessAllow, onScreenAccessDeny }: MessageListProps) => React.JSX.Element;
12
8
  export {};
@@ -1,14 +1,8 @@
1
1
  import React from 'react';
2
- interface SuggestedAction {
3
- id: string;
4
- text: string;
5
- icon: React.ReactElement;
6
- type: 'tell' | 'show' | 'do';
7
- isShow: boolean;
8
- }
2
+ import type { SuggestedActionItem } from '../../utils/suggestedActions';
9
3
  interface SuggestedActionsProps {
10
- actions: SuggestedAction[];
11
- onActionClick: (action: SuggestedAction, event: React.MouseEvent) => Promise<void>;
4
+ actions: SuggestedActionItem[];
5
+ onActionClick: (action: SuggestedActionItem, event: React.MouseEvent) => Promise<void>;
12
6
  }
13
7
  export declare const SuggestedActions: React.FC<SuggestedActionsProps>;
14
8
  export {};
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- interface TaskStatusIconProps {
3
- status: 'ongoing' | 'done' | 'failed' | 'stopped';
4
- }
5
- export declare const TaskStatusIcon: React.FC<TaskStatusIconProps>;
6
- export {};
2
+ import type { ChatMessage } from '../../types';
3
+ export declare const TaskStatusIcon: React.FC<{
4
+ status: NonNullable<ChatMessage['taskStatus']>;
5
+ }>;
@@ -1,22 +1,2 @@
1
1
  import React from 'react';
2
- import type { ChatMessage, InstructionType, MarketrixConfig, WidgetView } from '../../types';
3
- export interface MessengerShellProps {
4
- config: MarketrixConfig;
5
- isOpen: boolean;
6
- isMinimized: boolean;
7
- messages: ChatMessage[];
8
- currentMode: InstructionType;
9
- isTaskRunning?: boolean;
10
- activeView: WidgetView;
11
- onClose: () => void;
12
- onSendMessage: (message: string, mode?: InstructionType, skipUserMessage?: boolean) => void;
13
- onSetMode: (mode: InstructionType) => void;
14
- onAddMessage: (message: ChatMessage) => void;
15
- onUpdateMessage: (messageId: string, updates: Partial<ChatMessage>) => void;
16
- onRemoveMessage?: (messageId: string) => void;
17
- onStopTask?: () => void;
18
- onClearChat?: () => void | Promise<void>;
19
- onScreenSharingChange?: (isSharing: boolean) => void;
20
- setActiveView: (view: WidgetView) => void;
21
- }
22
- export declare const MessengerShell: React.FC<MessengerShellProps>;
2
+ export declare const MessengerShell: React.FC;
@@ -1,21 +1,9 @@
1
1
  import React from 'react';
2
- import type { InstructionType } from '../../sdk';
3
- import type { ChatMessage, MarketrixConfig } from '../../types';
4
- export interface ChatViewProps {
5
- config: MarketrixConfig;
6
- messages: ChatMessage[];
7
- currentMode: InstructionType;
8
- isTaskRunning?: boolean;
9
- onSendMessage: (message: string, mode?: InstructionType, skipUserMessage?: boolean) => void;
10
- onSetMode: (mode: InstructionType) => void;
11
- onAddMessage: (message: ChatMessage) => void;
12
- onUpdateMessage: (messageId: string, updates: Partial<ChatMessage>) => void;
13
- onRemoveMessage?: (messageId: string) => void;
14
- onStopTask?: () => void;
15
- onClearChat?: () => void | Promise<void>;
16
- onScreenSharingChange?: (isSharing: boolean) => void;
17
- onStartScreenShareRef?: React.MutableRefObject<(() => void) | null>;
18
- onStopScreenShareRef?: React.MutableRefObject<(() => void) | null>;
19
- messageInputRef?: React.RefObject<HTMLTextAreaElement | null>;
2
+ interface ChatViewProps {
3
+ onScreenSharingChange: (isSharing: boolean) => void;
4
+ onStartScreenShareRef: React.MutableRefObject<(() => void) | null>;
5
+ onStopScreenShareRef: React.MutableRefObject<(() => void) | null>;
6
+ messageInputRef: React.RefObject<HTMLTextAreaElement | null>;
20
7
  }
21
8
  export declare const ChatView: React.FC<ChatViewProps>;
9
+ export {};
@@ -1,9 +1,6 @@
1
1
  import React from 'react';
2
- import type { ChatMessage, MarketrixConfig } from '../../types';
3
2
  import { type SuggestedActionItem } from '../../utils/suggestedActions';
4
3
  interface HomeViewProps {
5
- config: MarketrixConfig;
6
- messages: ChatMessage[];
7
4
  onNavigateToChat: () => void;
8
5
  onChipClick: (action: SuggestedActionItem) => void;
9
6
  }
@@ -1,13 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { ChatMessage, InstructionType } from '../types';
3
- import type { UIStateActions } from './UIStateContext';
4
- export interface TaskState {
5
- activeTaskId: string | null;
6
- isTaskRunning: boolean;
7
- }
8
- export interface ChatState {
9
- messages: ChatMessage[];
10
- }
3
+ import { type TaskState } from './sseReducer';
11
4
  export interface ChatActions {
12
5
  addMessage: (message: ChatMessage) => void;
13
6
  updateMessage: (messageId: string, updates: Partial<ChatMessage>) => void;
@@ -24,7 +17,7 @@ export interface TaskActions {
24
17
  stopTask: () => Promise<void>;
25
18
  }
26
19
  interface ChatContextType {
27
- chatState: ChatState;
20
+ messages: ChatMessage[];
28
21
  chatActions: ChatActions;
29
22
  taskState: TaskState;
30
23
  taskActions: TaskActions;
@@ -32,10 +25,6 @@ interface ChatContextType {
32
25
  interface ChatProviderProps {
33
26
  children: React.ReactNode;
34
27
  previewMode?: boolean;
35
- currentMode: InstructionType;
36
- uiActions: Pick<UIStateActions, 'setLoading' | 'setAgentAvailable' | 'setError'>;
37
- initialMessages?: ChatMessage[];
38
- initialTask?: TaskState;
39
28
  }
40
29
  export declare const ChatProvider: React.FC<ChatProviderProps>;
41
30
  export declare const useChatContext: () => ChatContextType;
@@ -2,10 +2,8 @@ import React from 'react';
2
2
  import type { InstructionType, WidgetView } from '../types';
3
3
  export interface UIState {
4
4
  isOpen: boolean;
5
- isMinimized: boolean;
6
5
  activeView: WidgetView;
7
6
  currentMode: InstructionType;
8
- agentAvailable: boolean;
9
7
  isLoading: boolean;
10
8
  error?: string;
11
9
  }
@@ -15,21 +13,15 @@ export interface UIStateActions {
15
13
  closeWidget: () => void;
16
14
  setMode: (mode: InstructionType) => void;
17
15
  setLoading: (loading: boolean) => void;
18
- setAgentAvailable: (available: boolean) => void;
19
16
  setError: (error: string | undefined) => void;
20
- clearError: () => void;
21
17
  applyState: (payload: Partial<UIState>) => void;
22
18
  }
23
19
  interface UIStateContextType {
24
20
  uiState: UIState;
25
21
  uiActions: UIStateActions;
26
22
  }
27
- interface UIStateProviderProps {
23
+ export declare const UIStateProvider: React.FC<{
28
24
  children: React.ReactNode;
29
- initialMode?: InstructionType;
30
- initialIsOpen?: boolean;
31
- initialIsMinimized?: boolean;
32
- }
33
- export declare const UIStateProvider: React.FC<UIStateProviderProps>;
25
+ }>;
34
26
  export declare const useUIStateContext: () => UIStateContextType;
35
27
  export {};
@@ -1,12 +1,12 @@
1
1
  import type { WidgetEvent } from '../sdk';
2
2
  import type { ChatMessage, InstructionType } from '../types';
3
- export interface SseTaskState {
3
+ export interface TaskState {
4
4
  activeTaskId: string | null;
5
5
  isTaskRunning: boolean;
6
6
  }
7
7
  export interface SseState {
8
8
  messages: ChatMessage[];
9
- task: SseTaskState;
9
+ task: TaskState;
10
10
  }
11
11
  export type SseEffect = {
12
12
  type: 'executeTool';
@@ -27,5 +27,7 @@ type ProgressStatus = 'in_progress' | 'completed' | 'failed';
27
27
  export declare function reduceToolProgress(state: SseState, browserToolName: string, explanation: string, status: ProgressStatus, currentMode: InstructionType, error?: string): SseState;
28
28
  export declare function reduceToolDone(state: SseState, currentMode: InstructionType): SseState;
29
29
  export declare function reduceStop(state: SseState, currentMode: InstructionType): SseState;
30
+ /** Settles a pending message into a plain error bubble — the one shape for both a failed POST and a chat/error. */
31
+ export declare function reduceError(state: SseState, messageId: string, text: string): SseState;
30
32
  export declare function reduceSse(state: SseState, event: WidgetEvent, currentMode: InstructionType): ReduceResult;
31
33
  export {};
@@ -7,14 +7,7 @@ export type NotificationTone = 'info' | 'error';
7
7
  export declare const radiusClasses: Record<RadiusToken, string>;
8
8
  export declare const textToneClasses: Record<TextTone, string>;
9
9
  export declare const textLeadingClasses: Record<TextLeading, string>;
10
- export declare const controlSizeStyles: {
11
- header: {
12
- height: number;
13
- };
14
- tabBar: {
15
- height: number;
16
- };
17
- };
10
+ export declare const TAB_BAR_HEIGHT = 48;
18
11
  export declare const notificationToneStyles: Record<NotificationTone, {
19
12
  background: string;
20
13
  border: string;
@@ -1,5 +1,5 @@
1
1
  import type { WidgetSettingsData } from '../sdk';
2
- export type SemanticTokens = {
2
+ type SemanticTokens = {
3
3
  color: {
4
4
  background: string;
5
5
  foreground: string;
@@ -18,9 +18,6 @@ export type SemanticTokens = {
18
18
  };
19
19
  radius: string;
20
20
  shadow: string;
21
- typography: {
22
- fontSizeBase: string;
23
- };
24
21
  motion: {
25
22
  durationAnimation: string;
26
23
  durationFade: string;
@@ -30,8 +27,6 @@ export type SemanticTokens = {
30
27
  widgetHeight: string;
31
28
  };
32
29
  };
33
- export type WidgetStyleSettingsDefaults = Pick<WidgetSettingsData, 'widget_background_color' | 'widget_text_color' | 'widget_border_color' | 'widget_accent_color' | 'widget_secondary_color' | 'widget_border_radius' | 'widget_font_size' | 'widget_width' | 'widget_height' | 'widget_shadow' | 'widget_animation_duration' | 'widget_fade_duration'>;
34
- export declare const WIDGET_STYLE_SETTINGS_DEFAULTS: WidgetStyleSettingsDefaults;
35
- export declare function mapWidgetSettingsToSemanticTokens(settings: WidgetStyleSettingsDefaults): SemanticTokens;
36
30
  export declare function createSemanticTokens(settings?: Partial<WidgetSettingsData>): SemanticTokens;
37
31
  export declare function semanticTokensToCssCustomProperties(tokens: SemanticTokens): Record<string, string>;
32
+ export {};
@@ -1,5 +1,5 @@
1
1
  export type ResizeCorner = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
2
- export declare function useResize(settingsWidth: string | undefined, settingsHeight: string | undefined, workspaceId: string, isMinimized: boolean, isPreviewMode: boolean): {
2
+ export declare function useResize(settingsWidth: string | undefined, settingsHeight: string | undefined, workspaceId: string, isPreviewMode: boolean): {
3
3
  widthPx: string;
4
4
  heightPx: string;
5
5
  onResizeStart: (corner: ResizeCorner) => (e: React.MouseEvent) => void;
@@ -1,9 +1,9 @@
1
1
  import type { MarketrixConfig, WidgetSettingsData, WidgetState } from '../types';
2
2
  export type ValidWidgetConfig = MarketrixConfig & Required<Pick<MarketrixConfig, keyof WidgetSettingsData>>;
3
- interface UseWidgetProps {
4
- config?: MarketrixConfig;
5
- }
6
- export declare const useWidget: ({ config }?: UseWidgetProps) => {
3
+ /** Every setting resolved: API settings plus the position and script-tag overrides MarketrixWidget layers on top. */
4
+ export declare const WidgetConfigContext: import("react").Context<ValidWidgetConfig | null>;
5
+ export declare const useWidgetConfig: () => ValidWidgetConfig;
6
+ export declare const useWidget: () => {
7
7
  state: WidgetState;
8
8
  actions: {
9
9
  clearChatHistory: () => void;
@@ -23,14 +23,7 @@ export declare const useWidget: ({ config }?: UseWidgetProps) => {
23
23
  closeWidget: () => void;
24
24
  setMode: (mode: import("..").InstructionType) => void;
25
25
  setLoading: (loading: boolean) => void;
26
- setAgentAvailable: (available: boolean) => void;
27
26
  setError: (error: string | undefined) => void;
28
- clearError: () => void;
29
27
  applyState: (payload: Partial<import("../context/UIStateContext").UIState>) => void;
30
28
  };
31
- config: ValidWidgetConfig;
32
- shouldShow: boolean;
33
- isPreviewMode: boolean;
34
- configValid: boolean;
35
29
  };
36
- export {};
@@ -13,11 +13,6 @@ export declare const widgetContract: {
13
13
  target_user_id: import("zod").ZodOptional<import("zod").ZodNumber>;
14
14
  target_user_email: import("zod").ZodOptional<import("zod").ZodString>;
15
15
  reason: import("zod").ZodOptional<import("zod").ZodString>;
16
- assigned_role: import("zod").ZodOptional<import("zod").ZodString>;
17
- new_role: import("zod").ZodOptional<import("zod").ZodString>;
18
- previous_role: import("zod").ZodOptional<import("zod").ZodString>;
19
- workspace_name: import("zod").ZodOptional<import("zod").ZodString>;
20
- workspace_slug: import("zod").ZodOptional<import("zod").ZodString>;
21
16
  ip_address: import("zod").ZodOptional<import("zod").ZodString>;
22
17
  user_agent: import("zod").ZodOptional<import("zod").ZodString>;
23
18
  widget_type: import("zod").ZodOptional<import("zod").ZodString>;
@@ -127,11 +122,6 @@ export declare const widgetContract: {
127
122
  target_user_id: import("zod").ZodOptional<import("zod").ZodNumber>;
128
123
  target_user_email: import("zod").ZodOptional<import("zod").ZodString>;
129
124
  reason: import("zod").ZodOptional<import("zod").ZodString>;
130
- assigned_role: import("zod").ZodOptional<import("zod").ZodString>;
131
- new_role: import("zod").ZodOptional<import("zod").ZodString>;
132
- previous_role: import("zod").ZodOptional<import("zod").ZodString>;
133
- workspace_name: import("zod").ZodOptional<import("zod").ZodString>;
134
- workspace_slug: import("zod").ZodOptional<import("zod").ZodString>;
135
125
  ip_address: import("zod").ZodOptional<import("zod").ZodString>;
136
126
  user_agent: import("zod").ZodOptional<import("zod").ZodString>;
137
127
  widget_type: import("zod").ZodOptional<import("zod").ZodString>;
@@ -19,11 +19,6 @@ export declare const activityLogCreate: import("@orpc/contract").ContractProcedu
19
19
  target_user_id: z.ZodOptional<z.ZodNumber>;
20
20
  target_user_email: z.ZodOptional<z.ZodString>;
21
21
  reason: z.ZodOptional<z.ZodString>;
22
- assigned_role: z.ZodOptional<z.ZodString>;
23
- new_role: z.ZodOptional<z.ZodString>;
24
- previous_role: z.ZodOptional<z.ZodString>;
25
- workspace_name: z.ZodOptional<z.ZodString>;
26
- workspace_slug: z.ZodOptional<z.ZodString>;
27
22
  ip_address: z.ZodOptional<z.ZodString>;
28
23
  user_agent: z.ZodOptional<z.ZodString>;
29
24
  widget_type: z.ZodOptional<z.ZodString>;
@@ -133,11 +128,6 @@ export declare const activityLogCreate: import("@orpc/contract").ContractProcedu
133
128
  target_user_id: z.ZodOptional<z.ZodNumber>;
134
129
  target_user_email: z.ZodOptional<z.ZodString>;
135
130
  reason: z.ZodOptional<z.ZodString>;
136
- assigned_role: z.ZodOptional<z.ZodString>;
137
- new_role: z.ZodOptional<z.ZodString>;
138
- previous_role: z.ZodOptional<z.ZodString>;
139
- workspace_name: z.ZodOptional<z.ZodString>;
140
- workspace_slug: z.ZodOptional<z.ZodString>;
141
131
  ip_address: z.ZodOptional<z.ZodString>;
142
132
  user_agent: z.ZodOptional<z.ZodString>;
143
133
  widget_type: z.ZodOptional<z.ZodString>;
@@ -255,11 +245,6 @@ export declare const activityLogSearch: import("@orpc/contract").ContractProcedu
255
245
  target_user_id: z.ZodOptional<z.ZodNumber>;
256
246
  target_user_email: z.ZodOptional<z.ZodString>;
257
247
  reason: z.ZodOptional<z.ZodString>;
258
- assigned_role: z.ZodOptional<z.ZodString>;
259
- new_role: z.ZodOptional<z.ZodString>;
260
- previous_role: z.ZodOptional<z.ZodString>;
261
- workspace_name: z.ZodOptional<z.ZodString>;
262
- workspace_slug: z.ZodOptional<z.ZodString>;
263
248
  ip_address: z.ZodOptional<z.ZodString>;
264
249
  user_agent: z.ZodOptional<z.ZodString>;
265
250
  widget_type: z.ZodOptional<z.ZodString>;
@@ -285,11 +270,6 @@ export declare const activityLogRoutes: {
285
270
  target_user_id: z.ZodOptional<z.ZodNumber>;
286
271
  target_user_email: z.ZodOptional<z.ZodString>;
287
272
  reason: z.ZodOptional<z.ZodString>;
288
- assigned_role: z.ZodOptional<z.ZodString>;
289
- new_role: z.ZodOptional<z.ZodString>;
290
- previous_role: z.ZodOptional<z.ZodString>;
291
- workspace_name: z.ZodOptional<z.ZodString>;
292
- workspace_slug: z.ZodOptional<z.ZodString>;
293
273
  ip_address: z.ZodOptional<z.ZodString>;
294
274
  user_agent: z.ZodOptional<z.ZodString>;
295
275
  widget_type: z.ZodOptional<z.ZodString>;
@@ -399,11 +379,6 @@ export declare const activityLogRoutes: {
399
379
  target_user_id: z.ZodOptional<z.ZodNumber>;
400
380
  target_user_email: z.ZodOptional<z.ZodString>;
401
381
  reason: z.ZodOptional<z.ZodString>;
402
- assigned_role: z.ZodOptional<z.ZodString>;
403
- new_role: z.ZodOptional<z.ZodString>;
404
- previous_role: z.ZodOptional<z.ZodString>;
405
- workspace_name: z.ZodOptional<z.ZodString>;
406
- workspace_slug: z.ZodOptional<z.ZodString>;
407
382
  ip_address: z.ZodOptional<z.ZodString>;
408
383
  user_agent: z.ZodOptional<z.ZodString>;
409
384
  widget_type: z.ZodOptional<z.ZodString>;
@@ -521,11 +496,6 @@ export declare const activityLogRoutes: {
521
496
  target_user_id: z.ZodOptional<z.ZodNumber>;
522
497
  target_user_email: z.ZodOptional<z.ZodString>;
523
498
  reason: z.ZodOptional<z.ZodString>;
524
- assigned_role: z.ZodOptional<z.ZodString>;
525
- new_role: z.ZodOptional<z.ZodString>;
526
- previous_role: z.ZodOptional<z.ZodString>;
527
- workspace_name: z.ZodOptional<z.ZodString>;
528
- workspace_slug: z.ZodOptional<z.ZodString>;
529
499
  ip_address: z.ZodOptional<z.ZodString>;
530
500
  user_agent: z.ZodOptional<z.ZodString>;
531
501
  widget_type: z.ZodOptional<z.ZodString>;
@@ -306,11 +306,6 @@ export declare const ActivityLogMetadataSchema: z.ZodObject<{
306
306
  target_user_id: z.ZodOptional<z.ZodNumber>;
307
307
  target_user_email: z.ZodOptional<z.ZodString>;
308
308
  reason: z.ZodOptional<z.ZodString>;
309
- assigned_role: z.ZodOptional<z.ZodString>;
310
- new_role: z.ZodOptional<z.ZodString>;
311
- previous_role: z.ZodOptional<z.ZodString>;
312
- workspace_name: z.ZodOptional<z.ZodString>;
313
- workspace_slug: z.ZodOptional<z.ZodString>;
314
309
  ip_address: z.ZodOptional<z.ZodString>;
315
310
  user_agent: z.ZodOptional<z.ZodString>;
316
311
  widget_type: z.ZodOptional<z.ZodString>;
@@ -375,11 +370,6 @@ export declare const ActivityLogEntitySchema: z.ZodObject<{
375
370
  target_user_id: z.ZodOptional<z.ZodNumber>;
376
371
  target_user_email: z.ZodOptional<z.ZodString>;
377
372
  reason: z.ZodOptional<z.ZodString>;
378
- assigned_role: z.ZodOptional<z.ZodString>;
379
- new_role: z.ZodOptional<z.ZodString>;
380
- previous_role: z.ZodOptional<z.ZodString>;
381
- workspace_name: z.ZodOptional<z.ZodString>;
382
- workspace_slug: z.ZodOptional<z.ZodString>;
383
373
  ip_address: z.ZodOptional<z.ZodString>;
384
374
  user_agent: z.ZodOptional<z.ZodString>;
385
375
  widget_type: z.ZodOptional<z.ZodString>;
@@ -401,11 +391,6 @@ export declare const ActivityLogCreateSchema: z.ZodObject<{
401
391
  target_user_id: z.ZodOptional<z.ZodNumber>;
402
392
  target_user_email: z.ZodOptional<z.ZodString>;
403
393
  reason: z.ZodOptional<z.ZodString>;
404
- assigned_role: z.ZodOptional<z.ZodString>;
405
- new_role: z.ZodOptional<z.ZodString>;
406
- previous_role: z.ZodOptional<z.ZodString>;
407
- workspace_name: z.ZodOptional<z.ZodString>;
408
- workspace_slug: z.ZodOptional<z.ZodString>;
409
394
  ip_address: z.ZodOptional<z.ZodString>;
410
395
  user_agent: z.ZodOptional<z.ZodString>;
411
396
  widget_type: z.ZodOptional<z.ZodString>;
@@ -15,11 +15,6 @@ export declare const sdk: {
15
15
  target_user_id: import("zod").ZodOptional<import("zod").ZodNumber>;
16
16
  target_user_email: import("zod").ZodOptional<import("zod").ZodString>;
17
17
  reason: import("zod").ZodOptional<import("zod").ZodString>;
18
- assigned_role: import("zod").ZodOptional<import("zod").ZodString>;
19
- new_role: import("zod").ZodOptional<import("zod").ZodString>;
20
- previous_role: import("zod").ZodOptional<import("zod").ZodString>;
21
- workspace_name: import("zod").ZodOptional<import("zod").ZodString>;
22
- workspace_slug: import("zod").ZodOptional<import("zod").ZodString>;
23
18
  ip_address: import("zod").ZodOptional<import("zod").ZodString>;
24
19
  user_agent: import("zod").ZodOptional<import("zod").ZodString>;
25
20
  widget_type: import("zod").ZodOptional<import("zod").ZodString>;
@@ -129,11 +124,6 @@ export declare const sdk: {
129
124
  target_user_id: import("zod").ZodOptional<import("zod").ZodNumber>;
130
125
  target_user_email: import("zod").ZodOptional<import("zod").ZodString>;
131
126
  reason: import("zod").ZodOptional<import("zod").ZodString>;
132
- assigned_role: import("zod").ZodOptional<import("zod").ZodString>;
133
- new_role: import("zod").ZodOptional<import("zod").ZodString>;
134
- previous_role: import("zod").ZodOptional<import("zod").ZodString>;
135
- workspace_name: import("zod").ZodOptional<import("zod").ZodString>;
136
- workspace_slug: import("zod").ZodOptional<import("zod").ZodString>;
137
127
  ip_address: import("zod").ZodOptional<import("zod").ZodString>;
138
128
  user_agent: import("zod").ZodOptional<import("zod").ZodString>;
139
129
  widget_type: import("zod").ZodOptional<import("zod").ZodString>;
@@ -1,3 +1,4 @@
1
- import type { MarketrixConfig, MessageDispatchRequest } from '../types';
2
- /** Fire-and-forget send over the typed stream; the reply arrives asynchronously as a chat/response event. */
3
- export declare function messageDispatch(config: MarketrixConfig, request: MessageDispatchRequest): Promise<void>;
1
+ import { type InstructionType } from '../sdk';
2
+ import type { MarketrixConfig } from '../types';
3
+ /** The reply does not come back from here — it arrives asynchronously as a chat/response event on the stream. */
4
+ export declare function messageDispatch(config: MarketrixConfig, message: string, mode: InstructionType, requestId: string): Promise<void>;
@@ -31,8 +31,6 @@ export interface SearchParams {
31
31
  }
32
32
  export interface ClickElementParams {
33
33
  index: number;
34
- coordinate_x?: number;
35
- coordinate_y?: number;
36
34
  }
37
35
  export interface TypeTextParams {
38
36
  index: number;
@@ -68,9 +66,7 @@ export interface WaitParams {
68
66
  seconds: number;
69
67
  }
70
68
  export interface ExtractParams {
71
- query?: string;
72
69
  extract_links?: boolean;
73
- start_from_char?: number;
74
70
  }
75
71
  export declare class BrowserToolService {
76
72
  executeTool(browserToolName: string, args: Record<string, unknown>, mode?: string, explanation?: string): Promise<ToolExecutionResult<unknown>>;