@pagelines/sdk 1.0.733 → 1.0.735
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 +26 -21
- package/dist/AgentWrap.js.map +1 -1
- package/dist/contract.js +249 -211
- package/dist/contract.js.map +1 -1
- package/dist/widget.js +1 -1
- package/package.json +1 -1
package/dist/AgentWrap.js
CHANGED
|
@@ -4534,7 +4534,7 @@ var kr = [
|
|
|
4534
4534
|
}), (e, t) => (T(), _("div", {
|
|
4535
4535
|
ref_key: "viewport",
|
|
4536
4536
|
ref: n,
|
|
4537
|
-
class: S(["overflow-y-auto overflow-x-hidden min-h-0 flex flex-col [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", i.value ? "[overflow-anchor:none]" : ""]),
|
|
4537
|
+
class: S(["overflow-y-auto overscroll-contain overflow-x-hidden min-h-0 flex flex-col [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", i.value ? "[overflow-anchor:none]" : ""]),
|
|
4538
4538
|
onScrollPassive: onScroll,
|
|
4539
4539
|
onWheelPassive: markUserGesture,
|
|
4540
4540
|
onTouchstartPassive: markUserGesture
|
|
@@ -4628,11 +4628,7 @@ var kr = [
|
|
|
4628
4628
|
}, na = {
|
|
4629
4629
|
key: 1,
|
|
4630
4630
|
class: "i-tabler-arrow-up size-[17px]"
|
|
4631
|
-
}, ra = { class: "sr-only" }, ia = {
|
|
4632
|
-
key: 3,
|
|
4633
|
-
"data-test": "messaging-suggested-prompts",
|
|
4634
|
-
class: "mt-5 w-full sm:mx-auto sm:max-w-[720px]"
|
|
4635
|
-
}, aa = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, oa = ["disabled", "onClick"], sa = ["aria-expanded"], ca = /* @__PURE__ */ x({
|
|
4631
|
+
}, ra = { class: "sr-only" }, ia = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, aa = ["disabled", "onClick"], oa = ["aria-expanded"], sa = /* @__PURE__ */ x({
|
|
4636
4632
|
__name: "ElAgentChat",
|
|
4637
4633
|
props: {
|
|
4638
4634
|
chatController: {},
|
|
@@ -4842,7 +4838,7 @@ var kr = [
|
|
|
4842
4838
|
...o ? {} : { year: "numeric" }
|
|
4843
4839
|
})}, ${a}`;
|
|
4844
4840
|
}
|
|
4845
|
-
return (t, s) => (T(), _("div", { class: S(["@container/chat relative flex h-full flex-col", z.value.length === 0 ? "min-h-0 [justify-content:safe_center]
|
|
4841
|
+
return (t, s) => (T(), _("div", { class: S(["@container/chat relative flex h-full flex-col", z.value.length === 0 ? ["min-h-0 overflow-y-auto", r.value ? "justify-start sm:[justify-content:safe_center]" : "[justify-content:safe_center]"] : ""]) }, [
|
|
4846
4842
|
e.showHeader && !K.value ? (T(), _("div", li, [b(Pe, {
|
|
4847
4843
|
agent: e.agent,
|
|
4848
4844
|
"is-online": c.value
|
|
@@ -5090,11 +5086,16 @@ var kr = [
|
|
|
5090
5086
|
], 2)]),
|
|
5091
5087
|
_: 3
|
|
5092
5088
|
}, 8, ["class"]),
|
|
5093
|
-
v("div", {
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5089
|
+
v("div", {
|
|
5090
|
+
"data-test": "messaging-composer-footer",
|
|
5091
|
+
class: S(["left-0 right-0 z-30 px-5 pb-[max(env(safe-area-inset-bottom),1rem)]", [
|
|
5092
|
+
z.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
|
|
5093
|
+
r.value && e.centered ? "max-sm:absolute max-sm:bottom-0" : "",
|
|
5094
|
+
r.value && z.value.length === 0 ? "max-sm:mt-auto" : "",
|
|
5095
|
+
e.centered && z.value.length > 0 ? "pt-0" : "pt-3",
|
|
5096
|
+
K.value ? e.centered ? "bg-theme-25/50" : "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"
|
|
5097
|
+
]])
|
|
5098
|
+
}, [
|
|
5098
5099
|
Oe.value.length > 0 ? (T(), _("div", {
|
|
5099
5100
|
key: 0,
|
|
5100
5101
|
class: S(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e.centered ? "max-w-[720px] mx-auto" : ""])
|
|
@@ -5202,34 +5203,38 @@ var kr = [
|
|
|
5202
5203
|
"data-test": "messaging-ai-disclosure",
|
|
5203
5204
|
class: S(["mt-2.5 text-center text-[12px] text-theme-300", r.value ? "max-sm:hidden" : ""])
|
|
5204
5205
|
}, F(e.agent.displayName.value) + " is AI and can make mistakes. ", 3)) : h("", !0),
|
|
5205
|
-
z.value.length === 0 && e.suggestedPrompts.length > 0 ? (T(), _("div",
|
|
5206
|
+
z.value.length === 0 && e.suggestedPrompts.length > 0 ? (T(), _("div", {
|
|
5207
|
+
key: 3,
|
|
5208
|
+
"data-test": "messaging-suggested-prompts",
|
|
5209
|
+
class: S(["mt-5 w-full sm:mx-auto sm:max-w-[720px]", r.value ? "max-sm:hidden" : ""])
|
|
5210
|
+
}, [v("div", ia, [(T(!0), _(f, null, A(e.suggestedPrompts, (e, t) => (T(), _("button", {
|
|
5206
5211
|
key: e.id,
|
|
5207
5212
|
type: "button",
|
|
5208
5213
|
disabled: we.value,
|
|
5209
5214
|
"data-test": "messaging-suggested-prompt",
|
|
5210
5215
|
class: S(["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]", [we.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !j.value && t >= 3 ? "max-sm:hidden" : ""]]),
|
|
5211
5216
|
onClick: (t) => sendSuggestedPrompt(e)
|
|
5212
|
-
}, F(e.label), 11,
|
|
5217
|
+
}, F(e.label), 11, aa))), 128)), e.suggestedPrompts.length > 3 ? (T(), _("button", {
|
|
5213
5218
|
key: 0,
|
|
5214
5219
|
type: "button",
|
|
5215
5220
|
"data-test": "messaging-suggested-prompts-more",
|
|
5216
5221
|
"aria-expanded": j.value,
|
|
5217
5222
|
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",
|
|
5218
5223
|
onClick: s[19] || (s[19] = (e) => j.value = !j.value)
|
|
5219
|
-
}, [te(F(j.value ? "See less" : "See more") + " ", 1), v("i", { class: S(["i-tabler-chevron-down size-4 transition-transform", j.value ? "rotate-180" : ""]) }, null, 2)], 8,
|
|
5224
|
+
}, [te(F(j.value ? "See less" : "See more") + " ", 1), v("i", { class: S(["i-tabler-chevron-down size-4 transition-transform", j.value ? "rotate-180" : ""]) }, null, 2)], 8, oa)) : h("", !0)])], 2)) : h("", !0)
|
|
5220
5225
|
], 2)
|
|
5221
5226
|
], 2));
|
|
5222
5227
|
}
|
|
5223
|
-
}),
|
|
5228
|
+
}), ca = { class: "agent-wrap" }, la = {
|
|
5224
5229
|
key: 0,
|
|
5225
5230
|
class: "flex items-center justify-center h-full"
|
|
5226
|
-
},
|
|
5231
|
+
}, ua = {
|
|
5227
5232
|
key: 2,
|
|
5228
5233
|
class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
|
|
5229
5234
|
role: "status",
|
|
5230
5235
|
"aria-live": "polite",
|
|
5231
5236
|
"data-test": "agent-unavailable"
|
|
5232
|
-
},
|
|
5237
|
+
}, da = /* @__PURE__ */ x({
|
|
5233
5238
|
__name: "AgentWrap",
|
|
5234
5239
|
props: {
|
|
5235
5240
|
sdk: {},
|
|
@@ -5325,7 +5330,7 @@ var kr = [
|
|
|
5325
5330
|
});
|
|
5326
5331
|
}
|
|
5327
5332
|
}
|
|
5328
|
-
return ie(loadAgent), (t, n) => (T(), _("div",
|
|
5333
|
+
return ie(loadAgent), (t, n) => (T(), _("div", ca, [s.value ? (T(), _("div", la, [v("div", { class: S(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? oe(t.$slots, "default", {
|
|
5329
5334
|
sdk: se(o),
|
|
5330
5335
|
agent: c.value,
|
|
5331
5336
|
context: e.clientContext ?? e.context,
|
|
@@ -5333,7 +5338,7 @@ var kr = [
|
|
|
5333
5338
|
buttonText: e.buttonText,
|
|
5334
5339
|
buttonIcon: e.buttonIcon,
|
|
5335
5340
|
loading: s.value
|
|
5336
|
-
}, void 0, void 0, 1) : u.value ? (T(), _("div",
|
|
5341
|
+
}, void 0, void 0, 1) : u.value ? (T(), _("div", ua, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
|
|
5337
5342
|
type: "button",
|
|
5338
5343
|
class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
|
|
5339
5344
|
"data-test": "agent-unavailable-retry",
|
|
@@ -5342,6 +5347,6 @@ var kr = [
|
|
|
5342
5347
|
}
|
|
5343
5348
|
});
|
|
5344
5349
|
//#endregion
|
|
5345
|
-
export { ke as a, getAgentAvatarUrl as c, AgentChatController as d, ve as f, Pe as i, handleImageError as l, _e as m,
|
|
5350
|
+
export { ke as a, getAgentAvatarUrl as c, AgentChatController as d, ve as f, Pe as i, handleImageError as l, _e as m, sa as n, De as o, n as p, ai as r, Te as s, da as t, parseButtonTemplate as u };
|
|
5346
5351
|
|
|
5347
5352
|
//# sourceMappingURL=AgentWrap.js.map
|