@copilotz/chat-ui 0.9.2 → 0.9.3
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 +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6221,6 +6221,9 @@ var ChatUI = ({
|
|
|
6221
6221
|
);
|
|
6222
6222
|
}) });
|
|
6223
6223
|
const isMultiAgentMode = config.agentSelector?.mode === "multi";
|
|
6224
|
+
const customPanelWidth = config.customComponent?.panelWidth ?? 320;
|
|
6225
|
+
const customPanelMinWidth = Math.min(customPanelWidth, 320);
|
|
6226
|
+
const customPanelResponsiveWidth = `clamp(${customPanelMinWidth}px, 30vw, ${customPanelWidth}px)`;
|
|
6224
6227
|
const messageProps = useMemo6(
|
|
6225
6228
|
() => ({
|
|
6226
6229
|
userAvatar: user?.avatar,
|
|
@@ -6301,7 +6304,7 @@ var ChatUI = ({
|
|
|
6301
6304
|
userMenuAdditionalItems
|
|
6302
6305
|
}
|
|
6303
6306
|
),
|
|
6304
|
-
/* @__PURE__ */ jsx28(SidebarInset, { children: /* @__PURE__ */ jsxs18("div", { className: "flex flex-col h-full min-h-0", children: [
|
|
6307
|
+
/* @__PURE__ */ jsx28(SidebarInset, { className: "min-w-0 overflow-hidden", children: /* @__PURE__ */ jsxs18("div", { className: "flex flex-col h-full min-h-0 min-w-0", children: [
|
|
6305
6308
|
/* @__PURE__ */ jsx28(
|
|
6306
6309
|
ChatHeader,
|
|
6307
6310
|
{
|
|
@@ -6320,8 +6323,8 @@ var ChatUI = ({
|
|
|
6320
6323
|
onParticipantsChange
|
|
6321
6324
|
}
|
|
6322
6325
|
),
|
|
6323
|
-
/* @__PURE__ */ jsxs18("div", { className: "flex flex-1 flex-row min-h-0 overflow-hidden", children: [
|
|
6324
|
-
/* @__PURE__ */ jsxs18("div", { className: "flex-1 flex flex-col min-h-0", children: [
|
|
6326
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex flex-1 flex-row min-h-0 min-w-0 overflow-hidden", children: [
|
|
6327
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex-1 flex flex-col min-h-0 min-w-0", children: [
|
|
6325
6328
|
/* @__PURE__ */ jsx28(
|
|
6326
6329
|
ScrollArea,
|
|
6327
6330
|
{
|
|
@@ -6441,17 +6444,14 @@ var ChatUI = ({
|
|
|
6441
6444
|
config?.customComponent?.component && !isMobile && /* @__PURE__ */ jsx28(
|
|
6442
6445
|
"div",
|
|
6443
6446
|
{
|
|
6444
|
-
className: "h-full transition-all duration-300 ease-in-out overflow-hidden",
|
|
6447
|
+
className: "h-full shrink-0 transition-all duration-300 ease-in-out overflow-hidden",
|
|
6445
6448
|
style: {
|
|
6446
|
-
width: state.showSidebar ?
|
|
6449
|
+
width: state.showSidebar ? customPanelResponsiveWidth : 0
|
|
6447
6450
|
},
|
|
6448
6451
|
children: state.showSidebar && /* @__PURE__ */ jsx28(
|
|
6449
6452
|
"div",
|
|
6450
6453
|
{
|
|
6451
6454
|
className: "h-full overflow-hidden border-l bg-background animate-in slide-in-from-right-4 duration-300",
|
|
6452
|
-
style: {
|
|
6453
|
-
width: config.customComponent.panelWidth ?? 320
|
|
6454
|
-
},
|
|
6455
6455
|
children: renderCustomComponent()
|
|
6456
6456
|
}
|
|
6457
6457
|
)
|