@marketrix.ai/widget 3.8.333 → 3.8.336
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/context/WidgetProviders.d.ts +2 -0
- package/dist/src/design-system/semantic-tokens.d.ts +1 -0
- package/dist/src/react19.d.ts +2 -0
- package/dist/src/services/ApiService.d.ts +3 -11
- package/dist/src/services/ValidationService.d.ts +2 -7
- package/dist/src/services/WidgetService.d.ts +3 -9
- package/dist/widget.mjs +61 -62
- package/dist/widget.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/src/components/base/Badge.d.ts +0 -11
- package/dist/src/components/base/Card.d.ts +0 -12
- package/dist/src/components/base/Dialog.d.ts +0 -24
- package/dist/src/components/base/Indicator.d.ts +0 -9
- package/dist/src/components/base/Menu.d.ts +0 -17
- package/dist/src/components/base/Pill.d.ts +0 -9
- package/dist/src/components/base/Textarea.d.ts +0 -9
- package/dist/src/components/base/Video.d.ts +0 -2
- package/dist/src/components/navigation/ViewTransition.d.ts +0 -8
- package/dist/src/components/ui/StateMessage.d.ts +0 -8
- package/dist/src/design-system/token-adapter.d.ts +0 -3
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
export declare const usePortalContainer: () => HTMLElement | ShadowRoot;
|
|
2
3
|
interface WidgetProvidersProps {
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
previewMode?: boolean;
|
|
6
|
+
portalContainer?: HTMLElement | ShadowRoot;
|
|
5
7
|
}
|
|
6
8
|
export declare const WidgetProviders: React.FC<WidgetProvidersProps>;
|
|
7
9
|
export {};
|
|
@@ -33,4 +33,5 @@ export type SemanticTokens = {
|
|
|
33
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
34
|
export declare const WIDGET_STYLE_SETTINGS_DEFAULTS: WidgetStyleSettingsDefaults;
|
|
35
35
|
export declare function mapWidgetSettingsToSemanticTokens(settings: WidgetStyleSettingsDefaults): SemanticTokens;
|
|
36
|
+
export declare function createSemanticTokens(settings?: Partial<WidgetSettingsData>): SemanticTokens;
|
|
36
37
|
export declare function semanticTokensToCssCustomProperties(tokens: SemanticTokens): Record<string, string>;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import type { MarketrixConfig, MessageDispatchRequest } from '../types';
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
getChatId(): string | null;
|
|
6
|
-
/** Resolves user_id from config, then localStorage, then sessionStorage. */
|
|
7
|
-
private getUserId;
|
|
8
|
-
logWidgetQuestion(question: string, mode: string): Promise<void>;
|
|
9
|
-
/** Fire-and-forget send over the typed stream; the reply arrives asynchronously as a chat/response event. */
|
|
10
|
-
messageDispatch(request: MessageDispatchRequest): Promise<void>;
|
|
11
|
-
updateConfig(newConfig: Partial<MarketrixConfig>): void;
|
|
12
|
-
}
|
|
2
|
+
export declare function getChatId(): string | null;
|
|
3
|
+
/** Fire-and-forget send over the typed stream; the reply arrives asynchronously as a chat/response event. */
|
|
4
|
+
export declare function messageDispatch(config: MarketrixConfig, request: MessageDispatchRequest): Promise<void>;
|
|
@@ -10,10 +10,5 @@ export interface WidgetValidationResult {
|
|
|
10
10
|
* Validates widget config: either the widget (marketrix_id + marketrix_key) and its application exist,
|
|
11
11
|
* or the application id exists.
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/** Handles both the mtxId+mtxKey and mtxApp cases. */
|
|
16
|
-
validateConfig(config: MarketrixConfig): Promise<WidgetValidationResult>;
|
|
17
|
-
private validateByMarketrixId;
|
|
18
|
-
private validateByApplication;
|
|
19
|
-
}
|
|
13
|
+
/** Handles both the mtxId+mtxKey and mtxApp cases. */
|
|
14
|
+
export declare function validateConfig(config: MarketrixConfig): Promise<WidgetValidationResult>;
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { type WidgetData, type WidgetSettingsData } from '../sdk';
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
private mtxApp?;
|
|
6
|
-
constructor(mtxId?: string, mtxKey?: string, mtxApp?: number);
|
|
7
|
-
/** Default settings merged with the matched widget's settings; null with no credentials (preview mode). */
|
|
8
|
-
widgetSettingsGet(): Promise<WidgetData | null>;
|
|
9
|
-
getSettings(widget: WidgetData): WidgetSettingsData | null;
|
|
10
|
-
}
|
|
2
|
+
export declare function getWidgetSettings(widget: WidgetData): WidgetSettingsData | null;
|
|
3
|
+
/** Default settings merged with the matched widget's settings; null with no credentials (preview mode). */
|
|
4
|
+
export declare function fetchWidgetSettings(mtxId?: string, mtxKey?: string, mtxApp?: number): Promise<WidgetData | null>;
|