@marketrix.ai/widget 3.8.53 → 3.8.134

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.
@@ -20,13 +20,6 @@ export declare class ValidationService {
20
20
  * Handles both mtxId+mtxKey and mtxApp cases
21
21
  */
22
22
  validateConfig(config: MarketrixConfig): Promise<WidgetValidationResult>;
23
- /**
24
- * Validate by mtxId and mtxKey
25
- */
26
23
  private validateByMarketrixId;
27
- /**
28
- * Validate by mtxApp directly
29
- * Validates the application by ID
30
- */
31
24
  private validateByApplication;
32
25
  }
@@ -86,10 +86,6 @@ export interface SendMessageResponse {
86
86
  task_id?: string;
87
87
  }
88
88
  export type WidgetPosition = WidgetSettingsData['widget_position'];
89
- /**
90
- * Configuration for addWidget function
91
- * Supports preview, production, and dev modes
92
- */
93
89
  export type AddWidgetConfig = ({
94
90
  settings: WidgetSettingsData;
95
91
  mtxId?: never;
@@ -119,9 +115,6 @@ export type AddWidgetConfig = ({
119
115
  /** Controls screen sharing prompts and button. When false, screen access requests are auto-denied and Share Screen button is hidden. Default: true */
120
116
  use_screenshare?: boolean;
121
117
  };
122
- /**
123
- * Props for MarketrixWidget React component
124
- */
125
118
  export interface MarketrixWidgetProps {
126
119
  settings: WidgetSettingsData;
127
120
  container?: HTMLElement;
@@ -5,9 +5,6 @@ import type { MarketrixConfig } from '../types';
5
5
  * Consolidates error instanceof Error ? error.message : String(error)
6
6
  */
7
7
  export declare function extractErrorMessage(error: unknown, fallback?: string): string;
8
- /**
9
- * Handle API error with consistent error message extraction
10
- */
11
8
  export declare function handleApiError(error: unknown, context?: string, config?: Partial<MarketrixConfig>): {
12
9
  isValid: false;
13
10
  error: string;
@@ -25,50 +25,16 @@ export declare const createWidgetContainer: (parentContainer?: HTMLElement, cont
25
25
  * @param previewMode - If true, disables network operations (for integration previews)
26
26
  */
27
27
  export declare const mountWidgetToContainer: (mountEl: HTMLElement, config: MarketrixConfig, previewMode?: boolean) => Root;
28
- /**
29
- * Destroy widget container
30
- * @param container - Container to destroy
31
- */
32
28
  export declare const destroyWidgetContainer: (container: HTMLElement) => void;
33
- /**
34
- * Get current widget instance
35
- */
36
29
  export declare const getWidgetInstance: () => Root | null;
37
- /**
38
- * Set widget instance
39
- */
40
30
  export declare const setWidgetInstance: (instance: Root | null) => void;
41
- /**
42
- * Get current configuration
43
- */
44
31
  export declare const getCurrentConfig: () => MarketrixConfig | null;
45
- /**
46
- * Set current configuration
47
- */
48
32
  export declare const setCurrentConfig: (config: MarketrixConfig | null) => void;
49
- /**
50
- * Check if widget is initialized
51
- */
52
33
  export declare const isWidgetInitialized: () => boolean;
53
- /**
54
- * Clear widget instance and config
55
- */
56
34
  export declare const clearWidgetState: () => void;
57
- /**
58
- * Set programmatic initialization in progress flag
59
- */
60
35
  export declare const setProgrammaticInitInProgress: (inProgress: boolean) => void;
61
- /**
62
- * Check if programmatic initialization is in progress
63
- */
64
36
  export declare const isProgrammaticInitInProgress: () => boolean;
65
- /**
66
- * Show widget settings loader with optional message
67
- */
68
37
  export declare const showWidgetSettingsLoader: (message?: string) => void;
69
- /**
70
- * Hide widget settings loader
71
- */
72
38
  export declare const hideWidgetSettingsLoader: () => void;
73
39
  /**
74
40
  * Auto-initialize widget from script tag attributes
@@ -5,21 +5,9 @@
5
5
  * - Removing thinking markers
6
6
  */
7
7
  import type { ChatMessage, InstructionType } from '../types';
8
- /**
9
- * Remove all __THINKING__ markers from message content
10
- */
11
8
  export declare function removeThinkingMarkers(content: string): string;
12
- /**
13
- * Remove thinking marker from end of content (for display)
14
- */
15
9
  export declare function removeThinkingMarkerFromEnd(content: string): string;
16
- /**
17
- * Check if content has thinking marker
18
- */
19
10
  export declare function hasThinkingMarker(content: string): boolean;
20
- /**
21
- * Add thinking marker to content
22
- */
23
11
  export declare function addThinkingMarker(content: string): string;
24
12
  /**
25
13
  * Message Finder Utility
@@ -56,21 +44,9 @@ export declare function findMessageForProgress(options: FindMessageOptions): {
56
44
  * Also the set that requires element highlighting in ToolService.
57
45
  */
58
46
  export declare const WAIT_FOR_USER_TOOLS: Set<string>;
59
- /**
60
- * Add a new progress step to a message
61
- */
62
47
  export declare function addProgressLine(message: ChatMessage, toolName: string, explanation: string): ChatMessage;
63
- /**
64
- * Mark the last incomplete progress step as completed
65
- */
66
48
  export declare function markProgressLineComplete(message: ChatMessage, toolName?: string): ChatMessage;
67
- /**
68
- * Mark the last incomplete progress step as failed
69
- */
70
49
  export declare function markProgressLineFailed(message: ChatMessage, toolName: string, error: string): ChatMessage;
71
- /**
72
- * Add or remove thinking marker based on task state
73
- */
74
50
  export declare function updateThinkingMarker(message: ChatMessage, isTaskRunning: boolean, currentMode: 'show' | 'tell' | 'do', isWaitingForUser?: boolean): ChatMessage;
75
51
  /**
76
52
  * Tool Name Mapping — derived from BROWSER_TOOLS (single source of truth).
@@ -1,26 +1,17 @@
1
1
  /**
2
2
  * Color utility functions for widget theming
3
3
  */
4
- /**
5
- * Converts hex color to RGB
6
- */
7
4
  export declare function hexToRgb(hex: string): {
8
5
  r: number;
9
6
  g: number;
10
7
  b: number;
11
8
  } | null;
12
- /**
13
- * Gets a contrasting color (white or black) based on the background color
14
- */
15
9
  export declare function getContrastingColor(color: string): string;
16
10
  /**
17
11
  * Adds opacity to a color
18
12
  * Supports hex colors (with or without #) and rgb/rgba strings
19
13
  */
20
14
  export declare function addOpacity(color: string, opacity: number): string;
21
- /**
22
- * Darkens a color by a specified amount (0-1)
23
- */
24
15
  export declare function darkenColor(color: string, amount: number): string;
25
16
  export declare const formatMessageTime: (date: Date | undefined) => string;
26
17
  export declare const getModeDisplayName: (mode: "show" | "tell" | "do") => string;
@@ -4,9 +4,6 @@
4
4
  * Centralized logging utility with log levels and environment-based filtering.
5
5
  * Only logs in development mode to reduce noise in production.
6
6
  */
7
- /**
8
- * Create a scoped logger with a fixed prefix
9
- */
10
7
  export declare function createLogger(prefix: string): {
11
8
  debug: (message: string, ...args: unknown[]) => void;
12
9
  info: (message: string, ...args: unknown[]) => void;
@@ -5,15 +5,6 @@
5
5
  * These are shared utilities used across the codebase.
6
6
  */
7
7
  import type { WidgetSettingsData } from '../sdk';
8
- /**
9
- * Type guard for WidgetSettingsData
10
- */
11
8
  export declare function isWidgetSettingsData(data: unknown): data is WidgetSettingsData;
12
- /**
13
- * Type guard for HTMLElement
14
- */
15
9
  export declare function isHTMLElement(element: Element | null): element is HTMLElement;
16
- /**
17
- * Type guard for HTMLScriptElement
18
- */
19
10
  export declare function isHTMLScriptElement(element: Element | null): element is HTMLScriptElement;