organify-ui 0.3.48 → 0.3.49

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.
@@ -2,10 +2,10 @@ import { cn, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, ScrollAre
2
2
  import { OrgPlus, OrgSearch, OrgComment, OrgClose, OrgEdit, OrgTeam, OrgGlobe, OrgLock, OrgCheckCircle, OrgError, OrgWarning, OrgInfo, OrgChevronDown, OrgChevronRight, OrgDoor, OrgTrash, OrgCheck, OrgFolder, OrgChevronLeft } from './chunk-J5TEVLDY.js';
3
3
  import * as React6 from 'react';
4
4
  import React6__default, { useState, useEffect, useCallback } from 'react';
5
+ import { motion, AnimatePresence } from 'framer-motion';
5
6
  import { Slot } from '@radix-ui/react-slot';
6
7
  import { cva } from 'class-variance-authority';
7
8
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
8
- import { motion, AnimatePresence } from 'framer-motion';
9
9
  import * as DialogPrimitive from '@radix-ui/react-dialog';
10
10
  import { ChevronDown, ChevronUp, Check, XIcon } from 'lucide-react';
11
11
  import * as TabsPrimitive from '@radix-ui/react-tabs';
@@ -1916,29 +1916,39 @@ function DialogContent({
1916
1916
  }) {
1917
1917
  return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
1918
1918
  /* @__PURE__ */ jsx(DialogOverlay, {}),
1919
- /* @__PURE__ */ jsxs(
1919
+ /* @__PURE__ */ jsx(
1920
1920
  DialogPrimitive.Content,
1921
1921
  {
1922
1922
  "data-slot": "dialog-content",
1923
- className: cn(
1924
- 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border border-theme-subtle bg-theme-surface !bg-[var(--org-bg-surface,"#110e22")] text-theme p-6 shadow-2xl dark:shadow-[0_0_40px_rgba(124,58,237,0.15)] duration-[400ms] sm:max-w-lg',
1925
- className
1926
- ),
1923
+ asChild: true,
1927
1924
  ...props,
1928
- children: [
1929
- children,
1930
- showCloseButton && /* @__PURE__ */ jsxs(
1931
- DialogPrimitive.Close,
1932
- {
1933
- "data-slot": "dialog-close",
1934
- className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4",
1935
- children: [
1936
- /* @__PURE__ */ jsx(XIcon, {}),
1937
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
1938
- ]
1939
- }
1940
- )
1941
- ]
1925
+ children: /* @__PURE__ */ jsxs(
1926
+ motion.div,
1927
+ {
1928
+ className: cn(
1929
+ 'fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border border-theme-subtle bg-theme-surface !bg-[var(--org-bg-surface,"#110e22")] text-theme p-6 shadow-2xl dark:shadow-[0_0_40px_rgba(124,58,237,0.15)] sm:max-w-lg',
1930
+ className
1931
+ ),
1932
+ initial: { opacity: 0, scale: 0.96, y: 8 },
1933
+ animate: { opacity: 1, scale: 1, y: 0 },
1934
+ exit: { opacity: 0, scale: 0.96, y: 8 },
1935
+ transition: { type: "spring", stiffness: 380, damping: 30, mass: 0.7 },
1936
+ children: [
1937
+ children,
1938
+ showCloseButton && /* @__PURE__ */ jsxs(
1939
+ DialogPrimitive.Close,
1940
+ {
1941
+ "data-slot": "dialog-close",
1942
+ className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4",
1943
+ children: [
1944
+ /* @__PURE__ */ jsx(XIcon, {}),
1945
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
1946
+ ]
1947
+ }
1948
+ )
1949
+ ]
1950
+ }
1951
+ )
1942
1952
  }
1943
1953
  )
1944
1954
  ] });
@@ -4080,68 +4090,111 @@ function OrganifyChat({
4080
4090
  }
4081
4091
  ) })
4082
4092
  ] }),
