@customerhero/react 2.2.0 → 2.4.0

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/index.d.cts CHANGED
@@ -5,8 +5,17 @@ export { ActionConfirmationBlock, IdentifyPayload } from '@customerhero/js';
5
5
  interface ChatWidgetProps extends CustomerHeroChatConfig {
6
6
  /** Pass customer identity data to link conversations to customer records. */
7
7
  identity?: IdentifyPayload;
8
+ /**
9
+ * Render the launcher and chat panel as `position: absolute` inside the
10
+ * nearest positioned ancestor instead of fixed to the viewport. Useful for
11
+ * inline demos and previews where the widget should not float over the
12
+ * whole page. The host should wrap `<ChatWidget>` in a `position: relative`
13
+ * container of the size you want; offsets become relative to that
14
+ * container.
15
+ */
16
+ embedded?: boolean;
8
17
  }
9
- declare function ChatWidget({ identity, ...config }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
18
+ declare function ChatWidget({ identity, embedded, ...config }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
10
19
 
11
20
  interface ActionConfirmationCardProps {
12
21
  block: ActionConfirmationBlock;
package/dist/index.d.ts CHANGED
@@ -5,8 +5,17 @@ export { ActionConfirmationBlock, IdentifyPayload } from '@customerhero/js';
5
5
  interface ChatWidgetProps extends CustomerHeroChatConfig {
6
6
  /** Pass customer identity data to link conversations to customer records. */
7
7
  identity?: IdentifyPayload;
8
+ /**
9
+ * Render the launcher and chat panel as `position: absolute` inside the
10
+ * nearest positioned ancestor instead of fixed to the viewport. Useful for
11
+ * inline demos and previews where the widget should not float over the
12
+ * whole page. The host should wrap `<ChatWidget>` in a `position: relative`
13
+ * container of the size you want; offsets become relative to that
14
+ * container.
15
+ */
16
+ embedded?: boolean;
8
17
  }
9
- declare function ChatWidget({ identity, ...config }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
18
+ declare function ChatWidget({ identity, embedded, ...config }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
10
19
 
11
20
  interface ActionConfirmationCardProps {
12
21
  block: ActionConfirmationBlock;