@seliseblocks/genesis-os 4.1.0 → 4.2.1

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{chunk-CC33UJZK.js → chunk-6RCHFJ4C.js} +18 -3
  3. package/dist/chunk-6RCHFJ4C.js.map +1 -0
  4. package/dist/{chunk-OSFMZAMZ.cjs → chunk-HTZX5UUU.cjs} +2 -2
  5. package/dist/chunk-HTZX5UUU.cjs.map +1 -0
  6. package/dist/{chunk-AL2E2WC4.cjs → chunk-JTSGZMKE.cjs} +19 -2
  7. package/dist/chunk-JTSGZMKE.cjs.map +1 -0
  8. package/dist/{chunk-UBF3PJTH.cjs → chunk-MSHCIIXL.cjs} +57 -2
  9. package/dist/chunk-MSHCIIXL.cjs.map +1 -0
  10. package/dist/{chunk-WITMGN3X.js → chunk-QWUCV4KF.js} +448 -48
  11. package/dist/chunk-QWUCV4KF.js.map +1 -0
  12. package/dist/{chunk-LQRMDLQK.js → chunk-RYEW56RI.js} +2 -2
  13. package/dist/chunk-RYEW56RI.js.map +1 -0
  14. package/dist/{chunk-I5JPC4MB.cjs → chunk-VNUHUNWE.cjs} +489 -80
  15. package/dist/chunk-VNUHUNWE.cjs.map +1 -0
  16. package/dist/{chunk-GUT2OEFQ.js → chunk-WKZJV3E7.js} +57 -3
  17. package/dist/chunk-WKZJV3E7.js.map +1 -0
  18. package/dist/components/index.cjs +380 -344
  19. package/dist/components/index.d.cts +92 -3
  20. package/dist/components/index.d.ts +92 -3
  21. package/dist/components/index.js +4 -4
  22. package/dist/guards/index.cjs +7 -7
  23. package/dist/guards/index.d.cts +2 -2
  24. package/dist/guards/index.d.ts +2 -2
  25. package/dist/guards/index.js +1 -1
  26. package/dist/hooks/index.cjs +43 -39
  27. package/dist/hooks/index.d.cts +1 -0
  28. package/dist/hooks/index.d.ts +1 -0
  29. package/dist/hooks/index.js +1 -1
  30. package/dist/index.cjs +444 -404
  31. package/dist/index.d.cts +2 -1
  32. package/dist/index.d.ts +2 -1
  33. package/dist/index.js +4 -4
  34. package/dist/layouts/index.cjs +11 -11
  35. package/dist/layouts/index.js +4 -4
  36. package/dist/pages/index.cjs +9 -9
  37. package/dist/pages/index.js +4 -4
  38. package/dist/providers/index.cjs +5 -5
  39. package/dist/providers/index.js +1 -1
  40. package/dist/use-keyboard-shortcut-BJCssC78.d.cts +17 -0
  41. package/dist/use-keyboard-shortcut-BJCssC78.d.ts +17 -0
  42. package/package.json +24 -23
  43. package/LICENSE +0 -21
  44. package/dist/chunk-AL2E2WC4.cjs.map +0 -1
  45. package/dist/chunk-CC33UJZK.js.map +0 -1
  46. package/dist/chunk-GUT2OEFQ.js.map +0 -1
  47. package/dist/chunk-I5JPC4MB.cjs.map +0 -1
  48. package/dist/chunk-LQRMDLQK.js.map +0 -1
  49. package/dist/chunk-OSFMZAMZ.cjs.map +0 -1
  50. package/dist/chunk-UBF3PJTH.cjs.map +0 -1
  51. package/dist/chunk-WITMGN3X.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { refractor } from './chunk-FGY7QM3Y.js';
2
- import { usePopoverWidth, useBlocksAppConfigStore, useTheme, useLogout, useGetMyOrganizations, useLanguageSwitcher, useGetBlocksNotificationConfig, notificationService, useLogo, useLogin, useInitiateRedirect, useIcon, initiateService, useGetNotifications, useMarkAsRead, useMarkAllAsRead, usePrefetchRedirect } from './chunk-GUT2OEFQ.js';
3
- import { showErrorToast, getForwardedToPath, formatFullDate, getProjectBlocksApiUrl, formatDate, debounce, deepEqual, showSuccessToast, isErrorWithErrors, getServiceBaseUrl, getServiceSwaggerUrl } from './chunk-M4AKVWL4.js';
4
- import { SidebarContext, DashboardLayoutProvider } from './chunk-CC33UJZK.js';
2
+ import { useKeyboardShortcut, usePopoverWidth, useBlocksAppConfigStore, useTheme, useLogout, useGetMyOrganizations, useLanguageSwitcher, useGetBlocksNotificationConfig, notificationService, useLogo, useLogin, useInitiateRedirect, useIcon, initiateService, useGetNotifications, useMarkAsRead, useMarkAllAsRead, usePrefetchRedirect } from './chunk-WKZJV3E7.js';
3
+ import { showErrorToast, getForwardedToPath, formatFullDate, formatDate, debounce, deepEqual, showSuccessToast, isErrorWithErrors, getServiceBaseUrl, getServiceSwaggerUrl } from './chunk-M4AKVWL4.js';
4
+ import { defaultAgentPanelContextValue, AgentPanelContext, SidebarContext, DashboardLayoutProvider } from './chunk-6RCHFJ4C.js';
5
5
  import { useIsMobile, useIsActiveMenu, useFilteredMenus } from './chunk-NF54AHIF.js';
