@djangocfg/ext-support 1.0.8 → 1.0.9

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/config.cjs CHANGED
@@ -27,7 +27,7 @@ var import_ext_base = require("@djangocfg/ext-base");
27
27
  // package.json
28
28
  var package_default = {
29
29
  name: "@djangocfg/ext-support",
30
- version: "1.0.8",
30
+ version: "1.0.9",
31
31
  description: "Support ticket system extension for DjangoCFG",
32
32
  keywords: [
33
33
  "django",
@@ -89,7 +89,6 @@ var package_default = {
89
89
  "@djangocfg/api": "workspace:*",
90
90
  "@djangocfg/ext-base": "workspace:*",
91
91
  "@djangocfg/ui-core": "workspace:*",
92
- "@djangocfg/ui-nextjs": "workspace:*",
93
92
  consola: "^3.4.2",
94
93
  "lucide-react": "^0.545.0",
95
94
  moment: "^2.30.1",
@@ -103,6 +102,7 @@ var package_default = {
103
102
  devDependencies: {
104
103
  "@djangocfg/api": "workspace:*",
105
104
  "@djangocfg/ext-base": "workspace:*",
105
+ "@djangocfg/ui-core": "workspace:*",
106
106
  "@djangocfg/typescript-config": "workspace:*",
107
107
  "@types/node": "^24.7.2",
108
108
  "@types/react": "^19.0.0",
package/dist/config.js CHANGED
@@ -4,7 +4,7 @@ import { createExtensionConfig } from "@djangocfg/ext-base";
4
4
  // package.json
5
5
  var package_default = {
6
6
  name: "@djangocfg/ext-support",
7
- version: "1.0.8",
7
+ version: "1.0.9",
8
8
  description: "Support ticket system extension for DjangoCFG",
9
9
  keywords: [
10
10
  "django",
@@ -66,7 +66,6 @@ var package_default = {
66
66
  "@djangocfg/api": "workspace:*",
67
67
  "@djangocfg/ext-base": "workspace:*",
68
68
  "@djangocfg/ui-core": "workspace:*",
69
- "@djangocfg/ui-nextjs": "workspace:*",
70
69
  consola: "^3.4.2",
71
70
  "lucide-react": "^0.545.0",
72
71
  moment: "^2.30.1",
@@ -80,6 +79,7 @@ var package_default = {
80
79
  devDependencies: {
81
80
  "@djangocfg/api": "workspace:*",
82
81
  "@djangocfg/ext-base": "workspace:*",
82
+ "@djangocfg/ui-core": "workspace:*",
83
83
  "@djangocfg/typescript-config": "workspace:*",
84
84
  "@types/node": "^24.7.2",
85
85
  "@types/react": "^19.0.0",
package/dist/hooks.cjs CHANGED
@@ -6,13 +6,14 @@ var zod = require('zod');
6
6
  var api = require('@djangocfg/ext-base/api');
7
7
  var lucideReact = require('lucide-react');
8
8
  var React7 = require('react');
9
- var uiNextjs = require('@djangocfg/ui-nextjs');
9
+ var uiCore = require('@djangocfg/ui-core');
10
10
  var useSWR = require('swr');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
12
  var moment2 = require('moment');
13
13
  var lib = require('@djangocfg/ui-core/lib');
14
14
  var auth = require('@djangocfg/api/auth');
15
15
  var useSWRInfinite = require('swr/infinite');
16
+ var hooks = require('@djangocfg/ui-core/hooks');
16
17
  var reactHookForm = require('react-hook-form');
17
18
  var zod$1 = require('@hookform/resolvers/zod');
18
19
  var extBase = require('@djangocfg/ext-base');
@@ -1816,7 +1817,7 @@ var formatRelativeTime = (date) => {
1816
1817
  };
1817
1818
  var TicketCard = ({ ticket, isSelected, onClick }) => {
1818
1819
  return /* @__PURE__ */ jsxRuntime.jsx(
1819
- uiNextjs.Card,
1820
+ uiCore.Card,
1820
1821
  {
1821
1822
  className: lib.cn(
1822
1823
  "cursor-pointer transition-all duration-200 ease-out",
@@ -1825,11 +1826,11 @@ var TicketCard = ({ ticket, isSelected, onClick }) => {
1825
1826
  isSelected && "bg-accent border-primary shadow-sm"
1826
1827
  ),
1827
1828
  onClick,
1828
- children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardContent, { className: "p-4", children: [
1829
+ children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardContent, { className: "p-4", children: [
1829
1830
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-2", children: [
1830
1831
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-sm line-clamp-2 flex-1", children: ticket.subject }),
1831
1832
  (ticket.unanswered_messages_count || 0) > 0 && /* @__PURE__ */ jsxRuntime.jsx(
1832
- uiNextjs.Badge,
1833
+ uiCore.Badge,
1833
1834
  {
1834
1835
  variant: "destructive",
1835
1836
  className: "ml-2 shrink-0 animate-pulse",
@@ -1838,7 +1839,7 @@ var TicketCard = ({ ticket, isSelected, onClick }) => {
1838
1839
  )
1839
1840
  ] }),
1840
1841
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between text-xs text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
1841
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: getStatusBadgeVariant(ticket.status || "open"), className: "text-xs", children: ticket.status || "open" }),
1842
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: getStatusBadgeVariant(ticket.status || "open"), className: "text-xs", children: ticket.status || "open" }),
1842
1843
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
1843
1844
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "h-3 w-3" }),
1844
1845
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatRelativeTime(ticket.created_at) })
@@ -2158,7 +2159,7 @@ var TicketList = () => {
2158
2159
  }, [hasMore, isLoadingMore, loadMore]);
2159
2160
  if (isLoading) {
2160
2161
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 space-y-2", children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
2161
- uiNextjs.Skeleton,
2162
+ uiCore.Skeleton,
2162
2163
  {
2163
2164
  className: "h-24 w-full animate-pulse",
2164
2165
  style: { animationDelay: `${i * 100}ms` }
@@ -2172,7 +2173,7 @@ var TicketList = () => {
2172
2173
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground max-w-sm", children: "Create your first support ticket to get help from our team" })
2173
2174
  ] });
2174
2175
  }
2175
- return /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.ScrollArea, { className: "h-full", viewportRef: scrollRef, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 space-y-2", children: [
2176
+ return /* @__PURE__ */ jsxRuntime.jsx(uiCore.ScrollArea, { className: "h-full", viewportRef: scrollRef, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 space-y-2", children: [
2176
2177
  tickets.map((ticket, index) => /* @__PURE__ */ jsxRuntime.jsx(
2177
2178
  "div",
2178
2179
  {
@@ -2195,7 +2196,7 @@ var TicketList = () => {
2195
2196
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: "Loading more tickets..." })
2196
2197
  ] }) }),
2197
2198
  hasMore && !isLoadingMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pt-2 pb-4", children: /* @__PURE__ */ jsxRuntime.jsxs(
2198
- uiNextjs.Button,
2199
+ uiCore.Button,
2199
2200
  {
2200
2201
  variant: "outline",
2201
2202
  size: "sm",
@@ -2233,22 +2234,22 @@ var MessageBubble = ({ message, isFromUser, currentUser }) => {
2233
2234
  className: `flex gap-3 ${isFromUser ? "justify-end" : "justify-start"}
2234
2235
  animate-in fade-in slide-in-from-bottom-2 duration-300`,
2235
2236
  children: [
2236
- !isFromUser && /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Avatar, { className: "h-8 w-8 shrink-0", children: sender?.avatar ? /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarImage, { src: sender.avatar, alt: sender.display_username || "Support" }) : /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarFallback, { className: "bg-primary text-primary-foreground", children: sender?.is_staff ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Headphones, { className: "h-4 w-4" }) : senderInitial }) }),
2237
+ !isFromUser && /* @__PURE__ */ jsxRuntime.jsx(uiCore.Avatar, { className: "h-8 w-8 shrink-0", children: sender?.avatar ? /* @__PURE__ */ jsxRuntime.jsx(uiCore.AvatarImage, { src: sender.avatar, alt: sender.display_username || "Support" }) : /* @__PURE__ */ jsxRuntime.jsx(uiCore.AvatarFallback, { className: "bg-primary text-primary-foreground", children: sender?.is_staff ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Headphones, { className: "h-4 w-4" }) : senderInitial }) }),
2237
2238
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col gap-1 flex-1 max-w-[80%] ${isFromUser ? "items-end" : "items-start"}`, children: [
2238
2239
  !isFromUser && sender && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground px-1", children: [
2239
2240
  sender.display_username || sender.email || "Support Team",
2240
2241
  sender.is_staff && " (Staff)"
2241
2242
  ] }),
2242
2243
  /* @__PURE__ */ jsxRuntime.jsx(
2243
- uiNextjs.Card,
2244
+ uiCore.Card,
2244
2245
  {
2245
2246
  className: `${isFromUser ? "bg-primary text-primary-foreground" : "bg-muted"} transition-all duration-200 hover:shadow-md`,
2246
- children: /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardContent, { className: "p-3", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm whitespace-pre-wrap break-words", children: message.text }) })
2247
+ children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardContent, { className: "p-3", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm whitespace-pre-wrap break-words", children: message.text }) })
2247
2248
  }
2248
2249
  ),
2249
2250
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground px-1", children: formatTime(message.created_at) })
2250
2251
  ] }),
2251
- isFromUser && /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Avatar, { className: "h-8 w-8 shrink-0", children: currentUser?.avatar ? /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarImage, { src: currentUser.avatar, alt: currentUser.display_username || currentUser.email || "You" }) : /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarFallback, { className: "bg-primary/10 text-primary font-semibold", children: userInitial || /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "h-4 w-4" }) }) })
2252
+ isFromUser && /* @__PURE__ */ jsxRuntime.jsx(uiCore.Avatar, { className: "h-8 w-8 shrink-0", children: currentUser?.avatar ? /* @__PURE__ */ jsxRuntime.jsx(uiCore.AvatarImage, { src: currentUser.avatar, alt: currentUser.display_username || currentUser.email || "You" }) : /* @__PURE__ */ jsxRuntime.jsx(uiCore.AvatarFallback, { className: "bg-primary/10 text-primary font-semibold", children: userInitial || /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "h-4 w-4" }) }) })
2252
2253
  ]
2253
2254
  }
2254
2255
  );
@@ -2324,8 +2325,8 @@ var MessageList = () => {
2324
2325
  className: "flex gap-3 animate-pulse",
2325
2326
  style: { animationDelay: `${i * 100}ms` },
2326
2327
  children: [
2327
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-8 w-8 rounded-full" }),
2328
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-16 flex-1 max-w-[70%]" })
2328
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-8 w-8 rounded-full" }),
2329
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-16 flex-1 max-w-[70%]" })
2329
2330
  ]
2330
2331
  },
2331
2332
  i
@@ -2338,14 +2339,14 @@ var MessageList = () => {
2338
2339
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground max-w-sm", children: "Start the conversation by sending a message below" })
2339
2340
  ] });
2340
2341
  }
2341
- return /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.ScrollArea, { className: "h-full bg-muted/50", viewportRef: scrollAreaRef, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6 space-y-4", ref: scrollRef, children: [
2342
+ return /* @__PURE__ */ jsxRuntime.jsx(uiCore.ScrollArea, { className: "h-full bg-muted/50", viewportRef: scrollAreaRef, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6 space-y-4", ref: scrollRef, children: [
2342
2343
  /* @__PURE__ */ jsxRuntime.jsx("div", { ref: loadMoreRef, className: "h-2" }),
2343
2344
  isLoadingMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
2344
2345
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 animate-spin" }),
2345
2346
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: "Loading older messages..." })
2346
2347
  ] }) }),
2347
2348
  hasMore && !isLoadingMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pt-2 pb-4", children: /* @__PURE__ */ jsxRuntime.jsxs(
2348
- uiNextjs.Button,
2349
+ uiCore.Button,
2349
2350
  {
2350
2351
  variant: "outline",
2351
2352
  size: "sm",
@@ -2393,7 +2394,7 @@ var logger = consola.createConsola({
2393
2394
  var supportLogger = logger;
2394
2395
  var MessageInput = () => {
2395
2396
  const { selectedTicket, sendMessage } = useSupportLayoutContext();
2396
- const { toast } = uiNextjs.useToast();
2397
+ const { toast } = hooks.useToast();
2397
2398
  const [message, setMessage] = React7.useState("");
2398
2399
  const [isSending, setIsSending] = React7.useState(false);
2399
2400
  const handleSubmit = async (e) => {
@@ -2424,7 +2425,7 @@ var MessageInput = () => {
2424
2425
  return /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: "p-4 border-t bg-background/50 backdrop-blur-sm flex-shrink-0", children: [
2425
2426
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
2426
2427
  /* @__PURE__ */ jsxRuntime.jsx(
2427
- uiNextjs.Textarea,
2428
+ uiCore.Textarea,
2428
2429
  {
2429
2430
  value: message,
2430
2431
  onChange: (e) => setMessage(e.target.value),
@@ -2435,7 +2436,7 @@ var MessageInput = () => {
2435
2436
  }
2436
2437
  ),
2437
2438
  /* @__PURE__ */ jsxRuntime.jsx(
2438
- uiNextjs.Button,
2439
+ uiCore.Button,
2439
2440
  {
2440
2441
  type: "submit",
2441
2442
  size: "icon",
@@ -2454,7 +2455,7 @@ var createTicketSchema = zod.z.object({
2454
2455
  });
2455
2456
  var CreateTicketDialog = () => {
2456
2457
  const { uiState, createTicket, closeCreateDialog } = useSupportLayoutContext();
2457
- const { toast } = uiNextjs.useToast();
2458
+ const { toast } = uiCore.useToast();
2458
2459
  const [isSubmitting, setIsSubmitting] = React7__default.default.useState(false);
2459
2460
  const form = reactHookForm.useForm({
2460
2461
  resolver: zod$1.zodResolver(createTicketSchema),
@@ -2487,49 +2488,49 @@ var CreateTicketDialog = () => {
2487
2488
  form.reset();
2488
2489
  closeCreateDialog();
2489
2490
  };
2490
- return /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Dialog, { open: uiState.isCreateDialogOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogContent, { className: "sm:max-w-[600px] animate-in fade-in slide-in-from-bottom-4 duration-300", children: [
2491
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogHeader, { children: [
2492
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogTitle, { className: "flex items-center gap-2", children: [
2491
+ return /* @__PURE__ */ jsxRuntime.jsx(uiCore.Dialog, { open: uiState.isCreateDialogOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogContent, { className: "sm:max-w-[600px] animate-in fade-in slide-in-from-bottom-4 duration-300", children: [
2492
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogHeader, { children: [
2493
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogTitle, { className: "flex items-center gap-2", children: [
2493
2494
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-5 w-5" }),
2494
2495
  "Create Support Ticket"
2495
2496
  ] }),
2496
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogDescription, { children: "Describe your issue and we'll help you resolve it as quickly as possible." })
2497
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogDescription, { children: "Describe your issue and we'll help you resolve it as quickly as possible." })
2497
2498
  ] }),
2498
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Form, { ...form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
2499
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Form, { ...form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
2499
2500
  /* @__PURE__ */ jsxRuntime.jsx(
2500
- uiNextjs.FormField,
2501
+ uiCore.FormField,
2501
2502
  {
2502
2503
  control: form.control,
2503
2504
  name: "subject",
2504
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.FormItem, { children: [
2505
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormLabel, { children: "Subject" }),
2506
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Input, { placeholder: "Brief description of your issue...", ...field }) }),
2507
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormMessage, {})
2505
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiCore.FormItem, { children: [
2506
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormLabel, { children: "Subject" }),
2507
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.Input, { placeholder: "Brief description of your issue...", ...field }) }),
2508
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormMessage, {})
2508
2509
  ] })
2509
2510
  }
2510
2511
  ),
2511
2512
  /* @__PURE__ */ jsxRuntime.jsx(
2512
- uiNextjs.FormField,
2513
+ uiCore.FormField,
2513
2514
  {
2514
2515
  control: form.control,
2515
2516
  name: "message",
2516
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.FormItem, { children: [
2517
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormLabel, { children: "Message" }),
2518
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(
2519
- uiNextjs.Textarea,
2517
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiCore.FormItem, { children: [
2518
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormLabel, { children: "Message" }),
2519
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(
2520
+ uiCore.Textarea,
2520
2521
  {
2521
2522
  placeholder: "Describe your issue in detail. Include any error messages, steps to reproduce, or relevant information...",
2522
2523
  className: "min-h-[120px]",
2523
2524
  ...field
2524
2525
  }
2525
2526
  ) }),
2526
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormMessage, {})
2527
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormMessage, {})
2527
2528
  ] })
2528
2529
  }
2529
2530
  ),
2530
2531
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-3 pt-4", children: [
2531
2532
  /* @__PURE__ */ jsxRuntime.jsx(
2532
- uiNextjs.Button,
2533
+ uiCore.Button,
2533
2534
  {
2534
2535
  type: "button",
2535
2536
  variant: "outline",
@@ -2538,7 +2539,7 @@ var CreateTicketDialog = () => {
2538
2539
  children: "Cancel"
2539
2540
  }
2540
2541
  ),
2541
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Button, { type: "submit", disabled: isSubmitting, children: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2542
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { type: "submit", disabled: isSubmitting, children: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2542
2543
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
2543
2544
  "Creating..."
2544
2545
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -2564,7 +2565,7 @@ var SupportLayoutContent = () => {
2564
2565
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border-b bg-background flex-shrink-0", children: [
2565
2566
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2566
2567
  selectedTicket ? /* @__PURE__ */ jsxRuntime.jsx(
2567
- uiNextjs.Button,
2568
+ uiCore.Button,
2568
2569
  {
2569
2570
  variant: "ghost",
2570
2571
  size: "sm",
@@ -2576,7 +2577,7 @@ var SupportLayoutContent = () => {
2576
2577
  /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-xl font-semibold", children: selectedTicket ? selectedTicket.subject : "Support" }),
2577
2578
  unreadCount > 0 && !selectedTicket && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-5 w-5 bg-red-500 text-white text-xs rounded-full flex items-center justify-center", children: unreadCount })
2578
2579
  ] }),
2579
- !selectedTicket && /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { onClick: openCreateDialog, size: "sm", children: [
2580
+ !selectedTicket && /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { onClick: openCreateDialog, size: "sm", children: [
2580
2581
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }),
2581
2582
  "New Ticket"
2582
2583
  ] })
@@ -2604,15 +2605,15 @@ var SupportLayoutContent = () => {
2604
2605
  ] }),
2605
2606
  unreadCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-6 w-6 bg-red-500 text-white text-sm rounded-full flex items-center justify-center", children: unreadCount })
2606
2607
  ] }),
2607
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { onClick: openCreateDialog, children: [
2608
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { onClick: openCreateDialog, children: [
2608
2609
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }),
2609
2610
  "New Ticket"
2610
2611
  ] })
2611
2612
  ] }),
2612
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.ResizablePanelGroup, { direction: "horizontal", className: "h-full", children: [
2613
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.ResizablePanel, { defaultSize: 35, minSize: 25, maxSize: 50, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full border-r overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(TicketList, {}) }) }),
2614
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.ResizableHandle, { withHandle: true, className: "hover:bg-accent transition-colors" }),
2615
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.ResizablePanel, { defaultSize: 65, minSize: 50, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex flex-col overflow-hidden", children: [
2613
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.ResizablePanelGroup, { direction: "horizontal", className: "h-full", children: [
2614
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.ResizablePanel, { defaultSize: 35, minSize: 25, maxSize: 50, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full border-r overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(TicketList, {}) }) }),
2615
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.ResizableHandle, { withHandle: true, className: "hover:bg-accent transition-colors" }),
2616
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.ResizablePanel, { defaultSize: 65, minSize: 50, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex flex-col overflow-hidden", children: [
2616
2617
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(MessageList, {}) }),
2617
2618
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(MessageInput, {}) })
2618
2619
  ] }) })
@@ -2627,7 +2628,7 @@ var SupportLayout = () => {
2627
2628
  // package.json
2628
2629
  var package_default = {
2629
2630
  name: "@djangocfg/ext-support",
2630
- version: "1.0.8",
2631
+ version: "1.0.9",
2631
2632
  description: "Support ticket system extension for DjangoCFG",
2632
2633
  keywords: [
2633
2634
  "django",
@@ -2689,7 +2690,6 @@ var package_default = {
2689
2690
  "@djangocfg/api": "workspace:*",
2690
2691
  "@djangocfg/ext-base": "workspace:*",
2691
2692
  "@djangocfg/ui-core": "workspace:*",
2692
- "@djangocfg/ui-nextjs": "workspace:*",
2693
2693
  consola: "^3.4.2",
2694
2694
  "lucide-react": "^0.545.0",
2695
2695
  moment: "^2.30.1",
@@ -2703,6 +2703,7 @@ var package_default = {
2703
2703
  devDependencies: {
2704
2704
  "@djangocfg/api": "workspace:*",
2705
2705
  "@djangocfg/ext-base": "workspace:*",
2706
+ "@djangocfg/ui-core": "workspace:*",
2706
2707
  "@djangocfg/typescript-config": "workspace:*",
2707
2708
  "@types/node": "^24.7.2",
2708
2709
  "@types/react": "^19.0.0",
package/dist/hooks.js CHANGED
@@ -4,13 +4,14 @@ import { z } from 'zod';
4
4
  import { createExtensionAPI } from '@djangocfg/ext-base/api';
5
5
  import { Clock, MessageSquare, Loader2, Send, Plus, Headphones, User, ArrowLeft, LifeBuoy } from 'lucide-react';
6
6
  import React7, { createContext, useContext, useState, useCallback, useEffect, useRef } from 'react';
7
- import { Card, CardContent, Badge, Skeleton, ScrollArea, Button, useToast, Textarea, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Form, FormField, FormItem, FormLabel, FormControl, Input, FormMessage, Avatar, AvatarImage, AvatarFallback, ResizablePanelGroup, ResizablePanel, ResizableHandle } from '@djangocfg/ui-nextjs';
7
+ import { Card, CardContent, Badge, Skeleton, ScrollArea, Button, Textarea, useToast as useToast$1, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Form, FormField, FormItem, FormLabel, FormControl, Input, FormMessage, Avatar, AvatarImage, AvatarFallback, ResizablePanelGroup, ResizablePanel, ResizableHandle } from '@djangocfg/ui-core';
8
8
  import useSWR, { useSWRConfig } from 'swr';
9
9
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
10
  import moment2 from 'moment';
11
11
  import { cn } from '@djangocfg/ui-core/lib';
12
12
  import { useAuth } from '@djangocfg/api/auth';
13
13
  import useSWRInfinite from 'swr/infinite';
14
+ import { useToast } from '@djangocfg/ui-core/hooks';
14
15
  import { useForm } from 'react-hook-form';
15
16
  import { zodResolver } from '@hookform/resolvers/zod';
16
17
  import { createExtensionConfig } from '@djangocfg/ext-base';
@@ -2444,7 +2445,7 @@ var createTicketSchema = z.object({
2444
2445
  });
2445
2446
  var CreateTicketDialog = () => {
2446
2447
  const { uiState, createTicket, closeCreateDialog } = useSupportLayoutContext();
2447
- const { toast } = useToast();
2448
+ const { toast } = useToast$1();
2448
2449
  const [isSubmitting, setIsSubmitting] = React7.useState(false);
2449
2450
  const form = useForm({
2450
2451
  resolver: zodResolver(createTicketSchema),
@@ -2617,7 +2618,7 @@ var SupportLayout = () => {
2617
2618
  // package.json
2618
2619
  var package_default = {
2619
2620
  name: "@djangocfg/ext-support",
2620
- version: "1.0.8",
2621
+ version: "1.0.9",
2621
2622
  description: "Support ticket system extension for DjangoCFG",
2622
2623
  keywords: [
2623
2624
  "django",
@@ -2679,7 +2680,6 @@ var package_default = {
2679
2680
  "@djangocfg/api": "workspace:*",
2680
2681
  "@djangocfg/ext-base": "workspace:*",
2681
2682
  "@djangocfg/ui-core": "workspace:*",
2682
- "@djangocfg/ui-nextjs": "workspace:*",
2683
2683
  consola: "^3.4.2",
2684
2684
  "lucide-react": "^0.545.0",
2685
2685
  moment: "^2.30.1",
@@ -2693,6 +2693,7 @@ var package_default = {
2693
2693
  devDependencies: {
2694
2694
  "@djangocfg/api": "workspace:*",
2695
2695
  "@djangocfg/ext-base": "workspace:*",
2696
+ "@djangocfg/ui-core": "workspace:*",
2696
2697
  "@djangocfg/typescript-config": "workspace:*",
2697
2698
  "@types/node": "^24.7.2",
2698
2699
  "@types/react": "^19.0.0",
package/dist/index.cjs CHANGED
@@ -6,13 +6,14 @@ var zod = require('zod');
6
6
  var api = require('@djangocfg/ext-base/api');
7
7
  var lucideReact = require('lucide-react');
8
8
  var React7 = require('react');
9
- var uiNextjs = require('@djangocfg/ui-nextjs');
9
+ var uiCore = require('@djangocfg/ui-core');
10
10
  var useSWR = require('swr');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
12
  var moment2 = require('moment');
13
13
  var lib = require('@djangocfg/ui-core/lib');
14
14
  var auth = require('@djangocfg/api/auth');
15
15
  var useSWRInfinite = require('swr/infinite');
16
+ var hooks = require('@djangocfg/ui-core/hooks');
16
17
  var reactHookForm = require('react-hook-form');
17
18
  var zod$1 = require('@hookform/resolvers/zod');
18
19
  var extBase = require('@djangocfg/ext-base');
@@ -1816,7 +1817,7 @@ var formatRelativeTime = (date) => {
1816
1817
  };
1817
1818
  var TicketCard = ({ ticket, isSelected, onClick }) => {
1818
1819
  return /* @__PURE__ */ jsxRuntime.jsx(
1819
- uiNextjs.Card,
1820
+ uiCore.Card,
1820
1821
  {
1821
1822
  className: lib.cn(
1822
1823
  "cursor-pointer transition-all duration-200 ease-out",
@@ -1825,11 +1826,11 @@ var TicketCard = ({ ticket, isSelected, onClick }) => {
1825
1826
  isSelected && "bg-accent border-primary shadow-sm"
1826
1827
  ),
1827
1828
  onClick,
1828
- children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardContent, { className: "p-4", children: [
1829
+ children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardContent, { className: "p-4", children: [
1829
1830
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-2", children: [
1830
1831
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-sm line-clamp-2 flex-1", children: ticket.subject }),
1831
1832
  (ticket.unanswered_messages_count || 0) > 0 && /* @__PURE__ */ jsxRuntime.jsx(
1832
- uiNextjs.Badge,
1833
+ uiCore.Badge,
1833
1834
  {
1834
1835
  variant: "destructive",
1835
1836
  className: "ml-2 shrink-0 animate-pulse",
@@ -1838,7 +1839,7 @@ var TicketCard = ({ ticket, isSelected, onClick }) => {
1838
1839
  )
1839
1840
  ] }),
1840
1841
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between text-xs text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
1841
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: getStatusBadgeVariant(ticket.status || "open"), className: "text-xs", children: ticket.status || "open" }),
1842
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: getStatusBadgeVariant(ticket.status || "open"), className: "text-xs", children: ticket.status || "open" }),
1842
1843
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
1843
1844
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "h-3 w-3" }),
1844
1845
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatRelativeTime(ticket.created_at) })
@@ -2158,7 +2159,7 @@ var TicketList = () => {
2158
2159
  }, [hasMore, isLoadingMore, loadMore]);
2159
2160
  if (isLoading) {
2160
2161
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 space-y-2", children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
2161
- uiNextjs.Skeleton,
2162
+ uiCore.Skeleton,
2162
2163
  {
2163
2164
  className: "h-24 w-full animate-pulse",
2164
2165
  style: { animationDelay: `${i * 100}ms` }
@@ -2172,7 +2173,7 @@ var TicketList = () => {
2172
2173
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground max-w-sm", children: "Create your first support ticket to get help from our team" })
2173
2174
  ] });
2174
2175
  }
2175
- return /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.ScrollArea, { className: "h-full", viewportRef: scrollRef, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 space-y-2", children: [
2176
+ return /* @__PURE__ */ jsxRuntime.jsx(uiCore.ScrollArea, { className: "h-full", viewportRef: scrollRef, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 space-y-2", children: [
2176
2177
  tickets.map((ticket, index) => /* @__PURE__ */ jsxRuntime.jsx(
2177
2178
  "div",
2178
2179
  {
@@ -2195,7 +2196,7 @@ var TicketList = () => {
2195
2196
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: "Loading more tickets..." })
2196
2197
  ] }) }),
2197
2198
  hasMore && !isLoadingMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pt-2 pb-4", children: /* @__PURE__ */ jsxRuntime.jsxs(
2198
- uiNextjs.Button,
2199
+ uiCore.Button,
2199
2200
  {
2200
2201
  variant: "outline",
2201
2202
  size: "sm",
@@ -2233,22 +2234,22 @@ var MessageBubble = ({ message, isFromUser, currentUser }) => {
2233
2234
  className: `flex gap-3 ${isFromUser ? "justify-end" : "justify-start"}
2234
2235
  animate-in fade-in slide-in-from-bottom-2 duration-300`,
2235
2236
  children: [
2236
- !isFromUser && /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Avatar, { className: "h-8 w-8 shrink-0", children: sender?.avatar ? /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarImage, { src: sender.avatar, alt: sender.display_username || "Support" }) : /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarFallback, { className: "bg-primary text-primary-foreground", children: sender?.is_staff ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Headphones, { className: "h-4 w-4" }) : senderInitial }) }),
2237
+ !isFromUser && /* @__PURE__ */ jsxRuntime.jsx(uiCore.Avatar, { className: "h-8 w-8 shrink-0", children: sender?.avatar ? /* @__PURE__ */ jsxRuntime.jsx(uiCore.AvatarImage, { src: sender.avatar, alt: sender.display_username || "Support" }) : /* @__PURE__ */ jsxRuntime.jsx(uiCore.AvatarFallback, { className: "bg-primary text-primary-foreground", children: sender?.is_staff ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Headphones, { className: "h-4 w-4" }) : senderInitial }) }),
2237
2238
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col gap-1 flex-1 max-w-[80%] ${isFromUser ? "items-end" : "items-start"}`, children: [
2238
2239
  !isFromUser && sender && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground px-1", children: [
2239
2240
  sender.display_username || sender.email || "Support Team",
2240
2241
  sender.is_staff && " (Staff)"
2241
2242
  ] }),
2242
2243
  /* @__PURE__ */ jsxRuntime.jsx(
2243
- uiNextjs.Card,
2244
+ uiCore.Card,
2244
2245
  {
2245
2246
  className: `${isFromUser ? "bg-primary text-primary-foreground" : "bg-muted"} transition-all duration-200 hover:shadow-md`,
2246
- children: /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardContent, { className: "p-3", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm whitespace-pre-wrap break-words", children: message.text }) })
2247
+ children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardContent, { className: "p-3", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm whitespace-pre-wrap break-words", children: message.text }) })
2247
2248
  }
2248
2249
  ),
2249
2250
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground px-1", children: formatTime(message.created_at) })
2250
2251
  ] }),
2251
- isFromUser && /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Avatar, { className: "h-8 w-8 shrink-0", children: currentUser?.avatar ? /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarImage, { src: currentUser.avatar, alt: currentUser.display_username || currentUser.email || "You" }) : /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.AvatarFallback, { className: "bg-primary/10 text-primary font-semibold", children: userInitial || /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "h-4 w-4" }) }) })
2252
+ isFromUser && /* @__PURE__ */ jsxRuntime.jsx(uiCore.Avatar, { className: "h-8 w-8 shrink-0", children: currentUser?.avatar ? /* @__PURE__ */ jsxRuntime.jsx(uiCore.AvatarImage, { src: currentUser.avatar, alt: currentUser.display_username || currentUser.email || "You" }) : /* @__PURE__ */ jsxRuntime.jsx(uiCore.AvatarFallback, { className: "bg-primary/10 text-primary font-semibold", children: userInitial || /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "h-4 w-4" }) }) })
2252
2253
  ]
