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.
@@ -1,4 +1,4 @@
1
- export { AiChatSidebar, ChatMessages, ChatSidebar, CommandBar, CreateRoomDialog, InlineAiButton, MOCK_PROJECTS, MOCK_USERS, MentionPopover, MessageBubble, MessageInput, OrganifyChat, RoomManagementPanel, TypingIndicatorMock, generateAutoReplies, getMockMentionOptions, getRoomPermissions, typingIndicator, useAiInline, useChat } from '../../chunk-MZHUGCBE.js';
1
+ export { AiChatSidebar, ChatMessages, ChatSidebar, CommandBar, CreateRoomDialog, InlineAiButton, MOCK_PROJECTS, MOCK_USERS, MentionPopover, MessageBubble, MessageInput, OrganifyChat, RoomManagementPanel, TypingIndicatorMock, generateAutoReplies, getMockMentionOptions, getRoomPermissions, typingIndicator, useAiInline, useChat } from '../../chunk-UGEI6BMM.js';
2
2
  import '../../chunk-Q2YXAUZX.js';
3
3
  import '../../chunk-J5TEVLDY.js';
4
4
  //# sourceMappingURL=index.js.map
package/dist/index.js CHANGED
@@ -4,8 +4,8 @@ import { useAiProjectWizard } from './chunk-XSPNTWET.js';
4
4
  export { createAiClient, useAiChat, useAiCommand, useAiProjectWizard, useAiSuggest, useAiUsage } from './chunk-XSPNTWET.js';
5
5
  export { I18nProvider, createTranslator, useI18n } from './chunk-FQA33MF4.js';
6
6
  export { ThemeProvider, useTheme } from './chunk-RFOKENE3.js';
7
- import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, UserAvatar, ResponsiveDialog, Separator, Label, Input, Textarea, Button, UserDisplayName, Tabs, TabsList, TabsTrigger, TabsContent, resolveUser, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, DialogFooter, DialogClose } from './chunk-MZHUGCBE.js';
8
- 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, 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 } from './chunk-MZHUGCBE.js';
7
+ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, UserAvatar, ResponsiveDialog, Separator, Label, Input, Textarea, Button, UserDisplayName, Tabs, TabsList, TabsTrigger, TabsContent, resolveUser, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, DialogFooter, DialogClose } from './chunk-UGEI6BMM.js';
8
+ 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, 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 } from './chunk-UGEI6BMM.js';
9
9
  import { cn, Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, Skeleton, useOrganify, useOrganifyGql, Avatar, AvatarFallback, useOrganifyUser, useOrganifyApi, Badge, ScrollArea, useOrganifyWorkspace, useOrganifyNavigation, useOrganifyProject, AvatarImage, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from './chunk-Q2YXAUZX.js';
10
10
  export { Avatar, AvatarFallback, AvatarImage, Badge, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, OrganifyContext, OrganifyProvider, ScrollArea, ScrollBar, Skeleton, SkeletonCard, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, avatarVariants, badgeVariants, cn, useOrganify, useOrganifyApi, useOrganifyGql, useOrganifyNavigation, useOrganifyProject, useOrganifyRest, useOrganifyUser, useOrganifyWorkspace } from './chunk-Q2YXAUZX.js';
11
11
  import { OrgDiamond, OrgPlus, OrgComment, OrgEdit, OrgTrash, OrgSprint, OrgCheckCircle, OrgAttachment, OrgCalendar, OrgMail, OrgBoard, OrgRocket, OrgWarning, OrgFlag, OrgShield, OrgZap, OrgStar } from './chunk-J5TEVLDY.js';
@@ -16,6 +16,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
16
16
  import * as ProgressPrimitive from '@radix-ui/react-progress';
17
17
  import { X, XIcon, Plus, Check, Search, GripVertical, Settings2, ChevronRight, Circle, MoreHorizontal, AlertCircle, AlertTriangle, CheckCircle2, Info, Sparkles, Zap, Trash2, Calendar, Link2, Ban, ArrowRight } from 'lucide-react';
18
18
  import { cva } from 'class-variance-authority';
19
+ import { AnimatePresence, motion } from 'framer-motion';
19
20
  import * as SheetPrimitive from '@radix-ui/react-dialog';
20
21
  import { createPortal } from 'react-dom';
21
22
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
@@ -1085,28 +1086,38 @@ function WorkspaceSwitcher({ compact = false, onCreateWorkspace, className }) {
1085
1086
  ]
1086
1087
  }
1087
1088
  ),