6
- import { PublicGuard, ImpersonationChecker, ImpersonationTerminator, ImpersonationSynchronizer } from './chunk-LQRMDLQK.js';
6
+ import { PublicGuard, ImpersonationChecker, ImpersonationTerminator, ImpersonationSynchronizer } from './chunk-RYEW56RI.js';
7
7
  import { useStartImpersonation, useGetProjects, useGetProject, useGetEnvRepositories, useUpdateTenantGroup, useDisableProject, useUpdateRepositories } from './chunk-MCOK3TFE.js';
8
8
  import { getRuntimeEnv, fadeTransition, fadeInUp, staggerContainer, staggerItem, fadeInScale, iamClient, PROFILE_ENDPOINTS } from './chunk-GWZQFBJ5.js';
9
9
  import { cn, getQueryClient } from './chunk-MWEREW2W.js';
@@ -17,7 +17,7 @@ import { motion, AnimatePresence } from 'framer-motion';
17
17
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
18
18
  import { Slot } from '@radix-ui/react-slot';
19
19
  import { cva } from 'class-variance-authority';
20
- import { X, PanelLeft, Dot, Calendar as Calendar$1, ChevronDown, ChevronRight, Check, Circle, Search, Loader2, ArrowLeft, ArrowRight, EyeOff, Eye, Trash2, ChevronUp, ChevronsLeft, ChevronLeft, ChevronsRight, MoreHorizontal, Copy, GripVertical, TriangleAlert, Paperclip, ArrowDownToLine, Monitor, Sun, Moon, UserRound, Building2, LogOut, MenuIcon, HourglassIcon, ChevronRightIcon, Globe, Loader, FolderOpen, Edit, Menu, AlertCircle, Archive, LoaderCircle, CircleHelp, CalendarIcon, ArrowDown, ArrowUp, Filter, EllipsisVertical, RotateCcw, CloudUpload, Grip, Bell, Layers, BookOpenText, Plus, UsersRound, Settings2, ArrowUpRight, Pencil, Terminal } from 'lucide-react';
20
+ import { X, PanelLeft, MessageSquare, Dot, Calendar as Calendar$1, ChevronDown, ChevronRight, Check, Circle, Search, Loader2, ArrowLeft, ArrowRight, EyeOff, Eye, Trash2, ChevronUp, ChevronsLeft, ChevronLeft, ChevronsRight, MoreHorizontal, Copy, GripVertical, TriangleAlert, Paperclip, ArrowDownToLine, Monitor, Sun, Moon, UserRound, Building2, LogOut, MenuIcon, HourglassIcon, ChevronRightIcon, Globe, Loader, FolderOpen, Edit, Menu, AlertCircle, Archive, LoaderCircle, CircleHelp, CalendarIcon, ArrowDown, ArrowUp, Filter, EllipsisVertical, RotateCcw, CloudUpload, Grip, Bell, Layers, BookOpenText, Plus, UsersRound, Settings2, ArrowUpRight, Pencil, Terminal } from 'lucide-react';
21
21
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
22
22
  import * as SheetPrimitive from '@radix-ui/react-dialog';
23
23
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
@@ -1089,6 +1089,436 @@ var SidebarMenuSubButton = React8.forwardRef(({ asChild = false, size = "md", is
1089
1089
  );
1090
1090
  });
1091
1091
  SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
