@marketrix.ai/widget 3.8.444 → 3.8.446

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.
@@ -1,7 +1,8 @@
1
+ import type { ComponentPropsWithRef } from 'react';
1
2
  import { type RadiusToken } from '../../design-system/component-tokens';
2
3
  import type { ShadowToken } from '../../design-system/shadows';
3
4
  type AvatarSize = 'sm' | 'md' | 'lg';
4
- export interface AvatarProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'size'> {
5
+ export interface AvatarProps extends Omit<ComponentPropsWithRef<'img'>, 'size'> {
5
6
  src: string;
6
7
  alt: string;
7
8
  elevation?: ShadowToken;
@@ -9,5 +10,5 @@ export interface AvatarProps extends Omit<React.ImgHTMLAttributes<HTMLImageEleme
9
10
  size?: AvatarSize | number;
10
11
  rounded?: boolean | 'full' | 'theme' | RadiusToken;
11
12
  }
12
- export declare const Avatar: import("react").ForwardRefExoticComponent<AvatarProps & import("react").RefAttributes<HTMLImageElement>>;
13
+ export declare function Avatar(props: AvatarProps): import("react").JSX.Element;
13
14
  export {};
@@ -1,8 +1,9 @@
1
+ import type { ComponentPropsWithRef } from 'react';
1
2
  import type { ShadowToken } from '../../design-system/shadows';
2
3
  type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'bare' | 'chip' | 'tab' | 'inline' | 'toolbar';
3
4
  type ButtonSize = 'sm' | 'md';
4
5
  type ButtonShape = 'default' | 'theme' | 'pill';
5
- export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
6
+ export interface ButtonProps extends ComponentPropsWithRef<'button'> {
6
7
  active?: boolean;
7
8
  elevation?: ShadowToken;
8
9
  loading?: boolean;
@@ -12,5 +13,5 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
12
13
  variant?: ButtonVariant;
13
14
  full?: boolean;
14
15
  }
15
- export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
16
+ export declare function Button({ active, className, disabled, elevation, full, loading, shape, size, stacked, type, variant, style, ref, ...props }: ButtonProps): import("react").JSX.Element;
16
17
  export {};
@@ -1,8 +1,9 @@
1
+ import type { ComponentPropsWithRef } from 'react';
1
2
  import { type IconName } from './icons';
2
- export interface IconProps extends React.SVGAttributes<SVGElement> {
3
+ export interface IconProps extends ComponentPropsWithRef<'svg'> {
3
4
  name: IconName;
4
5
  size?: number;
5
6
  /** @internal blocks/ only */
6
7
  className?: string;
7
8
  }
8
- export declare const Icon: import("react").ForwardRefExoticComponent<IconProps & import("react").RefAttributes<SVGSVGElement>>;
9
+ export declare function Icon({ name, size, className, ref, ...props }: IconProps): import("react").JSX.Element | null;
@@ -1,9 +1,10 @@
1
+ import type { ComponentPropsWithRef } from 'react';
1
2
  import { type TextTone } from '../../design-system/component-tokens';
2
3
  import type { ShadowToken } from '../../design-system/shadows';
3
4
  type IconButtonVariant = 'primary' | 'secondary' | 'ghost' | 'toolbar';
4
5
  type IconButtonSize = 'xs' | 'sm';
5
6
  type IconButtonShape = 'circle' | 'theme';
6
- export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
7
+ export interface IconButtonProps extends ComponentPropsWithRef<'button'> {
7
8
  elevation?: ShadowToken;
8
9
  variant?: IconButtonVariant;
9
10
  size?: IconButtonSize;
@@ -13,5 +14,5 @@ export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEl
13
14
  /** @internal blocks/ only */
14
15
  className?: string;
15
16
  }
16
- export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
17
+ export declare function IconButton({ variant, size, shape, tone, label, disabled, elevation, className: userClassName, children, style, ref, ...props }: IconButtonProps): import("react").JSX.Element;
17
18
  export {};
@@ -1,4 +1,4 @@
1
- import { type CSSProperties } from 'react';
1
+ import type { CSSProperties, Ref } from 'react';
2
2
  type SpinnerSize = 'sm' | 'md' | 'lg';
3
3
  export interface SpinnerProps {
4
4
  label?: string;
@@ -6,6 +6,7 @@ export interface SpinnerProps {
6
6
  /** @internal blocks/ only */
7
7
  className?: string;
8
8
  style?: CSSProperties;
9
+ ref?: Ref<HTMLDivElement>;
9
10
  }
10
- export declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerProps & import("react").RefAttributes<HTMLDivElement>>;
11
+ export declare function Spinner({ label, size, className, style, ref }: SpinnerProps): import("react").JSX.Element;
11
12
  export {};
@@ -1,9 +1,9 @@
1
- import { type ReactNode } from 'react';
1
+ import type { ComponentPropsWithRef, ReactNode } from 'react';
2
2
  import { type RadiusToken } from '../../design-system/component-tokens';
3
3
  import type { ShadowToken } from '../../design-system/shadows';
4
4
  import { type LayoutProps } from './layoutProps';
5
5
  import { type SurfaceBackground, type SurfacePadding } from './Surface';
6
- export interface StackProps extends LayoutProps, Omit<React.HTMLAttributes<HTMLDivElement>, 'className'> {
6
+ export interface StackProps extends LayoutProps, Omit<ComponentPropsWithRef<'div'>, 'className'> {
7
7
  background?: SurfaceBackground;
8
8
  elevation?: ShadowToken;
9
9
  paddingPreset?: SurfacePadding;
@@ -12,4 +12,4 @@ export interface StackProps extends LayoutProps, Omit<React.HTMLAttributes<HTMLD
12
12
  className?: string;
13
13
  children?: ReactNode;
14
14
  }
15
- export declare const Stack: import("react").ForwardRefExoticComponent<StackProps & import("react").RefAttributes<HTMLDivElement>>;
15
+ export declare function Stack(props: StackProps): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { type ElementType } from 'react';
1
+ import type { ElementType, Ref } from 'react';
2
2
  import { type TextLeading, type TextTone } from '../../design-system/component-tokens';
3
3
  type TextVariant = 'default' | 'muted' | 'faint';
4
4
  type TextSize = 'xxs' | 'xs' | 'sm' | 'base' | 'lg';
@@ -20,6 +20,7 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
20
20
  align?: TextAlign;
21
21
  /** @internal blocks/ only */
22
22
  className?: string;
23
+ ref?: Ref<HTMLElement>;
23
24
  }
24
- export declare const Text: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<HTMLElement>>;
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;
25
26
  export {};
@@ -16,5 +16,6 @@ export interface ChatInputProps {
16
16
  taskRunning?: boolean;
17
17
  onStop?: () => void;
18
18
  placeholder?: string;
19
+ ref?: React.Ref<HTMLTextAreaElement>;
19
20
  }
20
- export declare const ChatInput: React.ForwardRefExoticComponent<ChatInputProps & React.RefAttributes<HTMLTextAreaElement>>;
21
+ export declare function ChatInput({ value, onChange, onSubmit, modes, activeMode, onModeChange, disabled, taskRunning, onStop, placeholder, ref, }: ChatInputProps): React.JSX.Element;
@@ -32,13 +32,13 @@ export declare const PaginationSchema: z.ZodObject<{
32
32
  offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
33
33
  }, z.core.$strip>;
34
34
  export declare const booleanQueryParam: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>, z.ZodTransform<boolean | undefined, string | boolean>>>;
35
- export declare const paginatedListOf: <T extends z.ZodTypeAny>(schema: T) => z.ZodObject<{
35
+ export declare const paginatedListOf: <T extends z.ZodType>(schema: T) => z.ZodObject<{
36
36
  items: z.ZodArray<T>;
37
37
  total: z.ZodNumber;
38
38
  limit: z.ZodNumber;
39
39
  offset: z.ZodNumber;
40
40
  }, z.core.$strip>;
41
- export declare const listOf: <T extends z.ZodTypeAny>(schema: T) => z.ZodObject<{
41
+ export declare const listOf: <T extends z.ZodType>(schema: T) => z.ZodObject<{
42
42
  items: z.ZodArray<T>;
43
43
  count: z.ZodNumber;
44
44
  }, z.core.$strip>;
@@ -54,7 +54,7 @@ export declare const ToolCallRecordSchema: z.ZodObject<{
54
54
  params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
55
55
  result: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
56
56
  }, z.core.$strip>;
57
- export declare const SlackWebhookUrlSchema: z.ZodString;
57
+ export declare const SlackWebhookUrlSchema: z.ZodURL;
58
58
  export declare const GraphEdgeSchema: z.ZodObject<{
59
59
  start: z.ZodString;
60
60
  end: z.ZodString;
@@ -64,7 +64,7 @@ export declare const UserEntitySchema: z.ZodObject<{
64
64
  active: "active";
65
65
  suspended: "suspended";
66
66
  }>;
67
- email: z.ZodString;
67
+ email: z.ZodEmail;
68
68
  external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
69
  first_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
70
  last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -7,9 +7,7 @@ export declare class ConfigManager {
7
7
  static getInstance(): ConfigManager;
8
8
  loadConfig(): MarketrixConfig;
9
9
  saveConfig(config: MarketrixConfig): void;
10
- updateConfig(updates: Partial<MarketrixConfig>): void;
11
10
  getConfig(): MarketrixConfig | null;
12
- shouldShowWidget(): boolean;
13
11
  }
14
12
  export declare const configManager: ConfigManager;
15
13
  export declare function createConfigFromSettings(widgetSettings: WidgetSettingsData, baseConfig?: Partial<MarketrixConfig>): MarketrixConfig;
@@ -27,13 +27,8 @@ declare class StorageService {
27
27
  /** window.name takes priority over localStorage — it persists across page navigations. */
28
28
  getChatId(): string | null;
29
29
  setChatId(chatId: string | null): void;
30
- getMessages(): StoredMessage[];
31
- setMessages(messages: StoredMessage[]): void;
32
- getChatState(): Pick<MarketrixChatContext, 'isTaskRunning' | 'activeTaskId' | 'currentMode' | 'isOpen' | 'isMinimized' | 'isLoading'>;
33
- setChatState(state: Partial<Pick<MarketrixChatContext, 'isTaskRunning' | 'activeTaskId' | 'currentMode' | 'isOpen' | 'isMinimized' | 'isLoading'>>): void;
34
30
  getConfig(): MarketrixConfig | null;
35
31
  setConfig(config: MarketrixConfig | null): void;
36
- clear(): void;
37
32
  hasValidContext(): boolean;
38
33
  }
39
34
  export declare const storageService: StorageService;
@@ -17,5 +17,5 @@ export declare const setProgrammaticInitInProgress: (inProgress: boolean) => voi
17
17
  export declare const isProgrammaticInitInProgress: () => boolean;
18
18
  export declare const showWidgetSettingsLoader: (message?: string) => void;
19
19
  export declare const hideWidgetSettingsLoader: () => void;
20
- export declare const autoInitializeWidget: (retryCount?: number) => void;
20
+ export declare const autoInitializeWidget: () => void;
21
21
  export declare const registerAutoInit: (initWidget: (config: MarketrixConfig) => Promise<void>) => void;