@proteos/ui 0.51.0 → 0.51.1

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/index.cjs CHANGED
@@ -2148,7 +2148,10 @@ function ConversationBriefPreview({
2148
2148
  onSelectionChange,
2149
2149
  callLabel = "Call",
2150
2150
  className,
2151
- contentClassName
2151
+ contentClassName,
2152
+ renderContent,
2153
+ onEdit,
2154
+ editor
2152
2155
  }) {
2153
2156
  const [pickedContactId, setPickedContactId] = react.useState("");
2154
2157
  const contact = contacts.find((entry) => entry.id === pickedContactId) ?? contacts[0] ?? null;
@@ -2172,17 +2175,35 @@ function ConversationBriefPreview({
2172
2175
  brief.status === "prepared" ? "Prepared" : brief.status === "used" ? "Call held" : "Discarded"
2173
2176
  ].filter(Boolean).join(" \xB7 ") })
2174
2177
  ] }),
2175
- /* @__PURE__ */ jsxRuntime.jsx(
2176
- "div",
2177
- {
2178
- className: chunkMWAXK66H_cjs.cn(
2179
- "whitespace-pre-wrap rounded-md border border-rule-2 bg-surface-2/60 px-3 py-2.5",
2180
- "text-[13px] leading-relaxed text-ink-2 overflow-y-auto [scrollbar-width:thin]",
2181
- contentClassName
2182
- ),
2183
- children: brief.content
2184
- }
2185
- ),
2178
+ editor ?? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group/brief-content relative", children: [
2179
+ /* @__PURE__ */ jsxRuntime.jsx(
2180
+ "div",
2181
+ {
2182
+ className: chunkMWAXK66H_cjs.cn(
2183
+ "rounded-md border border-rule-2 bg-surface-2/60 px-3 py-2.5",
2184
+ "text-[13px] leading-relaxed text-ink-2 overflow-y-auto [scrollbar-width:thin]",
2185
+ renderContent ? null : "whitespace-pre-wrap",
2186
+ contentClassName
2187
+ ),
2188
+ children: renderContent ? renderContent(brief.content) : brief.content
2189
+ }
2190
+ ),
2191
+ onEdit ? /* @__PURE__ */ jsxRuntime.jsx(
2192
+ reactAriaComponents.Button,
2193
+ {
2194
+ "aria-label": "Edit brief",
2195
+ onPress: onEdit,
2196
+ className: chunkMWAXK66H_cjs.cn(
2197
+ "absolute right-1.5 top-1.5 inline-flex size-7 cursor-pointer items-center justify-center",
2198
+ "rounded-md bg-surface/80 text-ink-3 outline-none transition-opacity",
2199
+ "opacity-0 group-hover/brief-content:opacity-100 focus-visible:opacity-100",
2200
+ "data-[hovered]:bg-surface-3 data-[hovered]:text-ink",
2201
+ "focus-visible:shadow-[var(--shadow-focus)]"
2202
+ ),
2203
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "size-3.5", "aria-hidden": true })
2204
+ }
2205
+ ) : null
2206
+ ] }),
2186
2207
  onCall ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 border-t border-rule-2 pt-3", children: [
2187
2208
  contacts.length > 1 ? /* @__PURE__ */ jsxRuntime.jsx(
2188
2209
  Select,
@@ -2320,7 +2341,8 @@ function ConversationBriefReview({
2320
2341
  modalClassName = "max-w-2xl",
2321
2342
  overlayClassName,
2322
2343
  openLabel,
2323
- className
2344
+ className,
2345
+ renderContent
2324
2346
  }) {
2325
2347
  const [brief, setBrief] = react.useState(null);
2326
2348
  const [contacts, setContacts] = react.useState([]);
@@ -2397,6 +2419,7 @@ function ConversationBriefReview({
2397
2419
  contentClassName: "max-h-[50dvh]",
2398
2420
  isCallDisabled,
2399
2421
  ...callDisabledReason !== void 0 ? { callDisabledReason } : {},
2422
+ ...renderContent !== void 0 ? { renderContent } : {},
2400
2423
  ...onCall && isDialableConversationBrief(brief) ? {
2401
2424
  onCall: (contact, phoneNumber) => {
2402
2425
  setIsOpen(false);