@marketrix.ai/widget 3.3.175 → 3.3.177
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/components/chat/ProgressLine.d.ts +1 -1
- package/dist/src/components/chat/ProgressLine.d.ts.map +1 -1
- package/dist/src/context/TaskContext.d.ts.map +1 -1
- package/dist/src/sdk/index.d.ts +26 -69
- package/dist/src/sdk/index.d.ts.map +1 -1
- package/dist/src/sdk/routes.d.ts +26 -69
- package/dist/src/sdk/routes.d.ts.map +1 -1
- package/dist/src/sdk/schema.d.ts +18 -64
- package/dist/src/sdk/schema.d.ts.map +1 -1
- package/dist/src/services/ApiService.d.ts +0 -26
- package/dist/src/services/ApiService.d.ts.map +1 -1
- package/dist/src/services/SessionManager.d.ts +0 -8
- package/dist/src/services/SessionManager.d.ts.map +1 -1
- package/dist/src/test/fixtures.d.ts +1 -1
- package/dist/src/types/browserTools.d.ts +1 -1
- package/dist/src/utils/apiUtils.d.ts +1 -11
- package/dist/src/utils/apiUtils.d.ts.map +1 -1
- package/dist/src/utils/bootstrap.d.ts.map +1 -1
- package/dist/src/utils/chat.d.ts +0 -1
- package/dist/src/utils/chat.d.ts.map +1 -1
- package/dist/src/utils/common.d.ts +0 -39
- package/dist/src/utils/common.d.ts.map +1 -1
- package/dist/src/utils/dom.d.ts +0 -8
- package/dist/src/utils/dom.d.ts.map +1 -1
- package/dist/src/utils/format.d.ts +0 -9
- package/dist/src/utils/format.d.ts.map +1 -1
- package/dist/src/utils/suggestedActions.d.ts.map +1 -1
- package/dist/src/utils/validation.d.ts +1 -61
- package/dist/src/utils/validation.d.ts.map +1 -1
- package/dist/src/utils/widgetPositioning.d.ts +0 -17
- package/dist/src/utils/widgetPositioning.d.ts.map +1 -1
- package/dist/widget.mjs +66 -66
- package/dist/widget.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/src/utils/devTools.d.ts +0 -71
- package/dist/src/utils/devTools.d.ts.map +0 -1
|
@@ -22,15 +22,6 @@ export declare function addOpacity(color: string, opacity: number): string;
|
|
|
22
22
|
* Darkens a color by a specified amount (0-1)
|
|
23
23
|
*/
|
|
24
24
|
export declare function darkenColor(color: string, amount: number): string;
|
|
25
|
-
/**
|
|
26
|
-
* Lightens a color by a specified amount (0-1)
|
|
27
|
-
*/
|
|
28
|
-
export declare function lightenColor(color: string, amount: number): string;
|
|
29
|
-
/**
|
|
30
|
-
* Extracts the first color from a gradient string, or returns the color as-is
|
|
31
|
-
*/
|
|
32
|
-
export declare function extractColorFromGradient(color: string): string;
|
|
33
25
|
export declare const formatMessageTime: (date: Date | undefined) => string;
|
|
34
26
|
export declare const getModeDisplayName: (mode: "show" | "tell" | "do") => string;
|
|
35
|
-
export declare const getModeDescription: (mode: "show" | "tell" | "do") => string;
|
|
36
27
|
//# sourceMappingURL=format.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/utils/format.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAShF;AAwBD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGzD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAyBjE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMjE;AAED
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/utils/format.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAShF;AAwBD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGzD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAyBjE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMjE;AAED,eAAO,MAAM,iBAAiB,GAAI,MAAM,IAAI,GAAG,SAAS,KAAG,MAK1D,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,GAAG,MAAM,GAAG,IAAI,KAAG,MAWjE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestedActions.d.ts","sourceRoot":"","sources":["../../../src/utils/suggestedActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"suggestedActions.d.ts","sourceRoot":"","sources":["../../../src/utils/suggestedActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAOhD,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC;CACjB;AAoDD,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,eAAe,GAAG,mBAAmB,EAAE,CAyB5F"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Generic type guard functions for data validation and type checking.
|
|
5
5
|
* These are shared utilities used across the codebase.
|
|
6
6
|
*/
|
|
7
|
+
import type { WidgetSettingsData } from '../sdk';
|
|
7
8
|
/**
|
|
8
9
|
* Check if an object has a specific property
|
|
9
10
|
*/
|
|
@@ -12,77 +13,16 @@ export declare function hasProperty<K extends string>(obj: unknown, key: K): obj
|
|
|
12
13
|
* Check if a value is a non-null object
|
|
13
14
|
*/
|
|
14
15
|
export declare function isNonNullObject(value: unknown): value is Record<string, unknown>;
|
|
15
|
-
/**
|
|
16
|
-
* Check if a value is an array
|
|
17
|
-
*/
|
|
18
|
-
export declare function isArray<T>(value: unknown): value is T[];
|
|
19
|
-
/**
|
|
20
|
-
* Check if a value is a string
|
|
21
|
-
*/
|
|
22
|
-
export declare function isString(value: unknown): value is string;
|
|
23
|
-
/**
|
|
24
|
-
* Check if a value is a number
|
|
25
|
-
*/
|
|
26
|
-
export declare function isNumber(value: unknown): value is number;
|
|
27
|
-
/**
|
|
28
|
-
* Check if a value is a boolean
|
|
29
|
-
*/
|
|
30
|
-
export declare function isBoolean(value: unknown): value is boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Type guard for WidgetPosition
|
|
33
|
-
*/
|
|
34
|
-
export declare function isWidgetPosition(value: unknown): value is 'bottom_left' | 'bottom_right' | 'top_left' | 'top_right';
|
|
35
|
-
/**
|
|
36
|
-
* Type guard for WidgetMode
|
|
37
|
-
*/
|
|
38
|
-
export declare function isWidgetMode(value: unknown): value is 'ai' | 'live' | 'hybrid';
|
|
39
|
-
/**
|
|
40
|
-
* Check if a value is a plain object (not null, not array)
|
|
41
|
-
*/
|
|
42
|
-
export declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
43
|
-
import type { WidgetSettingsData } from '../sdk';
|
|
44
16
|
/**
|
|
45
17
|
* Type guard for WidgetSettingsData
|
|
46
18
|
*/
|
|
47
19
|
export declare function isWidgetSettingsData(data: unknown): data is WidgetSettingsData;
|
|
48
|
-
/**
|
|
49
|
-
* Type guard for error response body
|
|
50
|
-
*/
|
|
51
|
-
export interface ErrorResponseBody {
|
|
52
|
-
error?: string;
|
|
53
|
-
message?: string;
|
|
54
|
-
}
|
|
55
|
-
export declare function isErrorResponseBody(body: unknown): body is ErrorResponseBody;
|
|
56
20
|
/**
|
|
57
21
|
* Type guard for HTMLElement
|
|
58
22
|
*/
|
|
59
23
|
export declare function isHTMLElement(element: Element | null): element is HTMLElement;
|
|
60
|
-
/**
|
|
61
|
-
* Type guard for HTMLInputElement
|
|
62
|
-
*/
|
|
63
|
-
export declare function isHTMLInputElement(element: Element | EventTarget | null): element is HTMLInputElement;
|
|
64
|
-
/**
|
|
65
|
-
* Type guard for HTMLTextAreaElement
|
|
66
|
-
*/
|
|
67
|
-
export declare function isHTMLTextAreaElement(element: Element | EventTarget | null): element is HTMLTextAreaElement;
|
|
68
|
-
/**
|
|
69
|
-
* Type guard for HTMLButtonElement
|
|
70
|
-
*/
|
|
71
|
-
export declare function isHTMLButtonElement(element: Element | null): element is HTMLButtonElement;
|
|
72
|
-
/**
|
|
73
|
-
* Type guard for HTMLSelectElement
|
|
74
|
-
*/
|
|
75
|
-
export declare function isHTMLSelectElement(element: Element | null): element is HTMLSelectElement;
|
|
76
24
|
/**
|
|
77
25
|
* Type guard for HTMLScriptElement
|
|
78
26
|
*/
|
|
79
27
|
export declare function isHTMLScriptElement(element: Element | null): element is HTMLScriptElement;
|
|
80
|
-
/**
|
|
81
|
-
* Type guard for EventTarget as HTMLElement
|
|
82
|
-
*/
|
|
83
|
-
export declare function isHTMLElementEventTarget(target: EventTarget | null): target is HTMLElement;
|
|
84
|
-
/**
|
|
85
|
-
* Check if code is running in a browser environment
|
|
86
|
-
*/
|
|
87
|
-
export declare function isBrowser(): boolean;
|
|
88
28
|
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/utils/validation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/utils/validation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAMjD;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAE7F;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEhF;AAMD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,kBAAkB,CAa9E;AAMD;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,IAAI,WAAW,CAE7E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,IAAI,iBAAiB,CAEzF"}
|
|
@@ -3,28 +3,11 @@ import type { WidgetPosition } from '../types';
|
|
|
3
3
|
export declare const getPositionClasses: (position: WidgetPosition) => string;
|
|
4
4
|
/** Panel position inline styles — anchored to same corner as the launcher button. */
|
|
5
5
|
export declare const getPanelPositionStyle: (position: WidgetPosition) => React.CSSProperties;
|
|
6
|
-
export declare const getCornerInlineStyle: (position: WidgetPosition, offsetPx?: number) => {
|
|
7
|
-
top?: string;
|
|
8
|
-
right?: string;
|
|
9
|
-
bottom?: string;
|
|
10
|
-
left?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare const getNearestCorner: (x: number, y: number, bounds: {
|
|
13
|
-
left: number;
|
|
14
|
-
top: number;
|
|
15
|
-
width: number;
|
|
16
|
-
height: number;
|
|
17
|
-
}) => WidgetPosition;
|
|
18
6
|
/** Anchor top-left of widget (px) for a corner, given viewport and widget size. */
|
|
19
7
|
export declare const getAnchorTopLeft: (position: WidgetPosition, vw: number, vh: number, w: number, h: number) => {
|
|
20
8
|
x: number;
|
|
21
9
|
y: number;
|
|
22
10
|
};
|
|
23
|
-
/** Delta (dx, dy) that would place widget center at the given corner center. */
|
|
24
|
-
export declare const getDeltaToCorner: (position: WidgetPosition, corner: WidgetPosition, vw: number, vh: number, w: number, h: number) => {
|
|
25
|
-
dx: number;
|
|
26
|
-
dy: number;
|
|
27
|
-
};
|
|
28
11
|
/** Nearest corner by translation distance (for velocity-based snap, Next.js style). */
|
|
29
12
|
export declare const getNearestCornerByTranslation: (translation: {
|
|
30
13
|
dx: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetPositioning.d.ts","sourceRoot":"","sources":["../../../src/utils/widgetPositioning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI/C,eAAO,MAAM,kBAAkB,GAAI,UAAU,cAAc,KAAG,MAa7D,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,GAAI,UAAU,cAAc,KAAG,KAAK,CAAC,aAetE,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"widgetPositioning.d.ts","sourceRoot":"","sources":["../../../src/utils/widgetPositioning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI/C,eAAO,MAAM,kBAAkB,GAAI,UAAU,cAAc,KAAG,MAa7D,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,GAAI,UAAU,cAAc,KAAG,KAAK,CAAC,aAetE,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,gBAAgB,GAC3B,UAAU,cAAc,EACxB,IAAI,MAAM,EACV,IAAI,MAAM,EACV,GAAG,MAAM,EACT,GAAG,MAAM,KACR;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAYxB,CAAC;AA2CF,uFAAuF;AACvF,eAAO,MAAM,6BAA6B,GACxC,aAAa;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EACvC,UAAU,cAAc,EACxB,IAAI,MAAM,EACV,IAAI,MAAM,EACV,GAAG,MAAM,EACT,GAAG,MAAM,KACR,cAaF,CAAC"}
|