@marketrix.ai/widget 3.2.202 → 3.2.247
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/src/sdk/index.d.ts +53 -34
- package/dist/src/sdk/index.d.ts.map +1 -1
- package/dist/src/sdk/routes.d.ts +53 -34
- package/dist/src/sdk/routes.d.ts.map +1 -1
- package/dist/src/sdk/schema.d.ts +28 -21
- package/dist/src/sdk/schema.d.ts.map +1 -1
- package/dist/widget.mjs +2 -2
- package/dist/widget.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/src/services/DevTestService.d.ts +0 -172
- package/dist/src/services/DevTestService.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Development-only service for testing DOM mismatch detection and recovery.
|
|
3
|
-
* This service provides methods to simulate DOM changes and agent commands.
|
|
4
|
-
*/
|
|
5
|
-
import { type ElementFingerprint, type ValidationResult } from './DomService';
|
|
6
|
-
export interface TestResult {
|
|
7
|
-
command: string;
|
|
8
|
-
index: number;
|
|
9
|
-
validation: ValidationResult;
|
|
10
|
-
outcome: 'executed' | 'failed';
|
|
11
|
-
details: string;
|
|
12
|
-
timestamp: Date;
|
|
13
|
-
}
|
|
14
|
-
export interface ValidationLogEntry {
|
|
15
|
-
timestamp: Date;
|
|
16
|
-
action: string;
|
|
17
|
-
originalIndex: number;
|
|
18
|
-
validation: ValidationResult;
|
|
19
|
-
recoveryAction?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface ScenarioResult {
|
|
22
|
-
scenarioId: string;
|
|
23
|
-
scenarioName: string;
|
|
24
|
-
steps: TestResult[];
|
|
25
|
-
passed: boolean;
|
|
26
|
-
summary: string;
|
|
27
|
-
}
|
|
28
|
-
declare class DevTestService {
|
|
29
|
-
private static instance;
|
|
30
|
-
private validationLog;
|
|
31
|
-
private lastTestResult;
|
|
32
|
-
private constructor();
|
|
33
|
-
static getInstance(): DevTestService;
|
|
34
|
-
/**
|
|
35
|
-
* Insert a new interactable element before the element at the given index
|
|
36
|
-
* This will shift all subsequent indices
|
|
37
|
-
*/
|
|
38
|
-
insertElementBefore(index: number, count?: number): HTMLElement[];
|
|
39
|
-
/**
|
|
40
|
-
* Insert a new interactable element after the element at the given index
|
|
41
|
-
*/
|
|
42
|
-
insertElementAfter(index: number): HTMLElement | null;
|
|
43
|
-
/**
|
|
44
|
-
* Remove the element at the given index
|
|
45
|
-
*/
|
|
46
|
-
removeElement(index: number): boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Remove multiple elements by their indices
|
|
49
|
-
*/
|
|
50
|
-
removeMultipleElements(indices: number[]): number;
|
|
51
|
-
/**
|
|
52
|
-
* Simulate a component re-render by replacing the element with a new one
|
|
53
|
-
* This creates a new DOM node with the same attributes
|
|
54
|
-
*/
|
|
55
|
-
simulateRerender(index: number): HTMLElement | null;
|
|
56
|
-
/**
|
|
57
|
-
* Simulate a state change that re-renders a container
|
|
58
|
-
*/
|
|
59
|
-
simulateStateChange(containerSelector?: string): number;
|
|
60
|
-
/**
|
|
61
|
-
* Simulate navigation by replacing page content
|
|
62
|
-
*/
|
|
63
|
-
simulateNavigation(): void;
|
|
64
|
-
/**
|
|
65
|
-
* Reorder elements in a list container
|
|
66
|
-
*/
|
|
67
|
-
reorderList(containerSelector: string): number;
|
|
68
|
-
/**
|
|
69
|
-
* Inject content after a delay
|
|
70
|
-
*/
|
|
71
|
-
injectDelayedContent(delayMs?: number): Promise<HTMLElement[]>;
|
|
72
|
-
/**
|
|
73
|
-
* Simulate infinite scroll by adding elements at the end
|
|
74
|
-
*/
|
|
75
|
-
simulateInfiniteScroll(count?: number): HTMLElement[];
|
|
76
|
-
/**
|
|
77
|
-
* Replace a skeleton loader with real content
|
|
78
|
-
*/
|
|
79
|
-
replaceSkeleton(skeletonIndex: number): HTMLElement | null;
|
|
80
|
-
/**
|
|
81
|
-
* Insert a sibling of the same type to break nth-of-type selectors
|
|
82
|
-
*/
|
|
83
|
-
insertSameSibling(index: number): HTMLElement | null;
|
|
84
|
-
/**
|
|
85
|
-
* Change the class name of an element
|
|
86
|
-
*/
|
|
87
|
-
changeClassName(index: number, newClass: string): boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Wrap an element in a new parent div, changing its DOM path
|
|
90
|
-
*/
|
|
91
|
-
wrapInParent(index: number): HTMLElement | null;
|
|
92
|
-
/**
|
|
93
|
-
* Add a duplicate ID to cause selector ambiguity
|
|
94
|
-
*/
|
|
95
|
-
addDuplicateId(index: number): HTMLElement | null;
|
|
96
|
-
/**
|
|
97
|
-
* Create and show a modal with buttons
|
|
98
|
-
*/
|
|
99
|
-
showModal(): HTMLElement;
|
|
100
|
-
/**
|
|
101
|
-
* Expand a dropdown to show options
|
|
102
|
-
*/
|
|
103
|
-
expandDropdown(index: number): HTMLElement | null;
|
|
104
|
-
/**
|
|
105
|
-
* Perform rapid DOM changes
|
|
106
|
-
*/
|
|
107
|
-
rapidFireChanges(count?: number): void;
|
|
108
|
-
/**
|
|
109
|
-
* Create an iframe with a button inside
|
|
110
|
-
*/
|
|
111
|
-
createIframeWithButton(): HTMLIFrameElement;
|
|
112
|
-
/**
|
|
113
|
-
* Create a custom element with Shadow DOM
|
|
114
|
-
*/
|
|
115
|
-
createShadowDomElement(): HTMLElement;
|
|
116
|
-
/**
|
|
117
|
-
* Change the text content of an element
|
|
118
|
-
*/
|
|
119
|
-
changeElementContent(index: number, newText: string): boolean;
|
|
120
|
-
/**
|
|
121
|
-
* Hide an element (make it non-interactable)
|
|
122
|
-
*/
|
|
123
|
-
hideElement(index: number): boolean;
|
|
124
|
-
/**
|
|
125
|
-
* Simulate an agent command and track the result
|
|
126
|
-
*/
|
|
127
|
-
simulateAgentCommand(tool: string, args: Record<string, unknown>): Promise<TestResult>;
|
|
128
|
-
/**
|
|
129
|
-
* Run a predefined test scenario
|
|
130
|
-
*/
|
|
131
|
-
runScenario(scenarioId: string): Promise<ScenarioResult>;
|
|
132
|
-
private runIndexShiftInsertScenario;
|
|
133
|
-
private runIndexShiftRemoveScenario;
|
|
134
|
-
private runContentChangeScenario;
|
|
135
|
-
private runSpaRerenderScenario;
|
|
136
|
-
/**
|
|
137
|
-
* Run all test scenarios
|
|
138
|
-
*/
|
|
139
|
-
runAllScenarios(): Promise<ScenarioResult[]>;
|
|
140
|
-
/**
|
|
141
|
-
* Get the last test result
|
|
142
|
-
*/
|
|
143
|
-
getLastTestResult(): TestResult | null;
|
|
144
|
-
/**
|
|
145
|
-
* Get the validation log
|
|
146
|
-
*/
|
|
147
|
-
getValidationLog(): ValidationLogEntry[];
|
|
148
|
-
/**
|
|
149
|
-
* Clear the validation log
|
|
150
|
-
*/
|
|
151
|
-
clearLog(): void;
|
|
152
|
-
private addToLog;
|
|
153
|
-
/**
|
|
154
|
-
* Clean up test elements from the DOM
|
|
155
|
-
*/
|
|
156
|
-
cleanupTestElements(): void;
|
|
157
|
-
/**
|
|
158
|
-
* Get all indexed elements with their fingerprints
|
|
159
|
-
*/
|
|
160
|
-
getIndexedElements(): Array<{
|
|
161
|
-
index: number;
|
|
162
|
-
fingerprint: ElementFingerprint;
|
|
163
|
-
element: HTMLElement | null;
|
|
164
|
-
}>;
|
|
165
|
-
/**
|
|
166
|
-
* Force a validation check on a specific index
|
|
167
|
-
*/
|
|
168
|
-
forceValidation(index: number): ValidationResult;
|
|
169
|
-
}
|
|
170
|
-
export declare const devTestService: DevTestService;
|
|
171
|
-
export {};
|
|
172
|
-
//# sourceMappingURL=DevTestService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DevTestService.d.ts","sourceRoot":"","sources":["../../../src/services/DevTestService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAc,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG1F,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;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