1092
+ function useAgentPanel() {
1093
+ return useContext(AgentPanelContext) ?? defaultAgentPanelContextValue;
1094
+ }
1095
+ function clampWidth(value, sizing) {
1096
+ if (typeof window === "undefined") return value;
1097
+ const min = parsePx(sizing.minWidth);
1098
+ const maxRaw = sizing.maxWidth.endsWith("vw") ? parseFloat(sizing.maxWidth) / 100 * window.innerWidth : parsePx(sizing.maxWidth);
1099
+ return Math.max(min, Math.min(maxRaw, value));
1100
+ }
1101
+ function parsePx(value) {
1102
+ if (typeof window === "undefined") return 0;
1103
+ const probe = document.createElement("div");
1104
+ probe.style.position = "absolute";
1105
+ probe.style.visibility = "hidden";
1106
+ probe.style.width = value;
1107
+ document.body.appendChild(probe);
1108
+ const px = probe.getBoundingClientRect().width;
1109
+ document.body.removeChild(probe);
1110
+ return px;
1111
+ }
1112
+ function DesktopPanel({
1113
+ className,
1114
+ ariaLabel,
1115
+ children,
1116
+ id
1117
+ }) {
1118
+ const { open, close, panelId, sizing, resizable, setLiveWidth } = useAgentPanel();
1119
+ const containerRef = React8.useRef(null);
1120
+ React8.useEffect(() => {
1121
+ if (!resizable) return;
1122
+ const node = containerRef.current;
1123
+ if (!node) return;
1124
+ let startX = 0;
1125
+ let startPx = 0;
1126
+ let widthPx = parsePx(sizing.width);
1127
+ const onMove = (event) => {
1128
+ const delta = startX - event.clientX;
1129
+ const next = clampWidth(startPx + delta, sizing);
1130
+ widthPx = next;
1131
+ setLiveWidth(`${next}px`);
1132
+ };
1133
+ const onUp = () => {
1134
+ document.removeEventListener("pointermove", onMove);
1135
+ document.removeEventListener("pointerup", onUp);
1136
+ node.style.setProperty("--agent-panel-resolved-width", `${widthPx}px`);
1137
+ };
1138
+ const onDown = (event) => {
1139
+ event.preventDefault();
1140
+ startX = event.clientX;
1141
+ const rect = node.getBoundingClientRect();
1142
+ startPx = rect.width;
1143
+ widthPx = startPx;
1144
+ document.addEventListener("pointermove", onMove);
1145
+ document.addEventListener("pointerup", onUp);
1146
+ };
1147
+ const handle = node.querySelector("[data-resize-handle]");
1148
+ if (!handle) return;
1149
+ handle.addEventListener("pointerdown", onDown);
1150
+ return () => {
1151
+ handle.removeEventListener("pointerdown", onDown);
1152
+ };
1153
+ }, [resizable, sizing, setLiveWidth]);
1154
+ return /* @__PURE__ */ jsx(
1155
+ SheetPrimitive.Root,
1156
+ {
1157
+ open,
1158
+ onOpenChange: (next) => {
1159
+ if (!next) close();
1160
+ },
1161
+ children: /* @__PURE__ */ jsx(SheetPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
1162
+ SheetPrimitive.Content,
1163
+ {
1164
+ id: id ?? panelId,
1165
+ ref: containerRef,
1166
+ "data-slot": "agent-panel",
1167
+ "data-state": open ? "open" : "closed",
1168
+ "aria-label": ariaLabel ?? "AI assistant",
1169
+ className: cn(
1170
+ "bg-background fixed inset-y-0 right-0 z-50 flex h-full flex-col border-l shadow-lg",
1171
+ "transition-[transform,width] duration-300 ease-in-out",
1172
+ "data-[state=closed]:translate-x-full data-[state=open]:translate-x-0",
1173
+ className
1174
+ ),
1175
+ style: {
1176
+ width: `var(--agent-panel-resolved-width, ${sizing.width})`,
1177
+ minWidth: sizing.minWidth,
1178
+ maxWidth: sizing.maxWidth
1179
+ },
1180
+ onPointerDownOutside: (event) => event.preventDefault(),
1181
+ onInteractOutside: (event) => event.preventDefault(),
1182
+ children: [
1183
+ children,
1184
+ resizable && /* @__PURE__ */ jsx(
1185
+ "div",
1186
+ {
1187
+ "data-resize-handle": true,
1188
+ role: "separator",
1189
+ "aria-orientation": "vertical",
1190
+ "aria-label": "Resize panel",
1191
+ className: "bg-border hover:bg-primary/50 absolute inset-y-0 left-0 w-1 cursor-ew-resize touch-none transition-colors"
1192
+ }
1193
+ )
1194
+ ]
1195
+ }
1196
+ ) })
1197
+ }
1198
+ );
1199
+ }
1200
+ function MobilePanel({
1201
+ ariaLabel,
1202
+ children,
1203
+ className,
1204
+ id
1205
+ }) {
1206
+ const { open, close, panelId } = useAgentPanel();
1207
+ return /* @__PURE__ */ jsx(
1208
+ Drawer$1.Root,
1209
+ {
1210
+ open,
1211
+ onOpenChange: (next) => {
1212
+ if (!next) close();
1213
+ },
1214
+ children: /* @__PURE__ */ jsxs(Drawer$1.Portal, { children: [
1215
+ /* @__PURE__ */ jsx(Drawer$1.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
1216
+ /* @__PURE__ */ jsxs(
1217
+ Drawer$1.Content,
1218
+ {
1219
+ id: id ?? panelId,
1220
+ "data-slot": "agent-panel",
1221
+ "data-state": open ? "open" : "closed",
1222
+ "aria-label": ariaLabel ?? "AI assistant",
1223
+ className: cn(
1224
+ "bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto max-h-[90vh] flex-col rounded-t-[10px] border",
1225
+ className
1226
+ ),
1227
+ children: [
1228
+ /* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
1229
+ children
1230
+ ]
1231
+ }
1232
+ )
1233
+ ] })
1234
+ }
1235
+ );
1236
+ }
1237
+ function AgentPanel({
1238
+ ariaLabel,
1239
+ className,
1240
+ children,
1241
+ content,
1242
+ id
1243
+ }) {
1244
+ const ctx = useAgentPanel();
1245
+ const body = content ? content({ close: ctx.close, open: ctx.open }) : children;
1246
+ if (ctx.isMobile) {
1247
+ return /* @__PURE__ */ jsx(MobilePanel, { ariaLabel, className, id, children: body });
1248
+ }
1249
+ return /* @__PURE__ */ jsx(DesktopPanel, { ariaLabel, className, id, children: body });
1250
+ }
1251
+ AgentPanel.displayName = "AgentPanel";
1252
+ var AgentPanelHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1253
+ "div",
1254
+ {
1255
+ ref,
1256
+ "data-slot": "agent-panel-header",
1257
+ className: cn(
1258
+ "flex shrink-0 items-start justify-between gap-3 border-b p-4",
1259
+ className
1260
+ ),
1261
+ ...props
1262
+ }
1263
+ ));
1264
+ AgentPanelHeader.displayName = "AgentPanelHeader";
1265
+ var AgentPanelTitle = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1266
+ "h2",
1267
+ {
1268
+ ref,
1269
+ "data-slot": "agent-panel-title",
1270
+ className: cn(
1271
+ "text-base font-semibold leading-none tracking-tight",
1272
+ className
1273
+ ),
1274
+ ...props
1275
+ }
1276
+ ));
1277
+ AgentPanelTitle.displayName = "AgentPanelTitle";
1278
+ var AgentPanelDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1279
+ "p",
1280
+ {
1281
+ ref,
1282
+ "data-slot": "agent-panel-description",
1283
+ className: cn("text-muted-foreground text-sm", className),
1284
+ ...props
1285
+ }
1286
+ ));
1287
+ AgentPanelDescription.displayName = "AgentPanelDescription";
1288
+ var AgentPanelClose = React8.forwardRef(({ className, ...props }, ref) => {
1289
+ const { isMobile, close } = useAgentPanel();
1290
+ const Comp = isMobile ? Drawer$1.Close : SheetPrimitive.Close;
1291
+ return /* @__PURE__ */ jsxs(
1292
+ Comp,
1293
+ {
1294
+ ref,
1295
+ "data-slot": "agent-panel-close",
1296
+ "aria-label": "Close panel",
1297
+ className: cn(
1298
+ "ring-offset-background focus:ring-ring rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2",
1299
+ className
1300
+ ),
1301
+ onClick: (event) => {
1302
+ props.onClick?.(event);
1303
+ if (!event.defaultPrevented) close();
1304
+ },
1305
+ ...props,
1306
+ children: [
1307
+ /* @__PURE__ */ jsx(X, { className: "h-4 w-4", "aria-hidden": true }),
1308
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
1309
+ ]
1310
+ }
1311
+ );
1312
+ });
1313
+ AgentPanelClose.displayName = "AgentPanelClose";
1314
+ var AgentPanelBody = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1315
+ "div",
1316
+ {
1317
+ ref,
1318
+ "data-slot": "agent-panel-body",
1319
+ className: cn("min-h-0 flex-1 overflow-y-auto p-4", className),
1320
+ ...props
1321
+ }
1322
+ ));
1323
+ AgentPanelBody.displayName = "AgentPanelBody";
1324
+ var AgentPanelFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1325
+ "div",
1326
+ {
1327
+ ref,
1328
+ "data-slot": "agent-panel-footer",
1329
+ className: cn("shrink-0 border-t p-4", className),
1330
+ ...props
1331
+ }
1332
+ ));
1333
+ AgentPanelFooter.displayName = "AgentPanelFooter";
1334
+ var HASH_PREFIX = "#";
1335
+ var DEFAULT_HASH_KEY = "agent";
1336
+ function parseWidth(value, fallback) {
1337
+ if (typeof value === "number") return `${value}px`;
1338
+ if (typeof value === "string" && value.trim().length > 0) return value;
1339
+ return fallback;
1340
+ }
1341
+ function AgentPanelProvider({
1342
+ children,
1343
+ defaultOpen = false,
1344
+ open: openProp,
1345
+ onOpenChange,
1346
+ syncHash = true,
1347
+ hashKey = DEFAULT_HASH_KEY,
1348
+ shortcut = "mod+j",
1349
+ width = "24rem",
1350
+ minWidth = "20rem",
1351
+ maxWidth = "50vw",
1352
+ resizable = false,
1353
+ panelId,
1354
+ className,
1355
+ style
1356
+ }) {
1357
+ const isMobile = useIsMobile();
1358
+ const isControlled = openProp !== void 0;
1359
+ const generatedId = React8.useId();
1360
+ const resolvedPanelId = panelId ?? `agent-panel-${generatedId}`;
1361
+ const sizing = React8.useMemo(
1362
+ () => ({
1363
+ width: parseWidth(width, "24rem"),
1364
+ minWidth: parseWidth(minWidth, "20rem"),
1365
+ maxWidth: parseWidth(maxWidth, "50vw")
1366
+ }),
1367
+ [width, minWidth, maxWidth]
1368
+ );
1369
+ const readHash = React8.useCallback(() => {
1370
+ if (typeof window === "undefined") return false;
1371
+ const hash = window.location.hash.replace(/^#/, "");
1372
+ return hash === hashKey || hash.startsWith(`${hashKey}?`);
1373
+ }, [hashKey]);
1374
+ const [internalOpen, setInternalOpen] = React8.useState(() => {
1375
+ if (isControlled) return Boolean(openProp);
1376
+ if (syncHash) {
1377
+ const fromHash = readHash();
1378
+ return fromHash || defaultOpen;
1379
+ }
1380
+ return defaultOpen;
1381
+ });
1382
+ const open = isControlled ? Boolean(openProp) : internalOpen;
1383
+ const setOpen = React8.useCallback(
1384
+ (next) => {
1385
+ const resolved = typeof next === "function" ? next(open) : next;
1386
+ if (!isControlled) {
1387
+ setInternalOpen(resolved);
1388
+ }
1389
+ onOpenChange?.(resolved);
1390
+ },
1391
+ [isControlled, onOpenChange, open]
1392
+ );
1393
+ const toggle = React8.useCallback(() => {
1394
+ setOpen((prev) => !prev);
1395
+ }, [setOpen]);
1396
+ const close = React8.useCallback(() => {
1397
+ setOpen(false);
1398
+ }, [setOpen]);
1399
+ const [liveWidth, setLiveWidth] = React8.useState("0px");
1400
+ useKeyboardShortcut(shortcut, toggle);
1401
+ React8.useEffect(() => {
1402
+ if (!syncHash || isControlled || typeof window === "undefined") return;
1403
+ const handleHashChange = () => {
1404
+ const next = readHash();
1405
+ setInternalOpen((prev) => prev === next ? prev : next);
1406
+ };
1407
+ window.addEventListener("hashchange", handleHashChange);
1408
+ return () => window.removeEventListener("hashchange", handleHashChange);
1409
+ }, [syncHash, isControlled, readHash]);
1410
+ React8.useEffect(() => {
1411
+ if (!syncHash || isControlled || typeof window === "undefined") return;
1412
+ const current = window.location.hash.replace(/^#/, "");
1413
+ const desired = open ? hashKey : "";
1414
+ if (open && current !== hashKey) {
1415
+ window.history.replaceState(null, "", `${HASH_PREFIX}${desired}`);
1416
+ } else if (!open && current === hashKey) {
1417
+ window.history.replaceState(
1418
+ null,
1419
+ "",
1420
+ window.location.pathname + window.location.search
1421
+ );
1422
+ }
1423
+ }, [open, syncHash, isControlled, hashKey]);
1424
+ React8.useEffect(() => {
1425
+ if (!open) setLiveWidth("0px");
1426
+ }, [open]);
1427
+ const contextValue = React8.useMemo(
1428
+ () => ({
1429
+ open,
1430
+ setOpen,
1431
+ toggle,
1432
+ close,
1433
+ sizing,
1434
+ liveWidth,
1435
+ setLiveWidth,
1436
+ resizable,
1437
+ panelId: resolvedPanelId,
1438
+ isMobile
1439
+ }),
1440
+ [
1441
+ open,
1442
+ setOpen,
1443
+ toggle,
1444
+ close,
1445
+ sizing,
1446
+ liveWidth,
1447
+ resizable,
1448
+ resolvedPanelId,
1449
+ isMobile
1450
+ ]
1451
+ );
1452
+ return /* @__PURE__ */ jsx(AgentPanelContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
1453
+ "div",
1454
+ {
1455
+ "data-slot": "agent-panel-provider",
1456
+ "data-state": open ? "open" : "closed",
1457
+ "data-panel-id": resolvedPanelId,
1458
+ className: cn("relative w-full", className),
1459
+ style: {
1460
+ "--agent-panel-width": open ? resizable ? liveWidth : sizing.width : "0px",
1461
+ "--agent-panel-min-width": sizing.minWidth,
1462
+ "--agent-panel-max-width": sizing.maxWidth,
1463
+ "--agent-panel-live-width": liveWidth,
1464
+ ...style
1465
+ },
1466
+ children
1467
+ }
1468
+ ) });
1469
+ }
1470
+ var positionClasses = {
1471
+ "bottom-right": "fixed bottom-4 right-4 z-40 rounded-full shadow-lg transition-[right] duration-300 ease-in-out data-[state=open]:right-[var(--agent-panel-width,0px)]",
1472
+ "bottom-left": "fixed bottom-4 left-4 z-40 rounded-full shadow-lg transition-[left] duration-300 ease-in-out data-[state=open]:left-[var(--agent-panel-width,0px)]",
1473
+ inline: "relative"
1474
+ };
1475
+ var AgentPanelTrigger = React8.forwardRef(
1476
+ ({
1477
+ asChild = false,
1478
+ position = "bottom-right",
1479
+ icon,
1480
+ label,
1481
+ ariaLabel,
1482
+ className,
1483
+ children,
1484
+ onClick,
1485
+ type,
1486
+ ...props
1487
+ }, ref) => {
1488
+ const { open, toggle, panelId } = useAgentPanel();
1489
+ const Comp = asChild ? Slot : Button;
1490
+ const isFloating = position !== "inline";
1491
+ const computedLabel = ariaLabel ?? label ?? "Toggle AI assistant";
1492
+ const handleClick = (event) => {
1493
+ onClick?.(event);
1494
+ if (!event.defaultPrevented) toggle();
1495
+ };
1496
+ return /* @__PURE__ */ jsx(
1497
+ Comp,
1498
+ {
1499
+ ref,
1500
+ type: asChild ? void 0 : type ?? "button",
1501
+ "data-slot": "agent-panel-trigger",
1502
+ "data-state": open ? "open" : "closed",
1503
+ "aria-label": computedLabel,
1504
+ "aria-expanded": open,
1505
+ "aria-controls": panelId,
1506
+ onClick: handleClick,
1507
+ className: cn(
1508
+ isFloating && positionClasses[position],
1509
+ !isFloating && "data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
1510
+ className
1511
+ ),
1512
+ ...props,
1513
+ children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
1514
+ icon ?? /* @__PURE__ */ jsx(MessageSquare, { className: "h-5 w-5", "aria-hidden": true }),
1515
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: computedLabel })
1516
+ ] })
1517
+ }
1518
+ );
1519
+ }
1520
+ );
1521
+ AgentPanelTrigger.displayName = "AgentPanelTrigger";
1092
1522
  var Drawer = ({
1093
1523
  shouldScaleBackground = true,
1094
1524
  ...props
@@ -7113,7 +7543,7 @@ function DashboardLayout({
7113
7543
  navigationMenus,
7114
7544
  forwardedTo
7115
7545
  }) {
7116
- const content = /* @__PURE__ */ jsx(DashboardLayoutProvider, { isOpen: true, persist: true, children: /* @__PURE__ */ jsxs("div", { className: "flex w-full overflow-hidden", children: [
7546
+ const content = /* @__PURE__ */ jsx(DashboardLayoutProvider, { isOpen: true, persist: true, children: /* @__PURE__ */ jsx(AgentPanelProvider, { children: /* @__PURE__ */ jsxs("div", { className: "flex w-full overflow-hidden", children: [
7117
7547
  /* @__PURE__ */ jsx(
7118
7548
  SidebarMenuDesktop,
7119
7549
  {
@@ -7130,9 +7560,16 @@ function DashboardLayout({
7130
7560
  forwardedTo
7131
7561
  }
7132
7562
  ),
7133
- /* @__PURE__ */ jsx("div", { className: "relative flex min-h-0 w-full flex-1 overflow-hidden bg-[hsl(var(--surface-app))]", children: /* @__PURE__ */ jsx("div", { className: "min-h-0 w-full flex-1 overflow-y-auto overflow-x-hidden", children }) })
7563
+ /* @__PURE__ */ jsx("div", { className: "relative flex min-h-0 w-full flex-1 overflow-hidden bg-[hsl(var(--surface-app))]", children: /* @__PURE__ */ jsx(
7564
+ "div",
7565
+ {
7566
+ "data-slot": "dashboard-main",
7567
+ className: "min-h-0 w-full flex-1 overflow-y-auto overflow-x-hidden transition-[margin] duration-300 ease-in-out lg:mr-[var(--agent-panel-width)]",
7568
+ children
7569
+ }
7570
+ ) })
7134
7571
  ] })
7135
- ] }) });
7572
+ ] }) }) });
7136
7573
  return /* @__PURE__ */ jsx(ImpersonationChecker, { children: /* @__PURE__ */ jsx(ImpersonationSynchronizer, { children: wrapper ? wrapper(content) : content }) });
7137
7574
  }
7138
7575
  var DEFAULT_EXCLUDE_PREFIXES = ["/app/project"];
@@ -9577,43 +10014,6 @@ var ProjectRepoList = ({
9577
10014
  }
9578
10015
  );
9579
10016
  };
