@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 CHANGED
@@ -6169,6 +6169,9 @@ var ChatUI = ({
6169
6169
  );
6170
6170
  }) });
6171
6171
  const isMultiAgentMode = config.agentSelector?.mode === "multi";
6172
+ const customPanelWidth = config.customComponent?.panelWidth ?? 320;
6173
+ const customPanelMinWidth = Math.min(customPanelWidth, 320);
6174
+ const customPanelResponsiveWidth = `clamp(${customPanelMinWidth}px, 30vw, ${customPanelWidth}px)`;
6172
6175
  const messageProps = (0, import_react10.useMemo)(
6173
6176
  () => ({
6174
6177
  userAvatar: user?.avatar,
@@ -6249,7 +6252,7 @@ var ChatUI = ({
6249
6252
  userMenuAdditionalItems
6250
6253
  }
6251
6254
  ),
6252
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SidebarInset, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col h-full min-h-0", children: [
6255
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SidebarInset, { className: "min-w-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col h-full min-h-0 min-w-0", children: [
6253
6256
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6254
6257
  ChatHeader,
6255
6258
  {
@@ -6268,8 +6271,8 @@ var ChatUI = ({
6268
6271
  onParticipantsChange
6269
6272
  }
6270
6273
  ),
6271
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-1 flex-row min-h-0 overflow-hidden", children: [
6272
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex-1 flex flex-col min-h-0", children: [
6274
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-1 flex-row min-h-0 min-w-0 overflow-hidden", children: [
6275
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex-1 flex flex-col min-h-0 min-w-0", children: [
6273
6276
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6274
6277
  ScrollArea,
6275
6278
  {
@@ -6389,17 +6392,14 @@ var ChatUI = ({
6389
6392
  config?.customComponent?.component && !isMobile && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6390
6393
  "div",
6391
6394
  {
6392
- className: "h-full transition-all duration-300 ease-in-out overflow-hidden",
6395
+ className: "h-full shrink-0 transition-all duration-300 ease-in-out overflow-hidden",
6393
6396
  style: {
6394
- width: state.showSidebar ? config.customComponent.panelWidth ?? 320 : 0
6397
+ width: state.showSidebar ? customPanelResponsiveWidth : 0
6395
6398
  },
6396
6399
  children: state.showSidebar && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6397
6400
  "div",
6398
6401
  {
6399
6402
  className: "h-full overflow-hidden border-l bg-background animate-in slide-in-from-right-4 duration-300",
6400
- style: {
6401
- width: config.customComponent.panelWidth ?? 320
6402
- },
6403
6403
  children: renderCustomComponent()
6404
6404
  }
6405
6405
  )