@pagelines/sdk 1.0.795 → 1.0.796

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/AgentWrap.js CHANGED
@@ -4844,9 +4844,13 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
4844
4844
  class: "i-tabler-arrow-up size-[17px]"
4845
4845
  }, ga = { class: "sr-only" }, _a = {
4846
4846
  key: 3,
4847
+ "data-test": "messaging-ai-notice",
4848
+ class: "mx-auto max-w-[720px] pt-2 text-center text-[11.5px] leading-none text-theme-300"
4849
+ }, va = {
4850
+ key: 4,
4847
4851
  "data-test": "messaging-suggested-prompts",
4848
4852
  class: "mt-3 w-full sm:mx-auto sm:mt-5 sm:max-w-[720px]"
4849
- }, va = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, ya = ["disabled", "onClick"], ba = ["aria-expanded"], xa = /* @__PURE__ */ S({
4853
+ }, ya = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, ba = ["disabled", "onClick"], xa = ["aria-expanded"], Sa = /* @__PURE__ */ S({
4850
4854
  __name: "ElAgentChat",
4851
4855
  props: {
4852
4856
  chatController: {},
@@ -5361,7 +5365,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5361
5365
  "data-test": "messaging-composer-footer",
5362
5366
  class: T(["left-0 right-0 z-30 px-5 pb-[max(env(safe-area-inset-bottom),1rem)]", [
5363
5367
  B.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
5364
- e.centered && B.value.length > 0 ? "pt-0" : "pt-3",
5368
+ e.centered && B.value.length > 0 ? "pt-0 sm:pb-7" : "pt-3",
5365
5369
  K.value ? e.centered ? "bg-theme-0" : "bg-gradient-to-t from-theme-0/90 via-theme-0/55 to-transparent" : "bg-gradient-to-t from-black/90 via-black/60 to-transparent"
5366
5370
  ]])
5367
5371
  }, [
@@ -5400,7 +5404,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5400
5404
  v("div", {
5401
5405
  "data-test": "messaging-composer",
5402
5406
  "data-composer-action": Me.value,
5403
- class: T(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? "max-w-[720px] mx-auto" : "", K.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-200 hover:ring-theme-300 focus-within:ring-theme-300" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25 focus-within:bg-white/15 focus-within:ring-white/25"]]),
5407
+ class: T(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? B.value.length === 0 ? "max-w-[680px] mx-auto" : "max-w-[720px] mx-auto" : "", K.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-200 hover:ring-theme-300 focus-within:ring-theme-300" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25 focus-within:bg-white/15 focus-within:ring-white/25"]]),
5404
5408
  onClick: focusComposer
5405
5409
  }, [Be.value ? (j(), _("div", {
5406
5410
  key: 1,
@@ -5517,34 +5521,35 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5517
5521
  onClick: o[20] || (o[20] = (e) => handleComposerAction())
5518
5522
  }, [Me.value === "stop" ? (j(), _("i", ma)) : (j(), _("i", ha)), v("span", ga, I(Le.value), 1)], 10, pa)], 64))])
5519
5523
  ])], 10, ea),
