@release0/nextjs 0.2.2 → 0.2.4
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/dist-XHSD27EH.js +100 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +12 -18
- package/dist/web-DTA6A66J-AQODIQ47.js +13463 -0
- package/package.json +9 -12
- package/dist/dist-WPLDFLQO.js +0 -56
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@release0/nextjs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"license": "FSL-1.1-ALv2",
|
|
5
5
|
"description": "Relese0 Lib: A convenient library for displaying chat agents on Next.js websites",
|
|
6
6
|
"type": "module",
|
|
@@ -16,21 +16,18 @@
|
|
|
16
16
|
"dev": "tsup --watch",
|
|
17
17
|
"build": "tsup"
|
|
18
18
|
},
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@release0/js": "1.1.7"
|
|
21
|
-
},
|
|
22
19
|
"devDependencies": {
|
|
23
20
|
"@release0/tsconfig": "0.0.1",
|
|
24
|
-
"@types/react": "
|
|
25
|
-
"tsup": "8.
|
|
26
|
-
"react": "
|
|
27
|
-
"@release0/
|
|
28
|
-
"next": "
|
|
21
|
+
"@types/react": "19.2.1",
|
|
22
|
+
"tsup": "8.5.0",
|
|
23
|
+
"@release0/react": "1.0.4",
|
|
24
|
+
"@release0/js": "1.1.10",
|
|
25
|
+
"next": "15.5.7"
|
|
29
26
|
},
|
|
30
27
|
"peerDependencies": {
|
|
31
|
-
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
|
|
32
|
-
"next": "12.x || 13.x || 14.x",
|
|
33
|
-
"@release0/js": "^1.1.
|
|
28
|
+
"react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
29
|
+
"next": "12.x || 13.x || 14.x || 15.x",
|
|
30
|
+
"@release0/js": "^1.1.10 || workspace:*"
|
|
34
31
|
},
|
|
35
32
|
"publishConfig": {
|
|
36
33
|
"access": "public"
|
package/dist/dist-WPLDFLQO.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
// ../react/dist/index.js
|
|
4
|
-
import { useEffect as m, useRef as i } from "react";
|
|
5
|
-
import "@release0/js/web";
|
|
6
|
-
import { jsx as b } from "react/jsx-runtime";
|
|
7
|
-
import { useEffect as c, useRef as d } from "react";
|
|
8
|
-
import "@release0/js/web";
|
|
9
|
-
import { jsx as P } from "react/jsx-runtime";
|
|
10
|
-
import { useCallback as y, useEffect as u, useRef as s } from "react";
|
|
11
|
-
import "@release0/js/web";
|
|
12
|
-
import { jsx as g } from "react/jsx-runtime";
|
|
13
|
-
export * from "@release0/js";
|
|
14
|
-
var f = ({ style: r, className: e, ...t }) => {
|
|
15
|
-
let n = i(null);
|
|
16
|
-
return m(() => {
|
|
17
|
-
if (!n.current || typeof t != "object" || t === null) return;
|
|
18
|
-
let { children: p, ref: o, key: l, ...a } = t;
|
|
19
|
-
Object.assign(n.current, a);
|
|
20
|
-
}, [t]), b("agent-standard", { ref: n, style: r, class: e });
|
|
21
|
-
};
|
|
22
|
-
var E = (r) => {
|
|
23
|
-
let e = d(null);
|
|
24
|
-
return c(() => {
|
|
25
|
-
if (r.theme?.position === "static" && !e.current) return;
|
|
26
|
-
e.current || (e.current = document.createElement("agent-bubble"), document.body.prepend(e.current));
|
|
27
|
-
let { agent: t, ...n } = r;
|
|
28
|
-
Object.assign(e.current, n, { agent: t });
|
|
29
|
-
}, [r]), c(() => () => {
|
|
30
|
-
r.theme?.position !== "static" && (e.current?.remove(), e.current = null);
|
|
31
|
-
}, [r.theme?.position]), r.theme?.position === "static" ? P("agent-bubble", { ref: e, style: { display: "inline-flex" } }) : null;
|
|
32
|
-
};
|
|
33
|
-
var T = (r) => {
|
|
34
|
-
let e = s(null), t = s(null), n = y((o) => {
|
|
35
|
-
let l = document.createElement("agent-popup");
|
|
36
|
-
if (t.current = l, p(t.current, o), !e.current) {
|
|
37
|
-
console.warn("Could not attach popup to container because containerRef.current is null");
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
e.current?.append(t.current);
|
|
41
|
-
}, []);
|
|
42
|
-
u(() => {
|
|
43
|
-
t.current || n(r), p(t.current, r);
|
|
44
|
-
}, [n, r]), u(() => () => {
|
|
45
|
-
t.current?.remove(), t.current = null;
|
|
46
|
-
}, []);
|
|
47
|
-
let p = (o, l) => {
|
|
48
|
-
Object.assign(o, l);
|
|
49
|
-
};
|
|
50
|
-
return g("div", { ref: e });
|
|
51
|
-
};
|
|
52
|
-
export {
|
|
53
|
-
E as Bubble,
|
|
54
|
-
T as Popup,
|
|
55
|
-
f as Standard
|
|
56
|
-
};
|