@telnyx/ai-chat-widget 5.0.1 → 5.0.3

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.ts CHANGED
@@ -5,8 +5,8 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
5
5
 
6
6
  declare type BaseProps = {
7
7
  /**
8
- * The base URL for AIDA (Heavy thinking mode).
9
- * Optional — if omitted, defaults to the internal AIDA endpoint.
8
+ * The base URL for TAIA (Heavy thinking mode).
9
+ * Optional — if omitted, defaults to the internal TAIA endpoint.
10
10
  */
11
11
  chatAPIUrl?: string;
12
12
  /**
package/dist/index.mjs CHANGED
@@ -5803,7 +5803,7 @@ function rR() {
5803
5803
  }), [e, t];
5804
5804
  }
5805
5805
  const lt = {
5806
- // AIDA API URL (Heavy thinking mode)
5806
+ // TAIA API URL (Heavy thinking mode)
5807
5807
  CHAT_API_URL: "https://api.telnyx.com/v2/support_agent/support/portal",
5808
5808
  FEEDBACK_API_URL: "https://api.telnyx.com/v2/support_agent/support/portal",
5809
5809
  WIDGET_WIDTH: 360,
@@ -5918,15 +5918,15 @@ const uR = [
5918
5918
  ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
5919
5919
  ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
5920
5920
  ], dR = cR("brain", uR);
5921
- var qr = /* @__PURE__ */ ((e) => (e.AIDA = "aida", e))(qr || {});
5921
+ var qr = /* @__PURE__ */ ((e) => (e.TAIA = "taia", e))(qr || {});
5922
5922
  const ME = {
5923
- [qr.AIDA]: {
5923
+ [qr.TAIA]: {
5924
5924
  label: "Heavy thinking",
5925
5925
  icon: "🧠",
5926
5926
  /** Rendered in the mode toggle. */
5927
5927
  Icon: dR,
5928
5928
  ariaLabel: "Heavy thinking mode",
5929
- endpoint: qr.AIDA,
5929
+ endpoint: qr.TAIA,
5930
5930
  tooltip: {
5931
5931
  title: "🧠 Heavy thinking",
5932
5932
  capabilities: ["Troubleshooting tools", "Deep reasoning"],
@@ -9454,14 +9454,14 @@ const AI = {
9454
9454
  }, RI = (e, t) => ({
9455
9455
  user: AI,
9456
9456
  chatAPIUrl: lt.CHAT_API_URL,
9457
- hasAIDAConfig: !1,
9457
+ hasTAIAConfig: !1,
9458
9458
  feedbackAPIUrl: lt.FEEDBACK_API_URL,
9459
9459
  apiService: new Tr(
9460
9460
  lt.CHAT_API_URL,
9461
9461
  lt.FEEDBACK_API_URL,
9462
9462
  () => t().user
9463
9463
  ),
9464
- endpoint: qr.AIDA,
9464
+ endpoint: qr.TAIA,
9465
9465
  numRetries: 0,
9466
9466
  retryTimeoutId: null,
9467
9467
  sessionId: Zm(),
@@ -9480,7 +9480,7 @@ const AI = {
9480
9480
  );
9481
9481
  }),
9482
9482
  setChatAPIUrl: (n, r = !0) => e((a) => {
9483
- a.chatAPIUrl = n, a.hasAIDAConfig = r, a.apiService = new Tr(
9483
+ a.chatAPIUrl = n, a.hasTAIAConfig = r, a.apiService = new Tr(
9484
9484
  n,
9485
9485
  a.feedbackAPIUrl,
9486
9486
  () => t().user
@@ -9851,6 +9851,17 @@ const AI = {
9851
9851
  .visible {
9852
9852
  visibility: visible;
9853
9853
  }
9854
+ .sr-only {
9855
+ position: absolute;
9856
+ width: 1px;
9857
+ height: 1px;
9858
+ padding: 0;
9859
+ margin: -1px;
9860
+ overflow: hidden;
9861
+ clip-path: inset(50%);
9862
+ white-space: nowrap;
9863
+ border-width: 0;
9864
+ }
9854
9865
  .absolute {
9855
9866
  position: absolute;
9856
9867
  }
@@ -10214,6 +10225,10 @@ const AI = {
10214
10225
  --tw-translate-x: calc(calc(1/2 * 100%) * -1);
10215
10226
  translate: var(--tw-translate-x) var(--tw-translate-y);
10216
10227
  }
10228
+ .-translate-x-full {
10229
+ --tw-translate-x: -100%;
10230
+ translate: var(--tw-translate-x) var(--tw-translate-y);
10231
+ }
10217
10232
  .-translate-y-0\\.5 {
10218
10233
  --tw-translate-y: calc(var(--spacing) * -0.5);
10219
10234
  translate: var(--tw-translate-x) var(--tw-translate-y);
@@ -10251,6 +10266,9 @@ const AI = {
10251
10266
  .animate-shadow-grow {
10252
10267
  animation: var(--animate-shadow-grow);
10253
10268
  }
10269
+ .animate-shimmer {
10270
+ animation: var(--animate-shimmer);
10271
+ }
10254
10272
  .animate-spin {
10255
10273
  animation: var(--animate-spin);
10256
10274
  }
@@ -10380,6 +10398,9 @@ const AI = {
10380
10398
  .rounded-2xl {
10381
10399
  border-radius: var(--radius-2xl);
10382
10400
  }
10401
+ .rounded-\\[7px\\] {
10402
+ border-radius: 7px;
10403
+ }
10383
10404
  .rounded-\\[30px\\] {
10384
10405
  border-radius: 30px;
10385
10406
  }
@@ -10480,9 +10501,6 @@ const AI = {
10480
10501
  .border-widget-text-primary {
10481
10502
  border-color: var(--color-widget-text-primary);
10482
10503
  }
10483
- .bg-\\[\\#fefef8\\] {
10484
- background-color: #fefef8;
10485
- }
10486
10504
  .bg-black {
10487
10505
  background-color: var(--color-black);
10488
10506
  }
@@ -10609,6 +10627,14 @@ const AI = {
10609
10627
  --tw-gradient-from: transparent;
10610
10628
  --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
10611
10629
  }
10630
+ .via-neutral-600\\/30 {
10631
+ --tw-gradient-via: color-mix(in srgb, oklch(43.9% 0 0) 30%, transparent);
10632
+ @supports (color: color-mix(in lab, red, red)) {
10633
+ --tw-gradient-via: color-mix(in oklab, var(--color-neutral-600) 30%, transparent);
10634
+ }
10635
+ --tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
10636
+ --tw-gradient-stops: var(--tw-gradient-via-stops);
10637
+ }
10612
10638
  .via-telnyx-green {
10613
10639
  --tw-gradient-via: var(--color-telnyx-green);
10614
10640
  --tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
@@ -10652,6 +10678,9 @@ const AI = {
10652
10678
  .p-6 {
10653
10679
  padding: calc(var(--spacing) * 6);
10654
10680
  }
10681
+ .p-px {
10682
+ padding: 1px;
10683
+ }
10655
10684
  .px-1 {
10656
10685
  padding-inline: calc(var(--spacing) * 1);
10657
10686
  }
@@ -10917,6 +10946,10 @@ const AI = {
10917
10946
  --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
10918
10947
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
10919
10948
  }
10949
+ .ring {
10950
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
10951
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
10952
+ }
10920
10953
  .ring-0 {
10921
10954
  --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
10922
10955
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
@@ -11588,6 +11621,11 @@ const AI = {
11588
11621
  color: var(--color-white);
11589
11622
  }
11590
11623
  }
11624
+ .motion-reduce\\:animate-none {
11625
+ @media (prefers-reduced-motion: reduce) {
11626
+ animation: none;
11627
+ }
11628
+ }
11591
11629
  .motion-reduce\\:transition-none {
11592
11630
  @media (prefers-reduced-motion: reduce) {
11593
11631
  transition-property: none;
@@ -15166,17 +15204,19 @@ const Ql = (e) => /* @__PURE__ */ y.jsxs(
15166
15204
  /* @__PURE__ */ y.jsx(y_, { className: "text-black px-1 pt-1", children: "AI Assistant" })
15167
15205
  ] })
15168
15206
  ] }), w_ = () => /* @__PURE__ */ y.jsxs("span", { className: "text-white text-sm", children: [
15169
- "Read more",
15170
- /* @__PURE__ */ y.jsx(S_, { text: "here" }),
15207
+ /* @__PURE__ */ y.jsx(S_, { text: "Read more about the AI assistant" }),
15171
15208
  "."
15172
- ] }), S_ = ({ text: e }) => /* @__PURE__ */ y.jsx(
15209
+ ] }), S_ = ({ text: e }) => /* @__PURE__ */ y.jsxs(
15173
15210
  "a",
15174
15211
  {
15175
- className: "inline underline text-telnyx-light-green hover:text-white ml-1",
15212
+ className: "inline underline text-telnyx-light-green hover:text-white",
15176
15213
  target: "_blank",
15177
15214
  rel: "noopener noreferrer",
15178
15215
  href: "https://support.telnyx.com/en/articles/8020222-mission-control-portal-ai-chat-support",
15179
- children: e
15216
+ children: [
15217
+ e,
15218
+ /* @__PURE__ */ y.jsx("span", { className: "sr-only", children: " (opens in a new tab)" })
15219
+ ]
15180
15220
  }
15181
15221
  );
15182
15222
  function v_() {
@@ -16914,14 +16954,23 @@ const On = ({
16914
16954
  /* @__PURE__ */ y.jsx(On, { isLoaded: e }),
16915
16955
  /* @__PURE__ */ y.jsxs("div", { className: "flex gap-1 items-center", children: [
16916
16956
  /* @__PURE__ */ y.jsx(On, { className: "duration-100 flex-1", isLoaded: e }),
16917
- /* @__PURE__ */ y.jsx("div", { className: "bg-[#fefef8] px-3 z-10", children: /* @__PURE__ */ y.jsx(
16918
- _O,
16919
- {
16920
- words: t,
16921
- className: "text-gray-700/60 font-medium"
16922
- },
16923
- t
16924
- ) }),
16957
+ /* @__PURE__ */ y.jsxs("div", { className: "relative z-10 overflow-hidden rounded-lg bg-neutral-700/20 p-px", children: [
16958
+ !e && /* @__PURE__ */ y.jsx(
16959
+ "div",
16960
+ {
16961
+ "aria-hidden": "true",
16962
+ className: "pointer-events-none absolute inset-0 -translate-x-full animate-shimmer bg-gradient-to-r from-transparent via-neutral-600/30 to-transparent motion-reduce:animate-none"
16963
+ }
16964
+ ),
16965
+ /* @__PURE__ */ y.jsx("div", { className: "relative rounded-[7px] bg-widget-bg-tertiary px-3 py-1", children: /* @__PURE__ */ y.jsx(
16966
+ _O,
16967
+ {
16968
+ words: t,
16969
+ className: "text-gray-700/60 font-medium"
16970
+ },
16971
+ t
16972
+ ) })
16973
+ ] }),
16925
16974
  /* @__PURE__ */ y.jsx(On, { className: "duration-100 flex-1", isLoaded: e })
16926
16975
  ] }),
16927
16976
  /* @__PURE__ */ y.jsx(On, { isLoaded: e }),
@@ -48023,7 +48072,7 @@ const ZP = ie.create(jI), QP = ie.create(VI), Av = ({
48023
48072
  d === "error" && /* @__PURE__ */ y.jsx(gB, { onClick: r })
48024
48073
  ] });
48025
48074
  if (n === "loading")
48026
- return s === qr.AIDA ? /* @__PURE__ */ y.jsx(
48075
+ return s === qr.TAIA ? /* @__PURE__ */ y.jsx(
48027
48076
  OO,
48028
48077
  {
48029
48078
  isLoaded: !1,