@algenium/blocks 1.2.0-rc.2 → 1.2.0

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
@@ -6146,8 +6146,7 @@ function ChatSidebarProvider({
6146
6146
  if (conv && conv.rooms.length === 1) {
6147
6147
  setActiveRoomId(conv.rooms[0].id);
6148
6148
  setView("chat");
6149
- } else {
6150
- setActiveRoomId(null);
6149
+ } else if (conv && conv.rooms.length > 1) {
6151
6150
  setView("list");
6152
6151
  }
6153
6152
  }
@@ -6821,35 +6820,17 @@ function ChatSidebar({
6821
6820
  selectRoom,
6822
6821
  back
6823
6822
  } = useChatSidebar();
6824
- React2.useEffect(() => {
6825
- if (!isOpen || typeof window === "undefined") return;
6826
- const mq = window.matchMedia("(max-width: 639px)");
6827
- const apply = () => {
6828
- if (mq.matches) document.body.style.overflow = "hidden";
6829
- else document.body.style.overflow = "";
6830
- };
6831
- apply();
6832
- mq.addEventListener("change", apply);
6833
- return () => {
6834
- mq.removeEventListener("change", apply);
6835
- document.body.style.overflow = "";
6836
- };
6837
- }, [isOpen]);
6838
6823
  if (!isOpen) return null;
6839
6824
  const getRoomTypeLabel = (type) => {
6840
6825
  if (roomTypeLabel) return roomTypeLabel(type);
6841
6826
  return roomTypeLabels[type] ?? type;
6842
6827
  };
6843
6828
  const activeConversation = activeCaseId ? conversations.find((c) => c.caseId === activeCaseId) : null;
6844
- const panel = /* @__PURE__ */ jsxRuntime.jsx(
6829
+ return /* @__PURE__ */ jsxRuntime.jsx(
6845
6830
  "div",
6846
6831
  {
6847
6832
  className: cn(
6848
- "flex min-h-0 flex-col bg-background",
6849
- // Below sm (~640px): fullscreen overlay drawer above sticky app headers (often z-50)
6850
- "fixed inset-0 z-[100] w-full max-w-none border-0 shadow-none",
6851
- // sm+: docked right sidebar in the app shell flex row
6852
- "sm:relative sm:inset-auto sm:z-auto sm:h-full sm:w-[360px] sm:max-w-[360px] sm:shrink-0 sm:border-l sm:shadow-none xl:w-[400px] xl:max-w-[400px]",
6833
+ "flex h-full w-[360px] flex-col border-l bg-background xl:w-[400px]",
6853
6834
  className
6854
6835
  ),
6855
6836
  children: view === "list" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -6944,17 +6925,6 @@ function ChatSidebar({
6944
6925
  ] })
6945
6926
  }
6946
6927
  );
6947
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6948
- /* @__PURE__ */ jsxRuntime.jsx(
6949
- "div",
6950
- {
6951
- className: "fixed inset-0 z-[90] bg-black/50 sm:hidden",
6952
- "aria-hidden": true,
6953
- onClick: close
6954
- }
6955
- ),
6956
- panel
6957
- ] });
6958
6928
  }
6959
6929
  function formatRelativeTime(dateStr) {
6960
6930
  const date = new Date(dateStr);