uikit/dist/remote-ui-bi-image.js
Mohamadzadeh 96a434129a
All checks were successful
Build and Deploy Next.js + Nginx Docker Image / build-and-deploy (push) Successful in 1m1s
Build and Deploy Next.js + Nginx Docker Image / deploy (push) Successful in 7s
uikit-v1.3.0-vite-swr-biimage
2026-10-27 13:55:26 +03:30

35 lines
989 B
JavaScript

import l, { useRef as u, useEffect as a } from "react";
import { D as m } from "./chunks/constants-D4iRT7Vp.js";
let n;
function f() {
return n || (n = import(
/* webpackIgnore: true */
/* @vite-ignore */
m.BiImage
).catch((r) => {
throw n = void 0, r;
})), n;
}
function d(r) {
const o = u(null), t = u(null), c = u(r);
return c.current = r, a(() => {
let i = !0;
return f().then(() => {
if (!i || !o.current) return;
const e = document.createElement("uikit-bi-image");
e.componentProps = c.current, o.current.appendChild(e), t.current = e;
}).catch((e) => {
console.error("[uikit/remote/ui] Failed to load BiImage:", e);
}), () => {
var e;
i = !1, (e = t.current) == null || e.remove(), t.current = null;
};
}, []), a(() => {
t.current && (t.current.componentProps = c.current);
}), l.createElement("span", { ref: o, style: { display: "contents" } });
}
export {
d as BiImage,
d as default
};