4083
- isMobile && /* @__PURE__ */ jsxs(Fragment, { children: [
4084
- mobileView === "sidebar" && /* @__PURE__ */ jsx("div", { className: "w-full animate-in fade-in-0 slide-in-from-left-5 duration-[400ms]", children: /* @__PURE__ */ jsx(
4085
- ChatSidebar,
4093
+ isMobile && /* @__PURE__ */ jsxs(AnimatePresence, { mode: "wait", initial: false, children: [
4094
+ mobileView === "sidebar" && /* @__PURE__ */ jsx(
4095
+ motion.div,
4086
4096
  {
4087
- rooms: chat.rooms,
4088
- activeRoomId: chat.activeRoomId,
4089
- loading: chat.loadingRooms,
4090
- onSelectRoom: handleRoomSelect,
4091
- onCreateRoom: () => setCreateDialogOpen(true)
4092
- }
4093
- ) }),
4094
- mobileView === "room" && activeRoom && /* @__PURE__ */ jsx("div", { className: "w-full animate-in fade-in-0 slide-in-from-right-5 duration-[400ms]", children: /* @__PURE__ */ jsx(
4095
- ChatMessages,
4097
+ className: "w-full",
4098
+ initial: { opacity: 0, x: -24 },
4099
+ animate: { opacity: 1, x: 0 },
4100
+ exit: { opacity: 0, x: -24 },
4101
+ transition: { type: "spring", stiffness: 340, damping: 32 },
4102
+ children: /* @__PURE__ */ jsx(
4103
+ ChatSidebar,
4104
+ {
4105
+ rooms: chat.rooms,
4106
+ activeRoomId: chat.activeRoomId,
4107
+ loading: chat.loadingRooms,
4108
+ onSelectRoom: handleRoomSelect,
4109
+ onCreateRoom: () => setCreateDialogOpen(true)
4110
+ }
4111
+ )
4112
+ },
4113
+ "sidebar"
4114
+ ),
4115
+ mobileView === "room" && activeRoom && /* @__PURE__ */ jsx(
4116
+ motion.div,
4096
4117
  {
4097
- room: activeRoom,
4098
- messages: chat.messages,
4099
- loading: chat.loadingMessages,
4100
- typingUsers: chat.typingUsers,
4101
- currentUserId: userId,
4102
- permissions: chat.permissions,
4103
- onSendMessage: chat.sendMessage,
4104
- onEditMessage: chat.editMessage,
4105
- onDeleteMessage: chat.deleteMessage,
4106
- onReactToMessage: chat.reactToMessage,
4107
- onTyping: chat.sendTyping,
4108
- onStopTyping: chat.sendTyping,
4109
- onOpenManagement: handleOpenManagement,
4110
- onBack: handleBackToSidebar,
4111
- isMobile: true,
4112
- mentionUsers: stableWorkspaceMembers,
4113
- mentionProjects: stableWorkspaceProjects,
4114
- hasMore: chat.hasMoreMessages,
4115
- onLoadMore: chat.loadMoreMessages,
4116
- loadingMore: chat.loadingMoreMessages
4117
- }
4118
- ) }),
4119
- mobileView === "management" && activeRoom && /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 z-50 flex", children: [
4120
- /* @__PURE__ */ jsx(
4121
- "div",
4122
- {
4123
- className: "flex-1 bg-black/50 backdrop-blur-sm",
4124
- onClick: handleCloseManagement
4125
- }
4126
- ),
4127
- /* @__PURE__ */ jsx("div", { className: "w-[85%] max-w-sm h-full bg-white/[0.03] backdrop-blur-[40px] border-l border-primary/15 animate-in slide-in-from-right-5 duration-[400ms]", children: /* @__PURE__ */ jsx(
4128
- RoomManagementPanel,
4129
- {
4130
- room: activeRoom,
4131
- members: chat.roomMembers,
4132
- currentUserId: userId,
4133
- permissions: chat.permissions,
4134
- workspaceMembers: stableWorkspaceMembers,
4135
- onClose: handleCloseManagement,
4136
- onUpdateRoom: chat.updateRoom,
4137
- onArchiveRoom: chat.archiveRoom,
4138
- onLeaveRoom: chat.leaveRoom,
4139
- onRemoveMember: chat.removeMember,
4140
- onUpdateMemberRole: chat.updateMemberRole,
4141
- onAddMember: chat.addMember
4142
- }
4143
- ) })
4144
- ] })
4118
+ className: "w-full",
4119
+ initial: { opacity: 0, x: 24 },
4120
+ animate: { opacity: 1, x: 0 },
4121
+ exit: { opacity: 0, x: 24 },
4122
+ transition: { type: "spring", stiffness: 340, damping: 32 },
4123
+ children: /* @__PURE__ */ jsx(
4124
+ ChatMessages,
4125
+ {
4126
+ room: activeRoom,
4127
+ messages: chat.messages,
4128
+ loading: chat.loadingMessages,
4129
+ typingUsers: chat.typingUsers,
4130
+ currentUserId: userId,
4131
+ permissions: chat.permissions,
4132
+ onSendMessage: chat.sendMessage,
4133
+ onEditMessage: chat.editMessage,
4134
+ onDeleteMessage: chat.deleteMessage,
4135
+ onReactToMessage: chat.reactToMessage,
4136
+ onTyping: chat.sendTyping,
4137
+ onStopTyping: chat.sendTyping,
4138
+ onOpenManagement: handleOpenManagement,
4139
+ onBack: handleBackToSidebar,
4140
+ isMobile: true,
4141
+ mentionUsers: stableWorkspaceMembers,
4142
+ mentionProjects: stableWorkspaceProjects,
4143
+ hasMore: chat.hasMoreMessages,
4144
+ onLoadMore: chat.loadMoreMessages,
4145
+ loadingMore: chat.loadingMoreMessages
4146
+ }
4147
+ )
4148
+ },
4149
+ "room"
4150
+ ),
4151
+ mobileView === "management" && activeRoom && /* @__PURE__ */ jsxs(
4152
+ motion.div,
4153
+ {
4154
+ className: "absolute inset-0 z-50 flex",
4155
+ initial: { opacity: 0 },
4156
+ animate: { opacity: 1 },
4157
+ exit: { opacity: 0 },
4158
+ transition: { duration: 0.2 },
4159
+ children: [
4160
+ /* @__PURE__ */ jsx(
4161
+ "div",
4162
+ {
4163
+ className: "flex-1 bg-black/50 backdrop-blur-sm",
4164
+ onClick: handleCloseManagement
4165
+ }
4166
+ ),
4167
+ /* @__PURE__ */ jsx(
4168
+ motion.div,
4169
+ {
4170
+ className: "w-[85%] max-w-sm h-full bg-white/[0.03] backdrop-blur-[40px] border-l border-primary/15",
4171
+ initial: { x: "100%" },
4172
+ animate: { x: 0 },
4173
+ exit: { x: "100%" },
4174
+ transition: { type: "spring", stiffness: 320, damping: 32, mass: 0.8 },
4175
+ children: /* @__PURE__ */ jsx(
4176
+ RoomManagementPanel,
4177
+ {
4178
+ room: activeRoom,
4179
+ members: chat.roomMembers,
4180
+ currentUserId: userId,
4181
+ permissions: chat.permissions,
4182
+ workspaceMembers: stableWorkspaceMembers,
4183
+ onClose: handleCloseManagement,
4184
+ onUpdateRoom: chat.updateRoom,
4185
+ onArchiveRoom: chat.archiveRoom,
4186
+ onLeaveRoom: chat.leaveRoom,
4187
+ onRemoveMember: chat.removeMember,
4188
+ onUpdateMemberRole: chat.updateMemberRole,
4189
+ onAddMember: chat.addMember
4190
+ }
4191
+ )
4192
+ }
4193
+ )
4194
+ ]
4195
+ },
4196
+ "management"
4197
+ )
4145
4198
  ] }),