1088
- isOpen && !isMobile && /* @__PURE__ */ jsx(
1089
- SwitcherDropdown,
1089
+ /* @__PURE__ */ jsx(AnimatePresence, { children: isOpen && !isMobile && /* @__PURE__ */ jsx(
1090
+ motion.div,
1090
1091
  {
1091
- workspaces,
1092
- currentSlug: workspace?.slug,
1093
- loading: workspacesLoading,
1094
- renderLink,
1095
- onClose: () => setIsOpen(false),
1096
- onCreateClick: () => {
1097
- setIsOpen(false);
1098
- setCreateDialogOpen(true);
1099
- },
1100
- onEditClick: (ws) => {
1101
- setIsOpen(false);
1102
- setEditingWorkspace(ws);
1103
- },
1104
- onDeleteClick: (ws) => {
1105
- setIsOpen(false);
1106
- setDeletingWorkspace(ws);
1107
- }
1092
+ initial: { opacity: 0, scale: 0.95, y: -4 },
1093
+ animate: { opacity: 1, scale: 1, y: 0 },
1094
+ exit: { opacity: 0, scale: 0.95, y: -4 },
1095
+ transition: { duration: 0.15, ease: "easeOut" },
1096
+ style: { transformOrigin: "top left" },
1097
+ children: /* @__PURE__ */ jsx(
1098
+ SwitcherDropdown,
1099
+ {
1100
+ workspaces,
1101
+ currentSlug: workspace?.slug,
1102
+ loading: workspacesLoading,
1103
+ renderLink,
1104
+ onClose: () => setIsOpen(false),
1105
+ onCreateClick: () => {
1106
+ setIsOpen(false);
1107
+ setCreateDialogOpen(true);
1108
+ },
1109
+ onEditClick: (ws) => {
1110
+ setIsOpen(false);
1111
+ setEditingWorkspace(ws);
1112
+ },
1113
+ onDeleteClick: (ws) => {
1114
+ setIsOpen(false);
1115
+ setDeletingWorkspace(ws);
1116
+ }
1117
+ }
1118
+ )
1108
1119
  }
1109
- ),
1120
+ ) }),
1110
1121
  isMobile && /* @__PURE__ */ jsx(
1111
1122
  ResponsiveDialog,
1112
1123
  {
@@ -4123,26 +4134,44 @@ function SheetContent({
4123
4134
  }) {
4124
4135
  return /* @__PURE__ */ jsxs(SheetPortal, { children: [
4125
4136
  /* @__PURE__ */ jsx(SheetOverlay, {}),
4126
- /* @__PURE__ */ jsxs(
4137
+ /* @__PURE__ */ jsx(
4127
4138
  SheetPrimitive.Content,
4128
4139
  {
4129
4140
  "data-slot": "sheet-content",
4141
+ asChild: true,
4130
4142
  className: cn(
4131
- 'data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-2xl dark:shadow-[0_0_40px_rgba(124,58,237,0.15)] transition ease-[cubic-bezier(0.25,1,0.5,1)] data-[state=closed]:duration-300 data-[state=open]:duration-500 bg-theme-surface !bg-[var(--org-bg-surface,"#110e22")] text-theme border border-theme-subtle',
4132
- side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
4133
- side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
4134
- side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
4135
- side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
4143
+ 'fixed z-50 flex flex-col gap-4 shadow-2xl dark:shadow-[0_0_40px_rgba(124,58,237,0.15)] bg-theme-surface !bg-[var(--org-bg-surface,"#110e22")] text-theme border border-theme-subtle',
4144
+ side === "right" && "inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
4145
+ side === "left" && "inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
4146
+ side === "top" && "inset-x-0 top-0 h-auto border-b",
4147
+ side === "bottom" && "inset-x-0 bottom-0 h-auto border-t",
4136
4148
  className
4137
4149
  ),
4138
4150
  ...props,
4139
- children: [
4140
- children,
4141
- /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-full opacity-70 transition-opacity duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)] hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
4142
- /* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
4143
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
4144
- ] })
4145
- ]
4151
+ children: /* @__PURE__ */ jsxs(
4152
+ motion.div,
4153
+ {
4154
+ className: "contents",
4155
+ initial: side === "right" ? { x: "100%" } : side === "left" ? { x: "-100%" } : side === "top" ? { y: "-100%" } : { y: "100%" },
4156
+ animate: { x: 0, y: 0 },
4157
+ exit: side === "right" ? { x: "100%" } : side === "left" ? { x: "-100%" } : side === "top" ? { y: "-100%" } : { y: "100%" },
4158
+ transition: { type: "spring", stiffness: 340, damping: 34, mass: 0.75 },
4159
+ style: {
4160
+ position: "fixed",
4161
+ display: "flex",
4162
+ flexDirection: "column",
4163
+ gap: "1rem",
4164
+ ...side === "right" ? { top: 0, right: 0, bottom: 0, width: "75%", maxWidth: "24rem" } : side === "left" ? { top: 0, left: 0, bottom: 0, width: "75%", maxWidth: "24rem" } : side === "top" ? { top: 0, left: 0, right: 0 } : { bottom: 0, left: 0, right: 0 }
4165
+ },
4166
+ children: [
4167
+ children,
4168
+ /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-full opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
4169
+ /* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
4170
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
4171
+ ] })
4172
+ ]
4173
+ }
4174
+ )
4146
4175
  }
4147
4176
  )
4148
4177
  ] });