@marketrix.ai/widget 3.8.476 → 3.8.477
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/blocks/Notifications.d.ts +29 -0
- package/dist/src/components/blocks/WidgetDialog.d.ts +6 -0
- package/dist/src/components/navigation/ShellTabBar.d.ts +2 -6
- package/dist/widget.mjs +67 -57
- package/package.json +1 -1
- package/dist/src/components/blocks/NotificationToast.d.ts +0 -11
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Toast } from '@base-ui/react/toast';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const GREETING_TIMEOUT_MS = 8000;
|
|
4
|
+
export interface NotificationProviderProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/** The closed shadow root to portal into — a portal to document.body would leave the styles behind. */
|
|
7
|
+
container?: HTMLElement | null;
|
|
8
|
+
/** Raised above the launcher when the launcher sits at the bottom, so the two cannot overlap. */
|
|
9
|
+
offsetBottom?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The one notification surface. Base UI owns the live region, the dismiss timers, hover-to-pause and
|
|
13
|
+
* stacking; before this the widget announced nothing to a screen reader and ran its own setTimeout.
|
|
14
|
+
*/
|
|
15
|
+
export declare const NotificationProvider: React.FC<NotificationProviderProps>;
|
|
16
|
+
export declare const useNotifications: typeof Toast.useToastManager;
|
|
17
|
+
export interface WidgetNotificationsProps {
|
|
18
|
+
error?: string;
|
|
19
|
+
onClearError: () => void;
|
|
20
|
+
onRetry?: () => void;
|
|
21
|
+
greeting?: string;
|
|
22
|
+
greetingBody?: string;
|
|
23
|
+
onGreetingDismiss: () => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Drives the toasts from widget state. Both use a stable id, so `add` upserts and a re-render cannot
|
|
27
|
+
* stack duplicates of the same condition.
|
|
28
|
+
*/
|
|
29
|
+
export declare const WidgetNotifications: React.FC<WidgetNotificationsProps>;
|
|
@@ -7,5 +7,11 @@ export interface WidgetDialogProps {
|
|
|
7
7
|
onConfirm?: () => void;
|
|
8
8
|
confirmLabel?: string;
|
|
9
9
|
cancelLabel?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Where focus lands on close. Base UI's default restore is broken here: it descends
|
|
12
|
+
* `element.shadowRoot.activeElement`, which is null for a CLOSED root, so it records the shadow
|
|
13
|
+
* HOST and hands focus to a host-page element on close. Naming the target sidesteps that.
|
|
14
|
+
*/
|
|
15
|
+
finalFocusRef?: React.RefObject<HTMLElement | null>;
|
|
10
16
|
}
|
|
11
17
|
export declare const WidgetDialog: React.FC<WidgetDialogProps>;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
activeView: WidgetView;
|
|
5
|
-
onChange: (view: WidgetView) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const ShellTabBar: React.FC<ShellTabBarProps>;
|
|
2
|
+
/** Selection, roles, ids and arrow-key navigation come from Tabs.Root — see MessengerShell. */
|
|
3
|
+
export declare const ShellTabBar: React.FC;
|