@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(Box, { asChild: true, display: isLoaded ? "block" : "none", ...props, children: /* @__PURE__ */ jsx(
30
- "a",
29
+ /* @__PURE__ */ jsx(DialogTrigger, { "aria-label": "Expand", asChild: true, children: /* @__PURE__ */ jsx(
30
+ Box,
31
31
  {
32
- href: props.src,
33
- onClick: (event) => {
34
- event.preventDefault();
35
- setOpen(true);
36
- },
37
- type: "",
32
+ alignSelf: "center",
33
+ asChild: true,
34
+ display: isLoaded ? "block" : "none",
35
+ ...props,
38
36
  children: /* @__PURE__ */ jsx(
39
- Box,
37
+ "a",
40
38
  {
41
- asChild: true,
42
- objectFit: "cover",
43
- overflow: "hidden",
44
- rounded: "inherit",
39
+ href: props.src,
40
+ onClick: (event) => {
41
+ event.preventDefault();
42
+ setOpen(true);
43
+ },
44
+ type: "",
45
45
  children: /* @__PURE__ */ jsx(
46
- "img",
46
+ Box,
47
47
  {
48
- alt: props.alt,
49
- onLoad: () => setIsLoaded(true),
50
- ref: imgRef,
51
- src: props.src
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: "lg", children: [
66
+ ) }),
67
+ /* @__PURE__ */ jsxs(DialogContent, { size: "fullscreen", children: [
59
68
  /* @__PURE__ */ jsx(DialogHeader, { lineClamp: "1", children: props.alt }),
60
- /* @__PURE__ */ jsx(DialogBody, { children: /* @__PURE__ */ jsx(Box, { asChild: true, display: "block", objectFit: "cover", children: /* @__PURE__ */ jsx("img", { alt: props.alt, src: props.src }) }) }),
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(
@@ -2620,8 +2620,7 @@ var definitions = {
2620
2620
  },
2621
2621
  required: [
2622
2622
  "$type",
2623
- "body",
2624
- "title"
2623
+ "body"
2625
2624
  ],
2626
2625
  type: "object"
2627
2626
  },
@@ -2609,8 +2609,7 @@ var definitions = {
2609
2609
  },
2610
2610
  required: [
2611
2611
  "$type",
2612
- "body",
2613
- "title"
2612
+ "body"
2614
2613
  ],
2615
2614
  type: "object"
2616
2615
  },
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: ReactNode;
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: unknown;
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 {
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "git+https://github.com/optimizely-axiom/optiaxiom.git"
8
8
  },
9
9
  "type": "module",
10
- "version": "0.1.1",
10
+ "version": "0.1.2",
11
11
  "files": [
12
12
  "dist/**",
13
13
  "LICENSE"