@optiaxiom/proteus 0.1.1 → 0.1.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.
|
@@ -96,7 +96,7 @@ function ProteusDocumentShell({
|
|
|
96
96
|
pb: "0",
|
|
97
97
|
pt: element.appName ? "16" : "0",
|
|
98
98
|
children: [
|
|
99
|
-
/* @__PURE__ */ jsxs(Group, { flexDirection: "column", gap: "4", children: [
|
|
99
|
+
element.title && /* @__PURE__ */ jsxs(Group, { flexDirection: "column", gap: "4", children: [
|
|
100
100
|
/* @__PURE__ */ jsx(Heading, { fontSize: "lg", fontWeight: "600", level: "2", lineClamp: "2", children: element.title }),
|
|
101
101
|
!!element.subtitle && /* @__PURE__ */ jsx(Text, { color: "fg.secondary", fontSize: "sm", children: element.subtitle })
|
|
102
102
|
] }),
|
|
@@ -26,38 +26,57 @@ function ProteusImage(props) {
|
|
|
26
26
|
}
|
|
27
27
|
),
|
|
28
28
|
/* @__PURE__ */ jsxs(Dialog, { onOpenChange: setOpen, open, children: [
|
|
29
|
-
/* @__PURE__ */ jsx(DialogTrigger, { "aria-label": "Expand", asChild: true, children: /* @__PURE__ */ jsx(
|
|
30
|
-
|
|
29
|
+
/* @__PURE__ */ jsx(DialogTrigger, { "aria-label": "Expand", asChild: true, children: /* @__PURE__ */ jsx(
|
|
30
|
+
Box,
|
|
31
31
|
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
type: "",
|
|
32
|
+
alignSelf: "center",
|
|
33
|
+
asChild: true,
|
|
34
|
+
display: isLoaded ? "block" : "none",
|
|
35
|
+
...props,
|
|
38
36
|
children: /* @__PURE__ */ jsx(
|
|
39
|
-
|
|
37
|
+
"a",
|
|
40
38
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
href: props.src,
|
|
40
|
+
onClick: (event) => {
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
setOpen(true);
|
|
43
|
+
},
|
|
44
|
+
type: "",
|
|
45
45
|
children: /* @__PURE__ */ jsx(
|
|
46
|
-
|
|
46
|
+
Box,
|
|
47
47
|
{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
asChild: true,
|
|
49
|
+
objectFit: "cover",
|
|
50
|
+
overflow: "hidden",
|
|
51
|
+
rounded: "inherit",
|
|
52
|
+
children: /* @__PURE__ */ jsx(
|
|
53
|
+
"img",
|
|
54
|
+
{
|
|
55
|
+
alt: props.alt,
|
|
56
|
+
onLoad: () => setIsLoaded(true),
|
|
57
|
+
ref: imgRef,
|
|
58
|
+
src: props.src
|
|
59
|
+
}
|
|
60
|
+
)
|
|
52
61
|
}
|
|
53
62
|
)
|
|
54
63
|
}
|
|
55
64
|
)
|
|
56
65
|
}
|
|
57
|
-
) })
|
|
58
|
-
/* @__PURE__ */ jsxs(DialogContent, { size: "
|
|
66
|
+
) }),
|
|
67
|
+
/* @__PURE__ */ jsxs(DialogContent, { size: "fullscreen", children: [
|
|
59
68
|
/* @__PURE__ */ jsx(DialogHeader, { lineClamp: "1", children: props.alt }),
|
|
60
|
-
/* @__PURE__ */ jsx(DialogBody, {
|
|
69
|
+
/* @__PURE__ */ jsx(DialogBody, { overflow: "hidden", children: /* @__PURE__ */ jsx(
|
|
70
|
+
Box,
|
|
71
|
+
{
|
|
72
|
+
asChild: true,
|
|
73
|
+
display: "block",
|
|
74
|
+
maxH: "full",
|
|
75
|
+
maxW: "full",
|
|
76
|
+
objectFit: "contain",
|
|
77
|
+
children: /* @__PURE__ */ jsx("img", { alt: props.alt, src: props.src })
|
|
78
|
+
}
|
|
79
|
+
) }),
|
|
61
80
|
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
62
81
|
/* @__PURE__ */ jsx(DialogClose, { children: "Close" }),
|
|
63
82
|
/* @__PURE__ */ jsx(
|
package/dist/index.d.ts
CHANGED
|
@@ -214,7 +214,7 @@ type ProteusDocument$2 = {
|
|
|
214
214
|
blocking?: boolean;
|
|
215
215
|
body: ReactNode;
|
|
216
216
|
subtitle?: ReactNode;
|
|
217
|
-
title
|
|
217
|
+
title?: ReactNode;
|
|
218
218
|
};
|
|
219
219
|
declare function ProteusDocumentShell({ collapsible: collapsibleProp, data, defaultOpen, element, onDataChange, onMessage, onOpenChange, onToolCall, open: openProp, readOnly, strict, }: ProteusDocumentShellProps): react_jsx_runtime.JSX.Element;
|
|
220
220
|
declare namespace ProteusDocumentShell {
|
|
@@ -272,7 +272,7 @@ type ProteusDocument = {
|
|
|
272
272
|
blocking?: boolean;
|
|
273
273
|
body: unknown;
|
|
274
274
|
subtitle?: unknown;
|
|
275
|
-
title
|
|
275
|
+
title?: unknown;
|
|
276
276
|
};
|
|
277
277
|
declare function ProteusDocumentRenderer({ element: elementProp, strict, ...props }: ProteusDocumentRendererProps): react_jsx_runtime.JSX.Element | null;
|
|
278
278
|
declare namespace ProteusDocumentRenderer {
|