@deepfrog/pangents-widget 4.0.0 → 4.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/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.html +2 -2
- package/dist/preview-isolation.html +1 -1
- package/dist/preview-new.html +1 -1
- package/dist/preview-playground.html +2 -2
- package/dist/preview-production.html +2 -2
- package/dist/preview-staging.html +2 -2
- package/dist/preview.html +3 -3
- package/dist/{widget-embed-CmAr6iD-.cjs.js → widget-embed-BJRri_BT.cjs.js} +2 -2
- package/dist/{widget-embed-CmAr6iD-.cjs.js.map → widget-embed-BJRri_BT.cjs.js.map} +1 -1
- package/dist/{widget-embed-DgNAEfZX.es.js → widget-embed-DSdhc3uk.es.js} +2 -4
- package/dist/{widget-embed-DgNAEfZX.es.js.map → widget-embed-DSdhc3uk.es.js.map} +1 -1
- package/dist/widget-embed.cjs.js +1 -1
- package/dist/widget-embed.es.js +1 -1
- package/dist/widget.js +1 -3
- package/package.json +1 -1
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-
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./widget-embed-BJRri_BT.cjs.js"),t=require("react/jsx-runtime"),r=require("react"),n=e=>Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"}));exports.Chatbot=e.Chatbot,exports.Widget=e.Widget,exports.ChatbotWidget=({pangentsApiKey:e,email:i,tenantId:o,theme:a,position:d="bottom-right",margin:s,paddingWidgetContainer:c,zIndex:g=9999,onInit:u,onDestroy:l})=>{const p=r.useRef(null),f=r.useRef(null);return r.useEffect(()=>((async()=>{try{const{default:t}=await Promise.resolve().then(()=>n(require("./widget-embed.cjs.js"))),r={pangentsApiKey:e,email:i,tenantId:o,theme:a,position:d,margin:s,paddingWidgetContainer:c,zIndex:g};p.current=t,t.init(r),u&&u()}catch(t){console.error("Failed to initialize chatbot widget:",t)}})(),()=>{if(p.current)try{p.current.destroy(),l&&l()}catch(e){console.error("Error destroying chatbot widget:",e)}}),[e,i,o,a,d,s,c,g,u,l]),r.useEffect(()=>{if(p.current){const r={pangentsApiKey:e,email:i,tenantId:o,theme:a,position:d,margin:s,paddingWidgetContainer:c,zIndex:g};try{p.current.updateConfig(r)}catch(t){console.error("Error updating chatbot widget config:",t)}}},[e,i,o,a,d,s,c,g]),t.jsx("div",{ref:f,style:{display:"none"}})};
|
|
10
10
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.es.js
CHANGED
package/dist/index.html
CHANGED
|
@@ -577,7 +577,7 @@
|
|
|
577
577
|
production: 'https://app.backend.pangents.ai',
|
|
578
578
|
};
|
|
579
579
|
|
|
580
|
-
const WIDGET_JS = 'https://
|
|
580
|
+
const WIDGET_JS = 'https://unpkg.com/@deepfrog/pangents-widget/dist/widget.js';
|
|
581
581
|
|
|
582
582
|
// ── Expose helpers to global scope (called from onclick) ───────────────
|
|
583
583
|
window.selectEnv = (env) => {
|
|
@@ -735,7 +735,7 @@
|
|
|
735
735
|
const emailLine = email ? `\n email: "${email}",` : '';
|
|
736
736
|
|
|
737
737
|
document.getElementById('codeSnippet').innerHTML =
|
|
738
|
-
`<span class="kw">import</span> Chatbot <span class="kw">from</span> <span class="str">"https://
|
|
738
|
+
`<span class="kw">import</span> Chatbot <span class="kw">from</span> <span class="str">"https://unpkg.com/@deepfrog/pangents-widget/dist/widget.js"</span>;\n\nChatbot.<span class="kw">init</span>({\n <span class="key">pangentsApiKey</span>: <span class="str">"${esc(apiKey)}"</span>,\n <span class="key">tenantId</span>: <span class="str">"${esc(tenantId)}"</span>,${emailLine}\n <span class="key">environment</span>: <span class="str">"${currentEnv}"</span>,\n <span class="key">theme</span>: {\n <span class="key">primaryColor</span>: <span class="str">"${esc(color)}"</span>,\n <span class="key">headerBg</span>: <span class="str">"${esc(color)}"</span>,\n <span class="key">headerText</span>: <span class="str">"#ffffff"</span>,\n <span class="key">bubbleIcon</span>: <span class="str">"${esc(icon)}"</span>,\n },\n <span class="key">position</span>: <span class="str">"${currentPos}"</span>,\n <span class="key">margin</span>: <span class="str">"20px"</span>,\n <span class="key">paddingWidgetContainer</span>: <span class="str">"10px 20px"</span>,\n <span class="key">zIndex</span>: 9999,\n});`;
|
|
739
739
|
}
|
|
740
740
|
|
|
741
741
|
function esc(s) {
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
|
|
81
81
|
<!-- Embed local built widget -->
|
|
82
82
|
<script type="module">
|
|
83
|
-
import Chatbot from "https://
|
|
83
|
+
import Chatbot from "https://unpkg.com/@deepfrog/pangents-widget/dist/widget.js";
|
|
84
84
|
|
|
85
85
|
Chatbot.init({
|
|
86
86
|
pangentsApiKey: "Ph75vjKOsJbDuPyxR8-wW0_GYYm7ytVF0XQid2GXEZQ",
|
package/dist/preview-new.html
CHANGED
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
|
|
240
240
|
<!-- Pangents Widget Embed -->
|
|
241
241
|
<script type="module">
|
|
242
|
-
import Chatbot from 'https://
|
|
242
|
+
import Chatbot from 'https://unpkg.com/@deepfrog/pangents-widget/dist/widget.js';
|
|
243
243
|
|
|
244
244
|
Chatbot.init({
|
|
245
245
|
pangentsApiKey: "Ph75vjKOsJbDuPyxR8-wW0_GYYm7ytVF0XQid2GXEZQ",
|
|
@@ -557,7 +557,7 @@
|
|
|
557
557
|
production: 'https://app.backend.pangents.ai',
|
|
558
558
|
};
|
|
559
559
|
|
|
560
|
-
const WIDGET_JS = 'https://
|
|
560
|
+
const WIDGET_JS = 'https://unpkg.com/@deepfrog/pangents-widget/dist/widget.js';
|
|
561
561
|
|
|
562
562
|
// ── Expose helpers to global scope (called from onclick) ───────────────
|
|
563
563
|
window.selectEnv = (env) => {
|
|
@@ -715,7 +715,7 @@
|
|
|
715
715
|
const emailLine = email ? `\n email: "${email}",` : '';
|
|
716
716
|
|
|
717
717
|
document.getElementById('codeSnippet').innerHTML =
|
|
718
|
-
`<span class="kw">import</span> Chatbot <span class="kw">from</span> <span class="str">"https://
|
|
718
|
+
`<span class="kw">import</span> Chatbot <span class="kw">from</span> <span class="str">"https://unpkg.com/@deepfrog/pangents-widget/dist/widget.js"</span>;\n\nChatbot.<span class="kw">init</span>({\n <span class="key">pangentsApiKey</span>: <span class="str">"${esc(apiKey)}"</span>,\n <span class="key">tenantId</span>: <span class="str">"${esc(tenantId)}"</span>,${emailLine}\n <span class="key">environment</span>: <span class="str">"${currentEnv}"</span>,\n <span class="key">theme</span>: {\n <span class="key">primaryColor</span>: <span class="str">"${esc(color)}"</span>,\n <span class="key">headerBg</span>: <span class="str">"${esc(color)}"</span>,\n <span class="key">headerText</span>: <span class="str">"#ffffff"</span>,\n <span class="key">bubbleIcon</span>: <span class="str">"${esc(icon)}"</span>,\n },\n <span class="key">position</span>: <span class="str">"${currentPos}"</span>,\n <span class="key">margin</span>: <span class="str">"20px"</span>,\n <span class="key">paddingWidgetContainer</span>: <span class="str">"10px 20px"</span>,\n <span class="key">zIndex</span>: 9999,\n});`;
|
|
719
719
|
}
|
|
720
720
|
|
|
721
721
|
function esc(s) {
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
</ol>
|
|
244
244
|
|
|
245
245
|
<pre><code><script type="module">
|
|
246
|
-
import Chatbot from "https://
|
|
246
|
+
import Chatbot from "https://unpkg.com/@deepfrog/pangents-widget/dist/widget.js";
|
|
247
247
|
|
|
248
248
|
Chatbot.init({
|
|
249
249
|
pangentsApiKey: "<api_key>",
|
|
@@ -271,7 +271,7 @@ import Chatbot from "https://chat-widget-gamma-azure.vercel.app/widget.js";
|
|
|
271
271
|
|
|
272
272
|
<!-- CHATBOT -->
|
|
273
273
|
<script type="module">
|
|
274
|
-
import Chatbot from "https://
|
|
274
|
+
import Chatbot from "https://unpkg.com/@deepfrog/pangents-widget/dist/widget.js";
|
|
275
275
|
|
|
276
276
|
Chatbot.init({
|
|
277
277
|
pangentsApiKey: "Ph75vjKOsJbDuPyxR8-wW0_GYYm7ytVF0XQid2GXEZQ",
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
</ol>
|
|
244
244
|
|
|
245
245
|
<pre><code><script type="module">
|
|
246
|
-
import Chatbot from "https://
|
|
246
|
+
import Chatbot from "https://unpkg.com/@deepfrog/pangents-widget/dist/widget.js";
|
|
247
247
|
|
|
248
248
|
Chatbot.init({
|
|
249
249
|
pangentsApiKey: "<api_key>",
|
|
@@ -271,7 +271,7 @@ import Chatbot from "https://chat-widget-gamma-azure.vercel.app/widget.js";
|
|
|
271
271
|
|
|
272
272
|
<!-- CHATBOT -->
|
|
273
273
|
<script type="module">
|
|
274
|
-
import Chatbot from "https://
|
|
274
|
+
import Chatbot from "https://unpkg.com/@deepfrog/pangents-widget/dist/widget.js";
|
|
275
275
|
|
|
276
276
|
Chatbot.init({
|
|
277
277
|
pangentsApiKey: "RFWpcu9pDINvWSBA1EbauIRk9yJWgFNXs73M66cbTJE",
|
package/dist/preview.html
CHANGED
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
</ol>
|
|
198
198
|
|
|
199
199
|
<pre><code><script type="module">
|
|
200
|
-
import Chatbot from "https://
|
|
200
|
+
import Chatbot from "https://unpkg.com/@deepfrog/pangents-widget/dist/widget.js";
|
|
201
201
|
|
|
202
202
|
Chatbot.init({
|
|
203
203
|
pangentsApiKey: "<api_key>",
|
|
@@ -225,7 +225,7 @@ import Chatbot from "https://chat-widget-gamma-azure.vercel.app/widget.js";
|
|
|
225
225
|
|
|
226
226
|
<!-- CHATBOT -->
|
|
227
227
|
<script type="module">
|
|
228
|
-
import Chatbot from "https://
|
|
228
|
+
import Chatbot from "https://unpkg.com/@deepfrog/pangents-widget/dist/widget.js";
|
|
229
229
|
|
|
230
230
|
Chatbot.init({
|
|
231
231
|
pangentsApiKey: "Ph75vjKOsJbDuPyxR8-wW0_GYYm7ytVF0XQid2GXEZQ",
|
|
@@ -238,7 +238,7 @@ import Chatbot from "https://chat-widget-gamma-azure.vercel.app/widget.js";
|
|
|
238
238
|
},
|
|
239
239
|
position: "bottom-right",
|
|
240
240
|
margin: "20px", // Margin for the bubble button
|
|
241
|
-
paddingWidgetContainer: "10px 20px", // Margin for the popup container
|
|
241
|
+
// paddingWidgetContainer: "10px 20px", // Margin for the popup container
|
|
242
242
|
zIndex: 9999,
|
|
243
243
|
});
|
|
244
244
|
</script>
|