@deepfrog/pangents-widget 2.1.6 → 2.2.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/Widget.d.ts CHANGED
@@ -6,6 +6,7 @@ interface WidgetProps extends Partial<WidgetConfig> {
6
6
  pangentsApiKey?: string;
7
7
  tenantId?: string;
8
8
  email?: string;
9
+ zIndex?: number;
9
10
  }
10
- export declare function Widget({ theme, className, position, margin, pangentsApiKey, tenantId, email }: WidgetProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function Widget({ theme, className, position, margin, pangentsApiKey, tenantId, email, zIndex }: WidgetProps): import("react/jsx-runtime").JSX.Element;
11
12
  export default Widget;
@@ -1,6 +1,7 @@
1
1
  interface WidgetBubbleProps {
2
2
  position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
3
3
  margin?: string;
4
+ zIndex?: number;
4
5
  }
5
- export declare function WidgetBubble({ position, margin }: WidgetBubbleProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function WidgetBubble({ position, margin, zIndex }: WidgetBubbleProps): import("react/jsx-runtime").JSX.Element;
6
7
  export {};
@@ -1,5 +1,6 @@
1
1
  interface WidgetPopupProps {
2
2
  position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
3
+ zIndex?: number;
3
4
  }
4
- export declare function WidgetPopup({ position }: WidgetPopupProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function WidgetPopup({ position, zIndex }: WidgetPopupProps): import("react/jsx-runtime").JSX.Element;
5
6
  export {};
package/dist/index.cjs.js CHANGED
@@ -6,5 +6,5 @@
6
6
  }
7
7
  } catch (error) {}
8
8
  })();
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./widget-embed-9DdEqVMP.cjs.js"),t=require("react/jsx-runtime"),n=require("react"),o=e=>Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"}));if("undefined"!=typeof window)try{const e=window.__PANGENTS_WIDGET_CSS;if(e&&!document.getElementById("pangents-widget-styles")){const t=document.createElement("style");t.id="pangents-widget-styles",t.textContent=e,document.head.appendChild(t)}}catch{}exports.Chatbot=e.Chatbot,exports.Widget=e.Widget,exports.ChatbotWidget=({pangentsApiKey:e,email:r,tenantId:i,theme:s,position:d="bottom-right",zIndex:c=9999,onInit:a,onDestroy:l})=>{const u=n.useRef(null),g=n.useRef(null);return n.useEffect(()=>((async()=>{try{const{default:t}=await Promise.resolve().then(()=>o(require("./widget-embed.cjs.js"))),n={pangentsApiKey:e,email:r,tenantId:i,theme:s,position:d,zIndex:c};u.current=t,t.init(n),a&&a()}catch(t){console.error("Failed to initialize chatbot widget:",t)}})(),()=>{if(u.current)try{u.current.destroy(),l&&l()}catch(e){console.error("Error destroying chatbot widget:",e)}}),[e,r,i,s,d,c,a,l]),n.useEffect(()=>{if(u.current){const n={pangentsApiKey:e,email:r,tenantId:i,theme:s,position:d,zIndex:c};try{u.current.updateConfig(n)}catch(t){console.error("Error updating chatbot widget config:",t)}}},[e,r,i,s,d,c]),t.jsx("div",{ref:g,style:{display:"none"}})};
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./widget-embed-BPoilyw_.cjs.js"),t=require("react/jsx-runtime"),n=require("react"),o=e=>Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"}));if("undefined"!=typeof window)try{const e=window.__PANGENTS_WIDGET_CSS;if(e&&!document.getElementById("pangents-widget-styles")){const t=document.createElement("style");t.id="pangents-widget-styles",t.textContent=e,document.head.appendChild(t)}}catch{}exports.Chatbot=e.Chatbot,exports.Widget=e.Widget,exports.ChatbotWidget=({pangentsApiKey:e,email:r,tenantId:i,theme:s,position:d="bottom-right",zIndex:c=9999,onInit:a,onDestroy:l})=>{const u=n.useRef(null),g=n.useRef(null);return n.useEffect(()=>((async()=>{try{const{default:t}=await Promise.resolve().then(()=>o(require("./widget-embed.cjs.js"))),n={pangentsApiKey:e,email:r,tenantId:i,theme:s,position:d,zIndex:c};u.current=t,t.init(n),a&&a()}catch(t){console.error("Failed to initialize chatbot widget:",t)}})(),()=>{if(u.current)try{u.current.destroy(),l&&l()}catch(e){console.error("Error destroying chatbot widget:",e)}}),[e,r,i,s,d,c,a,l]),n.useEffect(()=>{if(u.current){const n={pangentsApiKey:e,email:r,tenantId:i,theme:s,position:d,zIndex:c};try{u.current.updateConfig(n)}catch(t){console.error("Error updating chatbot widget config:",t)}}},[e,r,i,s,d,c]),t.jsx("div",{ref:g,style:{display:"none"}})};
10
10
  //# sourceMappingURL=index.cjs.js.map
package/dist/index.es.js CHANGED
@@ -6,7 +6,7 @@
6
6
  }
7
7
  } catch (error) {}
8
8
  })();
9
- import { C, W } from "./widget-embed-LzSoeVtX.es.js";
9
+ import { C, W } from "./widget-embed-CtD27t5y.es.js";
10
10
  import { jsx } from "react/jsx-runtime";
11
11
  import { useRef, useEffect } from "react";
12
12
  const ChatbotWidget = ({
@@ -26,6 +26,7 @@ export interface WidgetConfig {
26
26
  pangentsApiKey: string;
27
27
  tenantId?: string;
28
28
  theme?: WidgetTheme;
29
+ zIndex?: number;
29
30
  }
30
31
  export interface ChatState {
31
32
  isOpen: boolean;