9580
- var LoadingSkeleton2 = () => /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { className: "p-6", children: [
9581
- /* @__PURE__ */ jsxs("div", { children: [
9582
- /* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-1/4" }),
9583
- /* @__PURE__ */ jsx(Skeleton, { className: "mt-2 h-6 w-full" })
9584
- ] }),
9585
- /* @__PURE__ */ jsxs("div", { className: "mt-6", children: [
9586
- /* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-1/4" }),
9587
- /* @__PURE__ */ jsx(Skeleton, { className: "mt-2 h-6 w-full" })
9588
- ] })
9589
- ] }) });
9590
- var ProjectCliSnippet = () => {
9591
- const { data: data2, isLoading } = useGetProject();
9592
- const cliSetupCommand = "npm install -g @seliseblocks/cli";
9593
- const blocksMicroservicesUrl = getProjectBlocksApiUrl(data2?.data);
9594
- const projectSetupCommand = `blocks new web ${data2?.data.name.replaceAll(" ", "_").toLowerCase()} --x-blocks-key ${data2?.data.tenantId} --app-domain ${data2?.data.customDomain} --project-slug ${data2?.data.tenantSlug || ""} --blocks-api-url ${blocksMicroservicesUrl}`.trim();
9595
- if (isLoading) return /* @__PURE__ */ jsx(LoadingSkeleton2, {});
9596
- return /* @__PURE__ */ jsxs(Card, { children: [
9597
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Frontend Setup commands" }) }),
9598
- /* @__PURE__ */ jsxs(CardContent, { children: [
9599
- /* @__PURE__ */ jsxs("div", { children: [
9600
- "If you have the Blocks CLI already installed, run:",
9601
- /* @__PURE__ */ jsx(CopyableSnippet, { code: projectSetupCommand, isCopyable: true })
9602
- ] }),
9603
- /* @__PURE__ */ jsxs("div", { className: "mt-6", children: [
9604
- "If you haven't installed the CLI yet, install it globally using npm, then run the command:",
9605
- /* @__PURE__ */ jsx(
9606
- CopyableSnippet,
9607
- {
9608
- code: `${cliSetupCommand}
9609
- ${projectSetupCommand}`,
9610
- isCopyable: true
9611
- }
9612
- )
9613
- ] })
9614
- ] })
9615
- ] });
9616
- };
9617
10017
  var ProjectActions = ({
9618
10018
  isDisabled,
9619
10019
  createdBy,
@@ -11805,6 +12205,6 @@ var TablePagination2 = React8.forwardRef(
11805
12205
  );
11806
12206
  TablePagination2.displayName = "TablePagination";
11807
12207
 
11808
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppSwitcher, ArchiveProject, AspectRatio, AuthLayout, Avatar, AvatarFallback, AvatarImage, BackToConsoleNavigator, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CallbackPage, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmationModal, ConsoleHeader, ConsoleLayout, ConsolePage, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyToClipboardButton, CopyableSnippet, DEFAULT_KANBAN_COLUMNS, DashboardHeader, DashboardLayout, DashboardOverview, DashboardRoute, DashboardSectionCard, DataTable, DataTableHeaderCell, DateRangePicker, DesktopMenuItem, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditProject, EditProjectDialog, EditProjectForm, EnvironmentCard, EnvironmentList, ErrorBoundary, ErrorDisplay, ErrorDisplayWithCard, FileInput, FileUploader, FileUploaderContent, FileUploaderItem, FilterControls, FilterToolBarMobileView, FilterToolbar, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, ImportFileModalContent, InfiniteScroll, InfiniteScroller, InfoTooltip, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, KanbanBoard, KanbanBoardColumn, KanbanBoardContainer, KanbanTaskCard, Label, LanguageSelector, LoadingButton, LoginPage, Logo, MaskedText, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MobileMenuItem, MultiSelect, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Notification, OidcLayout, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Popover, PopoverContent, PopoverTrigger, ProfilePage, Progress, ProjectActions, ProjectCardLoadingSkeleton, ProjectCliSnippet, ProjectDetail, ProjectList, ProjectOverview, ProjectRepoList, PublicLayout, RadioGroup4 as RadioGroup, RadioGroupItem, RenderAlternatively, RenderConditionally, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectedEnvironment, SelectedProject, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarCollapsedTooltip, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuDesktop, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarMobileView, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableLoadingSkeleton, TablePagination2 as TablePagination, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeSwitcher, Timeline, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserDropdownMenu, WizardHorizontalTrackBar, WizardStepContent, WizardStepIndicator, WizardStepViewport, WizardStepperProvider, WizardVerticalTrackBar, badgeVariants, buttonVariants, editProjectFormDefaultValues, editProjectFormSchema, filteredAppSwitcherData, hasDraggableData, kanbanKeyboardCoordinateGetter, navigationMenuTriggerStyle, paginationQueryParsers, sidebarCollapsedTooltipClass, sortQueryParsers, spinnerVariants, toggleVariants, useFileUpload, useFormField, useNotificationSocket, useOidcContext, usePaginationQueryParams, useSortQueryParams, useWizardStepper };
11809
- //# sourceMappingURL=chunk-WITMGN3X.js.map
11810
- //# sourceMappingURL=chunk-WITMGN3X.js.map
12208
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AgentPanel, AgentPanelBody, AgentPanelClose, AgentPanelDescription, AgentPanelFooter, AgentPanelHeader, AgentPanelProvider, AgentPanelTitle, AgentPanelTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppSwitcher, ArchiveProject, AspectRatio, AuthLayout, Avatar, AvatarFallback, AvatarImage, BackToConsoleNavigator, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CallbackPage, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmationModal, ConsoleHeader, ConsoleLayout, ConsolePage, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyToClipboardButton, CopyableSnippet, DEFAULT_KANBAN_COLUMNS, DashboardHeader, DashboardLayout, DashboardOverview, DashboardRoute, DashboardSectionCard, DataTable, DataTableHeaderCell, DateRangePicker, DesktopMenuItem, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditProject, EditProjectDialog, EditProjectForm, EnvironmentCard, EnvironmentList, ErrorBoundary, ErrorDisplay, ErrorDisplayWithCard, FileInput, FileUploader, FileUploaderContent, FileUploaderItem, FilterControls, FilterToolBarMobileView, FilterToolbar, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, ImportFileModalContent, InfiniteScroll, InfiniteScroller, InfoTooltip, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, KanbanBoard, KanbanBoardColumn, KanbanBoardContainer, KanbanTaskCard, Label, LanguageSelector, LoadingButton, LoginPage, Logo, MaskedText, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MobileMenuItem, MultiSelect, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Notification, OidcLayout, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Popover, PopoverContent, PopoverTrigger, ProfilePage, Progress, ProjectActions, ProjectCardLoadingSkeleton, ProjectDetail, ProjectList, ProjectOverview, ProjectRepoList, PublicLayout, RadioGroup4 as RadioGroup, RadioGroupItem, RenderAlternatively, RenderConditionally, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectedEnvironment, SelectedProject, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarCollapsedTooltip, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuDesktop, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarMobileView, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableLoadingSkeleton, TablePagination2 as TablePagination, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeSwitcher, Timeline, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserDropdownMenu, WizardHorizontalTrackBar, WizardStepContent, WizardStepIndicator, WizardStepViewport, WizardStepperProvider, WizardVerticalTrackBar, badgeVariants, buttonVariants, editProjectFormDefaultValues, editProjectFormSchema, filteredAppSwitcherData, hasDraggableData, kanbanKeyboardCoordinateGetter, navigationMenuTriggerStyle, paginationQueryParsers, sidebarCollapsedTooltipClass, sortQueryParsers, spinnerVariants, toggleVariants, useAgentPanel, useFileUpload, useFormField, useNotificationSocket, useOidcContext, usePaginationQueryParams, useSortQueryParams, useWizardStepper };
12209
+ //# sourceMappingURL=chunk-QWUCV4KF.js.map
12210
+ //# sourceMappingURL=chunk-QWUCV4KF.js.map