2253
2254
  }
2254
2255
  );
@@ -2324,8 +2325,8 @@ var MessageList = () => {
2324
2325
  className: "flex gap-3 animate-pulse",
2325
2326
  style: { animationDelay: `${i * 100}ms` },
2326
2327
  children: [
2327
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-8 w-8 rounded-full" }),
2328
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-16 flex-1 max-w-[70%]" })
2328
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-8 w-8 rounded-full" }),
2329
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-16 flex-1 max-w-[70%]" })
2329
2330
  ]
2330
2331
  },
2331
2332
  i
@@ -2338,14 +2339,14 @@ var MessageList = () => {
2338
2339
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground max-w-sm", children: "Start the conversation by sending a message below" })
2339
2340
  ] });
2340
2341
  }
2341
- return /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.ScrollArea, { className: "h-full bg-muted/50", viewportRef: scrollAreaRef, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6 space-y-4", ref: scrollRef, children: [
2342
+ return /* @__PURE__ */ jsxRuntime.jsx(uiCore.ScrollArea, { className: "h-full bg-muted/50", viewportRef: scrollAreaRef, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6 space-y-4", ref: scrollRef, children: [
2342
2343
  /* @__PURE__ */ jsxRuntime.jsx("div", { ref: loadMoreRef, className: "h-2" }),
2343
2344
  isLoadingMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
2344
2345
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 animate-spin" }),
2345
2346
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: "Loading older messages..." })
2346
2347
  ] }) }),