4146
4199
  /* @__PURE__ */ jsx(
4147
4200
  CreateRoomDialog,
@@ -4844,5 +4897,5 @@ function useAiInline({ gatewayUrl, workspaceId, projectId }) {
4844
4897
  }
4845
4898
 
4846
4899
  export { AiChatSidebar, Alert, Button, ChatMessages, ChatSidebar, CommandBar, CreateRoomDialog, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, InlineAiButton, Input, Label, MOCK_PROJECTS, MOCK_USERS, MentionPopover, MessageBubble, MessageInput, OrgLoader, OrgLoaderInline, OrganifyChat, ResponsiveDialog, RoomManagementPanel, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TypingIndicatorMock, UserAvatar, UserDisplayName, alertVariants, buttonVariants, generateAutoReplies, getMockMentionOptions, getRoomPermissions, inputVariants, invalidateUserCache, orgLoaderVariants, resolveUser, seedUserCache, typingIndicator, useAiInline, useChat, useResolvedUser };
4847
- //# sourceMappingURL=chunk-MZHUGCBE.js.map
4848
- //# sourceMappingURL=chunk-MZHUGCBE.js.map
4900
+ //# sourceMappingURL=chunk-UGEI6BMM.js.map
4901
+ //# sourceMappingURL=chunk-UGEI6BMM.js.map