@streamoid/agent 0.11.1 → 0.11.2
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.js +29 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -64124,6 +64124,34 @@ const cx$1 = (...e) => e.filter(Boolean).join(" ");
|
|
|
64124
64124
|
function ChatBubble({ role: e, children: t }) {
|
|
64125
64125
|
return /* @__PURE__ */ jsx("div", { className: cx$1("w-full flex", e === "user" ? "justify-end" : "justify-start"), children: /* @__PURE__ */ jsx("div", { className: "w-full", children: t }) });
|
|
64126
64126
|
}
|
|
64127
|
+
function DownloadLink({ download: e }) {
|
|
64128
|
+
const [t, n] = useState(() => Date.now() >= Date.parse(e.expires_at));
|
|
64129
|
+
if (t) return /* @__PURE__ */ jsxs("p", { role: "status", children: [
|
|
64130
|
+
e.filename,
|
|
64131
|
+
": the link has expired, ask again"
|
|
64132
|
+
] });
|
|
64133
|
+
const s = (o) => {
|
|
64134
|
+
Date.now() >= Date.parse(e.expires_at) && (o.preventDefault(), n(!0));
|
|
64135
|
+
};
|
|
64136
|
+
return /* @__PURE__ */ jsx(
|
|
64137
|
+
"a",
|
|
64138
|
+
{
|
|
64139
|
+
href: e.url,
|
|
64140
|
+
download: e.filename,
|
|
64141
|
+
target: "_blank",
|
|
64142
|
+
rel: "noopener noreferrer",
|
|
64143
|
+
referrerPolicy: "no-referrer",
|
|
64144
|
+
className: "underline text-[var(--alias-text---icons-primary)]",
|
|
64145
|
+
onClick: s,
|
|
64146
|
+
onAuxClick: s,
|
|
64147
|
+
onContextMenu: s,
|
|
64148
|
+
children: e.filename
|
|
64149
|
+
}
|
|
64150
|
+
);
|
|
64151
|
+
}
|
|
64152
|
+
function TactixDownloads({ downloads: e }) {
|
|
64153
|
+
return e.length ? /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", "data-testid": "tactix-downloads", children: e.map((t) => /* @__PURE__ */ jsx(DownloadLink, { download: t }, t.url)) }) : null;
|
|
64154
|
+
}
|
|
64127
64155
|
function ok$1() {
|
|
64128
64156
|
}
|
|
64129
64157
|
function unreachable() {
|
|
@@ -75128,6 +75156,7 @@ function MessageBlocksImpl({
|
|
|
75128
75156
|
]
|
|
75129
75157
|
}
|
|
75130
75158
|
),
|
|
75159
|
+
/* @__PURE__ */ jsx(TactixDownloads, { downloads: e.additional_kwargs?.tactix_downloads ?? [] }),
|
|
75131
75160
|
$e,
|
|
75132
75161
|
!$e && /* @__PURE__ */ jsx(
|
|
75133
75162
|
MediaGrid,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamoid/agent",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "Native (no-iframe) embeddable Streamoid agent chat panel. Host renders <AgentPanel adapters={\u2026}/>. Prebuilt bundle \u2014 source + build live in the stream-agent repo.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|