5520
- !We.value && B.value.length === 0 && e.suggestedPrompts.length > 0 ? (j(), _("div", _a, [v("div", va, [(j(!0), _(f, null, P(e.suggestedPrompts, (e, t) => (j(), _("button", {
5524
+ e.centered && B.value.length > 0 ? (j(), _("p", _a, I(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : h("", !0),
5525
+ !We.value && B.value.length === 0 && e.suggestedPrompts.length > 0 ? (j(), _("div", va, [v("div", ya, [(j(!0), _(f, null, P(e.suggestedPrompts, (e, t) => (j(), _("button", {
5521
5526
  key: e.id,
5522
5527
  type: "button",
5523
5528
  disabled: Se.value,
5524
5529
  "data-test": "messaging-suggested-prompt",
5525
5530
  class: T(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", [Se.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !A.value && t >= 3 ? "max-sm:hidden" : ""]]),
5526
5531
  onClick: (t) => sendSuggestedPrompt(e)
5527
- }, I(e.label), 11, ya))), 128)), e.suggestedPrompts.length > 3 ? (j(), _("button", {
5532
+ }, I(e.label), 11, ba))), 128)), e.suggestedPrompts.length > 3 ? (j(), _("button", {
5528
5533
  key: 0,
5529
5534
  type: "button",
5530
5535
  "data-test": "messaging-suggested-prompts-more",
5531
5536
  "aria-expanded": A.value,
5532
5537
  class: "flex w-full cursor-pointer items-center justify-center gap-1.5 rounded-2xl px-4 py-3 text-[14px] font-medium text-theme-600 ring-1 ring-theme-200 transition-colors hover:bg-theme-50 hover:text-theme-900 sm:hidden",
5533
5538
  onClick: o[21] || (o[21] = (e) => A.value = !A.value)
5534
- }, [b(I(A.value ? "See less" : "See more") + " ", 1), v("i", { class: T(["i-tabler-chevron-down size-4 transition-transform", A.value ? "rotate-180" : ""]) }, null, 2)], 8, ba)) : h("", !0)])])) : h("", !0)
5539
+ }, [b(I(A.value ? "See less" : "See more") + " ", 1), v("i", { class: T(["i-tabler-chevron-down size-4 transition-transform", A.value ? "rotate-180" : ""]) }, null, 2)], 8, xa)) : h("", !0)])])) : h("", !0)
5535
5540
  ], 2)
5536
5541
  ], 2));
5537
5542
  }
5538
- }), Sa = { class: "agent-wrap" }, Ca = {
5543
+ }), Ca = { class: "agent-wrap" }, wa = {
5539
5544
  key: 0,
5540
5545
  class: "flex items-center justify-center h-full"
5541
- }, wa = {
5546
+ }, Ta = {
5542
5547
  key: 2,
5543
5548
  class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
5544
5549
  role: "status",
5545
5550
  "aria-live": "polite",
5546
5551
  "data-test": "agent-unavailable"
5547
- }, Ta = /* @__PURE__ */ S({
5552
+ }, Ea = /* @__PURE__ */ S({
5548
5553
  __name: "AgentWrap",
5549
5554
  props: {
5550
5555
  sdk: {},
@@ -5640,7 +5645,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5640
5645
  });
5641
5646
  }
5642
5647
  }
5643
- return te(loadAgent), (t, n) => (j(), _("div", Sa, [s.value ? (j(), _("div", Ca, [v("div", { class: T(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? re(t.$slots, "default", {
5648
+ return te(loadAgent), (t, n) => (j(), _("div", Ca, [s.value ? (j(), _("div", wa, [v("div", { class: T(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? re(t.$slots, "default", {
5644
5649
  sdk: ae(o),
5645
5650
  agent: c.value,
5646
5651
  context: e.clientContext ?? e.context,
@@ -5648,7 +5653,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5648
5653
  buttonText: e.buttonText,
5649
5654
  buttonIcon: e.buttonIcon,
5650
5655
  loading: s.value
5651
- }, void 0, void 0, 1) : u.value ? (j(), _("div", wa, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
5656
+ }, void 0, void 0, 1) : u.value ? (j(), _("div", Ta, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
5652
5657
  type: "button",
5653
5658
  class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
5654
5659
  "data-test": "agent-unavailable-retry",
@@ -5657,6 +5662,6 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
5657
5662
  }
5658
5663
  });
5659
5664
  //#endregion
5660
- export { Pe as a, we as c, parseButtonTemplate as d, AgentChatController as f, pe as h, ai as i, getAgentAvatarUrl as l, n as m, xa as n, Oe as o, he as p, yi as r, Ee as s, Ta as t, handleImageError as u };
5665
+ export { Pe as a, we as c, parseButtonTemplate as d, AgentChatController as f, pe as h, ai as i, getAgentAvatarUrl as l, n as m, Sa as n, Oe as o, he as p, yi as r, Ee as s, Ea as t, handleImageError as u };
5661
5666
 
5662
5667
  //# sourceMappingURL=AgentWrap.js.map