2347
2348
  hasMore && !isLoadingMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pt-2 pb-4", children: /* @__PURE__ */ jsxRuntime.jsxs(
2348
- uiNextjs.Button,
2349
+ uiCore.Button,
2349
2350
  {
2350
2351
  variant: "outline",
2351
2352
  size: "sm",
@@ -2393,7 +2394,7 @@ var logger = consola.createConsola({
2393
2394
  var supportLogger = logger;
2394
2395
  var MessageInput = () => {
2395
2396
  const { selectedTicket, sendMessage } = useSupportLayoutContext();
2396
- const { toast } = uiNextjs.useToast();
2397
+ const { toast } = hooks.useToast();
2397
2398
  const [message, setMessage] = React7.useState("");
2398
2399
  const [isSending, setIsSending] = React7.useState(false);
2399
2400
  const handleSubmit = async (e) => {
@@ -2424,7 +2425,7 @@ var MessageInput = () => {
2424
2425
  return /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: "p-4 border-t bg-background/50 backdrop-blur-sm flex-shrink-0", children: [
2425
2426
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
2426
2427
  /* @__PURE__ */ jsxRuntime.jsx(
2427
- uiNextjs.Textarea,
2428
+ uiCore.Textarea,
2428
2429
  {
2429
2430
  value: message,
2430
2431
  onChange: (e) => setMessage(e.target.value),
@@ -2435,7 +2436,7 @@ var MessageInput = () => {
2435
2436
  }
2436
2437
  ),
2437
2438
  /* @__PURE__ */ jsxRuntime.jsx(
2438
- uiNextjs.Button,
2439
+ uiCore.Button,
2439
2440
  {
2440
2441
  type: "submit",
2441
2442
  size: "icon",
@@ -2454,7 +2455,7 @@ var createTicketSchema = zod.z.object({
2454
2455
  });
2455
2456
  var CreateTicketDialog = () => {
2456
2457
  const { uiState, createTicket, closeCreateDialog } = useSupportLayoutContext();
2457
- const { toast } = uiNextjs.useToast();
2458
+ const { toast } = uiCore.useToast();
2458
2459
  const [isSubmitting, setIsSubmitting] = React7__default.default.useState(false);
2459
2460
  const form = reactHookForm.useForm({
2460
2461
  resolver: zod$1.zodResolver(createTicketSchema),
@@ -2487,49 +2488,49 @@ var CreateTicketDialog = () => {
2487
2488
  form.reset();
2488
2489
  closeCreateDialog();
2489
2490
  };
2490
- return /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Dialog, { open: uiState.isCreateDialogOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogContent, { className: "sm:max-w-[600px] animate-in fade-in slide-in-from-bottom-4 duration-300", children: [
2491
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogHeader, { children: [
2492
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogTitle, { className: "flex items-center gap-2", children: [
2491
+ return /* @__PURE__ */ jsxRuntime.jsx(uiCore.Dialog, { open: uiState.isCreateDialogOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogContent, { className: "sm:max-w-[600px] animate-in fade-in slide-in-from-bottom-4 duration-300", children: [
2492
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogHeader, { children: [
2493
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogTitle, { className: "flex items-center gap-2", children: [
2493
2494
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-5 w-5" }),
2494
2495
  "Create Support Ticket"
2495
2496
  ] }),
2496
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogDescription, { children: "Describe your issue and we'll help you resolve it as quickly as possible." })
2497
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogDescription, { children: "Describe your issue and we'll help you resolve it as quickly as possible." })
2497
2498
  ] }),
2498
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Form, { ...form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
2499
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Form, { ...form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
2499
2500
  /* @__PURE__ */ jsxRuntime.jsx(
2500
- uiNextjs.FormField,
2501
+ uiCore.FormField,
2501
2502
  {
2502
2503
  control: form.control,
2503
2504
  name: "subject",
2504
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.FormItem, { children: [
2505
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormLabel, { children: "Subject" }),
2506
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Input, { placeholder: "Brief description of your issue...", ...field }) }),
2507
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormMessage, {})
2505
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiCore.FormItem, { children: [
2506
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormLabel, { children: "Subject" }),
2507
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.Input, { placeholder: "Brief description of your issue...", ...field }) }),
2508
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormMessage, {})
2508
2509
  ] })
2509
2510
  }
2510
2511
  ),
2511
2512
  /* @__PURE__ */ jsxRuntime.jsx(
2512
- uiNextjs.FormField,
2513
+ uiCore.FormField,
2513
2514
  {
2514
2515
  control: form.control,
2515
2516
  name: "message",
2516
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.FormItem, { children: [
2517
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormLabel, { children: "Message" }),
2518
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(
2519
- uiNextjs.Textarea,
2517
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiCore.FormItem, { children: [
2518
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormLabel, { children: "Message" }),
2519
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(
2520
+ uiCore.Textarea,
2520
2521
  {
2521
2522
  placeholder: "Describe your issue in detail. Include any error messages, steps to reproduce, or relevant information...",
2522
2523
  className: "min-h-[120px]",
2523
2524
  ...field
2524
2525
  }
2525
2526
  ) }),
2526
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormMessage, {})
2527
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormMessage, {})
2527
2528
  ] })
2528
2529
  }
2529
2530
  ),
2530
2531
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-3 pt-4", children: [
2531
2532
  /* @__PURE__ */ jsxRuntime.jsx(
2532
- uiNextjs.Button,
2533
+ uiCore.Button,
2533
2534
  {
2534
2535
  type: "button",
2535
2536
  variant: "outline",
@@ -2538,7 +2539,7 @@ var CreateTicketDialog = () => {
2538
2539
  children: "Cancel"
2539
2540
  }
2540
2541
  ),
2541
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Button, { type: "submit", disabled: isSubmitting, children: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2542
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { type: "submit", disabled: isSubmitting, children: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2542
2543
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
2543
2544
  "Creating..."
2544
2545
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -2564,7 +2565,7 @@ var SupportLayoutContent = () => {
2564
2565
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border-b bg-background flex-shrink-0", children: [
2565
2566
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2566
2567
  selectedTicket ? /* @__PURE__ */ jsxRuntime.jsx(
2567
- uiNextjs.Button,
2568
+ uiCore.Button,
2568
2569
  {
2569
2570
  variant: "ghost",
2570
2571
  size: "sm",
@@ -2576,7 +2577,7 @@ var SupportLayoutContent = () => {
2576
2577
  /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-xl font-semibold", children: selectedTicket ? selectedTicket.subject : "Support" }),
2577
2578
  unreadCount > 0 && !selectedTicket && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-5 w-5 bg-red-500 text-white text-xs rounded-full flex items-center justify-center", children: unreadCount })
2578
2579
  ] }),
2579
- !selectedTicket && /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { onClick: openCreateDialog, size: "sm", children: [
2580
+ !selectedTicket && /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { onClick: openCreateDialog, size: "sm", children: [
2580
2581
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }),
2581
2582
  "New Ticket"
2582
2583
  ] })
@@ -2604,15 +2605,15 @@ var SupportLayoutContent = () => {
2604
2605
  ] }),
2605
2606
  unreadCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-6 w-6 bg-red-500 text-white text-sm rounded-full flex items-center justify-center", children: unreadCount })
2606
2607
  ] }),
2607
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { onClick: openCreateDialog, children: [
2608
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { onClick: openCreateDialog, children: [
2608
2609
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }),
2609
2610
  "New Ticket"
2610
2611
  ] })
2611
2612
  ] }),
2612
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.ResizablePanelGroup, { direction: "horizontal", className: "h-full", children: [
2613
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.ResizablePanel, { defaultSize: 35, minSize: 25, maxSize: 50, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full border-r overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(TicketList, {}) }) }),
2614
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.ResizableHandle, { withHandle: true, className: "hover:bg-accent transition-colors" }),
2615
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.ResizablePanel, { defaultSize: 65, minSize: 50, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex flex-col overflow-hidden", children: [
2613
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.ResizablePanelGroup, { direction: "horizontal", className: "h-full", children: [
2614
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.ResizablePanel, { defaultSize: 35, minSize: 25, maxSize: 50, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full border-r overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(TicketList, {}) }) }),
2615
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.ResizableHandle, { withHandle: true, className: "hover:bg-accent transition-colors" }),
2616
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.ResizablePanel, { defaultSize: 65, minSize: 50, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex flex-col overflow-hidden", children: [
2616
2617
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(MessageList, {}) }),
2617
2618
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(MessageInput, {}) })
2618
2619
  ] }) })
