reifyui 0.13.8 → 0.14.0
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/README.md +39 -0
- package/dist/agent-chat.cjs +2046 -0
- package/dist/agent-chat.cjs.map +1 -0
- package/dist/agent-chat.d.ts +190 -0
- package/dist/agent-chat.js +1952 -0
- package/dist/agent-chat.js.map +1 -0
- package/dist/chunk-AGSX5YKH.js +177 -0
- package/dist/chunk-AGSX5YKH.js.map +1 -0
- package/dist/chunk-WAND7AYD.js +124 -0
- package/dist/chunk-WAND7AYD.js.map +1 -0
- package/dist/graph.js +2 -1
- package/dist/graph.js.map +1 -1
- package/dist/index.cjs +29 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +34 -11
- package/dist/index.js.map +1 -1
- package/package.json +11 -2
- package/src/agent-chat/components.jsx +777 -0
- package/src/agent-chat/index.d.ts +190 -0
- package/src/agent-chat/index.js +24 -0
- package/src/agent-chat/marks.js +51 -0
- package/src/agent-chat/time.js +55 -0
- package/src/agent-chat/tools.js +357 -0
- package/src/agent-chat/turn.js +476 -0
- package/src/auth/GoogleButton.jsx +24 -4
- package/styles/agent-chat.css +306 -0
- package/dist/chunk-J7SECRIG.js +0 -295
- package/dist/chunk-J7SECRIG.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -14,8 +14,11 @@ import {
|
|
|
14
14
|
sheetToDelimited
|
|
15
15
|
} from "./chunk-G34T6ZLN.js";
|
|
16
16
|
import {
|
|
17
|
-
Chevron,
|
|
18
17
|
CodeBlock,
|
|
18
|
+
Modal
|
|
19
|
+
} from "./chunk-AGSX5YKH.js";
|
|
20
|
+
import {
|
|
21
|
+
Chevron,
|
|
19
22
|
IcCheck,
|
|
20
23
|
IcDoc,
|
|
21
24
|
IcDownload,
|
|
@@ -35,9 +38,8 @@ import {
|
|
|
35
38
|
IcThink,
|
|
36
39
|
IcTool,
|
|
37
40
|
IcX,
|
|
38
|
-
Modal,
|
|
39
41
|
Svg
|
|
40
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-WAND7AYD.js";
|
|
41
43
|
import {
|
|
42
44
|
useOverlayEscape
|
|
43
45
|
} from "./chunk-J633KV57.js";
|
|
@@ -1917,6 +1919,24 @@ function GoogleButton({ onCredential, onError, divider = true }) {
|
|
|
1917
1919
|
if (!CLIENT_ID || !ref.current) return void 0;
|
|
1918
1920
|
const SRC = "https://accounts.google.com/gsi/client";
|
|
1919
1921
|
let done = false;
|
|
1922
|
+
let drawn = 0;
|
|
1923
|
+
let observer = null;
|
|
1924
|
+
const draw = () => {
|
|
1925
|
+
const g = window.google;
|
|
1926
|
+
if (!g?.accounts?.id || !ref.current) return;
|
|
1927
|
+
const box = ref.current.getBoundingClientRect().width || 320;
|
|
1928
|
+
const width = Math.round(Math.max(200, Math.min(400, box)));
|
|
1929
|
+
if (Math.abs(width - drawn) < 2) return;
|
|
1930
|
+
drawn = width;
|
|
1931
|
+
ref.current.innerHTML = "";
|
|
1932
|
+
g.accounts.id.renderButton(ref.current, {
|
|
1933
|
+
theme: "outline",
|
|
1934
|
+
size: "large",
|
|
1935
|
+
shape: "pill",
|
|
1936
|
+
text: "continue_with",
|
|
1937
|
+
width
|
|
1938
|
+
});
|
|
1939
|
+
};
|
|
1920
1940
|
const render = () => {
|
|
1921
1941
|
if (done) return;
|
|
1922
1942
|
const g = window.google;
|
|
@@ -1930,14 +1950,16 @@ function GoogleButton({ onCredential, onError, divider = true }) {
|
|
|
1930
1950
|
else cb.current.onError?.("Google sign in was cancelled.");
|
|
1931
1951
|
}
|
|
1932
1952
|
});
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1953
|
+
draw();
|
|
1954
|
+
if (typeof ResizeObserver === "function") {
|
|
1955
|
+
observer = new ResizeObserver(() => {
|
|
1956
|
+
try {
|
|
1957
|
+
draw();
|
|
1958
|
+
} catch {
|
|
1959
|
+
}
|
|
1960
|
+
});
|
|
1961
|
+
observer.observe(ref.current);
|
|
1962
|
+
}
|
|
1941
1963
|
} catch {
|
|
1942
1964
|
setFailed(true);
|
|
1943
1965
|
}
|
|
@@ -1961,6 +1983,7 @@ function GoogleButton({ onCredential, onError, divider = true }) {
|
|
|
1961
1983
|
return () => {
|
|
1962
1984
|
s?.removeEventListener("load", render);
|
|
1963
1985
|
window.clearTimeout(check);
|
|
1986
|
+
observer?.disconnect();
|
|
1964
1987
|
};
|
|
1965
1988
|
}, []);
|
|
1966
1989
|
if (!CLIENT_ID || failed) return null;
|