cosmic-ai-genius 0.3.69 → 0.3.70

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.
@@ -36757,6 +36757,13 @@ Please choose files smaller than 6MB.`);
36757
36757
  }, pn = async () => {
36758
36758
  var ht;
36759
36759
  if (!b.trim() || w || z) return;
36760
+ t.onAnalyticsEvent && j.length === 0 && (console.log("Triggering input_submit analytics event for welcome screen input"), t.onAnalyticsEvent("input_submit", {
36761
+ action: "Submit",
36762
+ actionName: "Genius Input Submit",
36763
+ featureName: "Genius",
36764
+ component: "GeniusChatbotDashboard",
36765
+ inputType: "welcome_screen"
36766
+ }));
36760
36767
  const je = b.trim();
36761
36768
  T(je);
36762
36769
  const rt = /* @__PURE__ */ new Date(), He = Date.now(), Be = [];
@@ -39646,6 +39653,13 @@ const VE = () => {
39646
39653
  }
39647
39654
  }, _a = async () => {
39648
39655
  if (!O.trim() || B || k) return;
39656
+ t.onAnalyticsEvent && S.length === 0 && (console.log("Triggering input_submit analytics event for welcome screen input"), t.onAnalyticsEvent("input_submit", {
39657
+ action: "Submit",
39658
+ actionName: "Genius Input Submit",
39659
+ featureName: "Genius",
39660
+ component: "GeniusChatbotMobile",
39661
+ inputType: "welcome_screen"
39662
+ }));
39649
39663
  const je = O.trim();
39650
39664
  L(je);
39651
39665
  const rt = {
@@ -40806,6 +40820,13 @@ const VE = () => {
40806
40820
  }, H = async () => {
40807
40821
  var de, pe;
40808
40822
  if (!k.trim() || D) return;
40823
+ t.onAnalyticsEvent && U.length === 0 && t.onAnalyticsEvent("input_submit", {
40824
+ action: "Submit",
40825
+ actionName: "Genius Input Submit",
40826
+ featureName: "Genius",
40827
+ component: "GeniusChatbot",
40828
+ inputType: "welcome_screen"
40829
+ });
40809
40830
  const ae = {
40810
40831
  id: Date.now().toString(),
40811
40832
  content: k,
@@ -41155,7 +41176,7 @@ const VE = () => {
41155
41176
  const [r, o] = Dt(i), u = () => o(!0), d = () => o(!1), h = () => o(!r), g = () => {
41156
41177
  d(), n.onClose && n.onClose();
41157
41178
  };
41158
- return /* @__PURE__ */ le.jsxs(YE.Provider, { value: { isOpen: r, openChatbot: u, closeChatbot: d, toggleChatbot: h }, children: [
41179
+ return /* @__PURE__ */ le.jsxs(YE.Provider, { value: { isOpen: r, openChatbot: u, closeChatbot: d, toggleChatbot: h, config: n }, children: [
41159
41180
  t,
41160
41181
  r && /* @__PURE__ */ le.jsx(
41161
41182
  $E,
@@ -41193,18 +41214,28 @@ const VE = () => {
41193
41214
  offsetX: n = 20,
41194
41215
  offsetY: i = 20
41195
41216
  }) => {
41196
- const { openChatbot: r, isOpen: o } = gV(), u = {
41217
+ const { openChatbot: r, isOpen: o, config: u } = gV(), d = {
41197
41218
  position: "fixed",
41198
41219
  ...t.includes("bottom") ? { bottom: i } : { top: i },
41199
41220
  ...t.includes("right") ? { right: n } : { left: n }
41200
41221
  };
41201
- return o ? null : /* @__PURE__ */ le.jsx(th, { children: /* @__PURE__ */ le.jsxs(
41222
+ if (o)
41223
+ return null;
41224
+ const h = () => {
41225
+ u != null && u.onAnalyticsEvent && u.onAnalyticsEvent("button_click", {
41226
+ action: "Click",
41227
+ actionName: "Genius Button Click web",
41228
+ featureName: "Genius",
41229
+ component: "GeniusToggle"
41230
+ }), r();
41231
+ };
41232
+ return /* @__PURE__ */ le.jsx(th, { children: /* @__PURE__ */ le.jsxs(
41202
41233
  "button",
41203
41234
  {
41204
41235
  className: Z2["genius-toggle-button"],
41205
- onClick: r,
41236
+ onClick: h,
41206
41237
  "aria-label": "Open Genius chatbot",
41207
- style: u,
41238
+ style: d,
41208
41239
  children: [
41209
41240
  /* @__PURE__ */ le.jsx("span", { className: Z2["genius-toggle-text"], children: "Ask Genius" }),
41210
41241
  /* @__PURE__ */ le.jsx("div", { className: Z2["genius-toggle-logo"], children: /* @__PURE__ */ le.jsx(mV, {}) })