@@ -2627,7 +2628,7 @@ var SupportLayout = () => {
2627
2628
  // package.json
2628
2629
  var package_default = {
2629
2630
  name: "@djangocfg/ext-support",
2630
- version: "1.0.8",
2631
+ version: "1.0.9",
2631
2632
  description: "Support ticket system extension for DjangoCFG",
2632
2633
  keywords: [
2633
2634
  "django",
@@ -2689,7 +2690,6 @@ var package_default = {
2689
2690
  "@djangocfg/api": "workspace:*",
2690
2691
  "@djangocfg/ext-base": "workspace:*",
2691
2692
  "@djangocfg/ui-core": "workspace:*",
2692
- "@djangocfg/ui-nextjs": "workspace:*",
2693
2693
  consola: "^3.4.2",
2694
2694
  "lucide-react": "^0.545.0",
2695
2695
  moment: "^2.30.1",
@@ -2703,6 +2703,7 @@ var package_default = {
2703
2703
  devDependencies: {
2704
2704
  "@djangocfg/api": "workspace:*",
2705
2705
  "@djangocfg/ext-base": "workspace:*",
2706
+ "@djangocfg/ui-core": "workspace:*",
2706
2707
  "@djangocfg/typescript-config": "workspace:*",
2707
2708
  "@types/node": "^24.7.2",
2708
2709
  "@types/react": "^19.0.0",
package/dist/index.js CHANGED
@@ -4,13 +4,14 @@ import { z } from 'zod';
4
4
  import { createExtensionAPI } from '@djangocfg/ext-base/api';
5
5
  import { ArrowLeft, LifeBuoy, Plus, MessageSquare, Loader2, Send, Headphones, User, Clock } from 'lucide-react';
6
6
  import React7, { createContext, useState, useCallback, useEffect, useContext, useRef } from 'react';
7
- import { Button, ResizablePanelGroup, ResizablePanel, ResizableHandle, Skeleton, ScrollArea, useToast, Textarea, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Form, FormField, FormItem, FormLabel, FormControl, Input, FormMessage, Avatar, AvatarImage, AvatarFallback, Card, CardContent, Badge } from '@djangocfg/ui-nextjs';
7
+ import { Button, ResizablePanelGroup, ResizablePanel, ResizableHandle, Skeleton, ScrollArea, Textarea, useToast as useToast$1, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Form, FormField, FormItem, FormLabel, FormControl, Input, FormMessage, Avatar, AvatarImage, AvatarFallback, Card, CardContent, Badge } from '@djangocfg/ui-core';
8
8
  import useSWR, { useSWRConfig } from 'swr';
9
9
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
10
  import moment2 from 'moment';
11
11
  import { cn } from '@djangocfg/ui-core/lib';
12
12
  import { useAuth } from '@djangocfg/api/auth';
13
13
  import useSWRInfinite from 'swr/infinite';
14
+ import { useToast } from '@djangocfg/ui-core/hooks';
14
15
  import { useForm } from 'react-hook-form';
15
16
  import { zodResolver } from '@hookform/resolvers/zod';
16
17
  import { createExtensionConfig } from '@djangocfg/ext-base';
@@ -2444,7 +2445,7 @@ var createTicketSchema = z.object({
2444
2445
  });
2445
2446
  var CreateTicketDialog = () => {
2446
2447
  const { uiState, createTicket, closeCreateDialog } = useSupportLayoutContext();
2447
- const { toast } = useToast();
2448
+ const { toast } = useToast$1();
2448
2449
  const [isSubmitting, setIsSubmitting] = React7.useState(false);
2449
2450
  const form = useForm({
2450
2451
  resolver: zodResolver(createTicketSchema),
@@ -2617,7 +2618,7 @@ var SupportLayout = () => {
2617
2618
  // package.json
2618
2619
  var package_default = {
2619
2620
  name: "@djangocfg/ext-support",
2620
- version: "1.0.8",
2621
+ version: "1.0.9",
2621
2622
  description: "Support ticket system extension for DjangoCFG",
2622
2623
  keywords: [
2623
2624
  "django",
@@ -2679,7 +2680,6 @@ var package_default = {
2679
2680
  "@djangocfg/api": "workspace:*",
2680
2681
  "@djangocfg/ext-base": "workspace:*",
2681
2682
  "@djangocfg/ui-core": "workspace:*",
2682
- "@djangocfg/ui-nextjs": "workspace:*",
2683
2683
  consola: "^3.4.2",
2684
2684
  "lucide-react": "^0.545.0",
2685
2685
  moment: "^2.30.1",
@@ -2693,6 +2693,7 @@ var package_default = {
2693
2693
  devDependencies: {
2694
2694
  "@djangocfg/api": "workspace:*",
2695
2695
  "@djangocfg/ext-base": "workspace:*",
2696
+ "@djangocfg/ui-core": "workspace:*",
2696
2697
  "@djangocfg/typescript-config": "workspace:*",
2697
2698
  "@types/node": "^24.7.2",
2698
2699
  "@types/react": "^19.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/ext-support",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Support ticket system extension for DjangoCFG",
5
5
  "keywords": [
6
6
  "django",
@@ -59,10 +59,9 @@
59
59
  "check": "tsc --noEmit"
60
60
  },
61
61
  "peerDependencies": {
62
- "@djangocfg/api": "^2.1.91",
62
+ "@djangocfg/api": "^2.1.104",
63
63
  "@djangocfg/ext-base": "^1.0.8",
64
- "@djangocfg/ui-core": "^2.1.91",
65
- "@djangocfg/ui-nextjs": "^2.1.91",
64
+ "@djangocfg/ui-core": "^2.1.104",
66
65
  "consola": "^3.4.2",
67
66
  "lucide-react": "^0.545.0",
68
67
  "moment": "^2.30.1",
@@ -74,9 +73,10 @@
74
73
  "zod": "^4.1.13"
75
74
  },
76
75
  "devDependencies": {
77
- "@djangocfg/api": "^2.1.91",
76
+ "@djangocfg/api": "^2.1.104",
78
77
  "@djangocfg/ext-base": "^1.0.8",
79
- "@djangocfg/typescript-config": "^2.1.91",
78
+ "@djangocfg/ui-core": "^2.1.104",
79
+ "@djangocfg/typescript-config": "^2.1.104",
80
80
  "@types/node": "^24.7.2",
81
81
  "@types/react": "^19.0.0",
82
82
  "consola": "^3.4.2",
@@ -9,7 +9,7 @@
9
9
  import { ArrowLeft, LifeBuoy, Plus } from 'lucide-react';
10
10
  import React from 'react';
11
11
 
12
- import { Button, ResizableHandle, ResizablePanel, ResizablePanelGroup } from '@djangocfg/ui-nextjs';
12
+ import { Button, ResizableHandle, ResizablePanel, ResizablePanelGroup } from '@djangocfg/ui-core';
13
13
 
14
14
  import { SupportProvider } from '../../contexts/SupportContext';
15
15
  import { CreateTicketDialog, MessageInput, MessageList, TicketList } from './components';
@@ -14,7 +14,7 @@ import { z } from 'zod';
14
14
  import {
15
15
  Button, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, Form, FormControl,
16
16
  FormField, FormItem, FormLabel, FormMessage, Input, Textarea, useToast
17
- } from '@djangocfg/ui-nextjs';
17
+ } from '@djangocfg/ui-core';
18
18
  import { zodResolver } from '@hookform/resolvers/zod';
19
19
 
20
20
  import { supportLogger } from '../../../utils/logger';
@@ -8,7 +8,8 @@
8
8
  import { Send } from 'lucide-react';
9
9
  import React, { useState } from 'react';
10
10
 
11
- import { Button, Textarea, useToast } from '@djangocfg/ui-nextjs';
11
+ import { Button, Textarea } from '@djangocfg/ui-core';
12
+ import { useToast } from '@djangocfg/ui-core/hooks';
12
13
 
13
14
  import { supportLogger } from '../../../utils/logger';
14
15
  import { useSupportLayoutContext } from '../context';
@@ -12,7 +12,7 @@ import React, { useCallback, useEffect, useRef } from 'react';
12
12
  import { useAuth } from '@djangocfg/api/auth';
13
13
  import {
14
14
  Avatar, AvatarFallback, AvatarImage, Button, Card, CardContent, ScrollArea, Skeleton
15
- } from '@djangocfg/ui-nextjs';
15
+ } from '@djangocfg/ui-core';
16
16
 
17
17
  import { useSupportLayoutContext } from '../context';
18
18
  import { useInfiniteMessages } from '../hooks';
@@ -9,7 +9,7 @@ import { Clock, MessageSquare } from 'lucide-react';
9
9
  import moment from 'moment';
10
10
  import React from 'react';
11
11
 
12
- import { Badge, Card, CardContent } from '@djangocfg/ui-nextjs';
12
+ import { Badge, Card, CardContent } from '@djangocfg/ui-core';
13
13
  import { cn } from '@djangocfg/ui-core/lib';
14
14
 
15
15
  import type { Ticket } from '../../../api/generated/ext_support/_utils/schemas';
@@ -8,7 +8,7 @@
8
8
  import { Loader2, MessageSquare } from 'lucide-react';
9
9
  import React, { useEffect, useRef } from 'react';
10
10
 
11
- import { Button, ScrollArea, Skeleton } from '@djangocfg/ui-nextjs';
11
+ import { Button, ScrollArea, Skeleton } from '@djangocfg/ui-core';
12
12
 
13
13
  import { useSupportLayoutContext } from '../context';
14
14
  import { SUPPORT_LAYOUT_EVENTS } from '../events';