@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.
- package/CHANGELOG.md +6 -0
- package/dist/{chunk-CC33UJZK.js → chunk-6RCHFJ4C.js} +18 -3
- package/dist/chunk-6RCHFJ4C.js.map +1 -0
- package/dist/{chunk-OSFMZAMZ.cjs → chunk-HTZX5UUU.cjs} +2 -2
- package/dist/chunk-HTZX5UUU.cjs.map +1 -0
- package/dist/{chunk-AL2E2WC4.cjs → chunk-JTSGZMKE.cjs} +19 -2
- package/dist/chunk-JTSGZMKE.cjs.map +1 -0
- package/dist/{chunk-UBF3PJTH.cjs → chunk-MSHCIIXL.cjs} +57 -2
- package/dist/chunk-MSHCIIXL.cjs.map +1 -0
- package/dist/{chunk-WITMGN3X.js → chunk-QWUCV4KF.js} +448 -48
- package/dist/chunk-QWUCV4KF.js.map +1 -0
- package/dist/{chunk-LQRMDLQK.js → chunk-RYEW56RI.js} +2 -2
- package/dist/chunk-RYEW56RI.js.map +1 -0
- package/dist/{chunk-I5JPC4MB.cjs → chunk-VNUHUNWE.cjs} +489 -80
- package/dist/chunk-VNUHUNWE.cjs.map +1 -0
- package/dist/{chunk-GUT2OEFQ.js → chunk-WKZJV3E7.js} +57 -3
- package/dist/chunk-WKZJV3E7.js.map +1 -0
- package/dist/components/index.cjs +380 -344
- package/dist/components/index.d.cts +92 -3
- package/dist/components/index.d.ts +92 -3
- package/dist/components/index.js +4 -4
- package/dist/guards/index.cjs +7 -7
- package/dist/guards/index.d.cts +2 -2
- package/dist/guards/index.d.ts +2 -2
- package/dist/guards/index.js +1 -1
- package/dist/hooks/index.cjs +43 -39
- package/dist/hooks/index.d.cts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +444 -404
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -4
- package/dist/layouts/index.cjs +11 -11
- package/dist/layouts/index.js +4 -4
- package/dist/pages/index.cjs +9 -9
- package/dist/pages/index.js +4 -4
- package/dist/providers/index.cjs +5 -5
- package/dist/providers/index.js +1 -1
- package/dist/use-keyboard-shortcut-BJCssC78.d.cts +17 -0
- package/dist/use-keyboard-shortcut-BJCssC78.d.ts +17 -0
- package/package.json +24 -23
- package/LICENSE +0 -21
- package/dist/chunk-AL2E2WC4.cjs.map +0 -1
- package/dist/chunk-CC33UJZK.js.map +0 -1
- package/dist/chunk-GUT2OEFQ.js.map +0 -1
- package/dist/chunk-I5JPC4MB.cjs.map +0 -1
- package/dist/chunk-LQRMDLQK.js.map +0 -1
- package/dist/chunk-OSFMZAMZ.cjs.map +0 -1
- package/dist/chunk-UBF3PJTH.cjs.map +0 -1
- package/dist/chunk-WITMGN3X.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkXJ6DPUCV_cjs = require('./chunk-XJ6DPUCV.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkMSHCIIXL_cjs = require('./chunk-MSHCIIXL.cjs');
|
|
5
5
|
var chunkZ6N3Y5AQ_cjs = require('./chunk-Z6N3Y5AQ.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkJTSGZMKE_cjs = require('./chunk-JTSGZMKE.cjs');
|
|
7
7
|
var chunkQ7Y32IBM_cjs = require('./chunk-Q7Y32IBM.cjs');
|
|
8
|
-
var
|
|
8
|
+
var chunkHTZX5UUU_cjs = require('./chunk-HTZX5UUU.cjs');
|
|
9
9
|
var chunkPSATBGVF_cjs = require('./chunk-PSATBGVF.cjs');
|
|
10
10
|
var chunkHF24SZFI_cjs = require('./chunk-HF24SZFI.cjs');
|
|
11
11
|
var chunkSDWR3F3Y_cjs = require('./chunk-SDWR3F3Y.cjs');
|
|
@@ -1140,6 +1140,436 @@ var SidebarMenuSubButton = React8__namespace.forwardRef(({ asChild = false, size
|
|
|
1140
1140
|
);
|
|
1141
1141
|
});
|
|
1142
1142
|
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
1143
|
+
function useAgentPanel() {
|
|
1144
|
+
return React8.useContext(chunkJTSGZMKE_cjs.AgentPanelContext) ?? chunkJTSGZMKE_cjs.defaultAgentPanelContextValue;
|
|
1145
|
+
}
|
|
1146
|
+
function clampWidth(value, sizing) {
|
|
1147
|
+
if (typeof window === "undefined") return value;
|
|
1148
|
+
const min = parsePx(sizing.minWidth);
|
|
1149
|
+
const maxRaw = sizing.maxWidth.endsWith("vw") ? parseFloat(sizing.maxWidth) / 100 * window.innerWidth : parsePx(sizing.maxWidth);
|
|
1150
|
+
return Math.max(min, Math.min(maxRaw, value));
|
|
1151
|
+
}
|
|
1152
|
+
function parsePx(value) {
|
|
1153
|
+
if (typeof window === "undefined") return 0;
|
|
1154
|
+
const probe = document.createElement("div");
|
|
1155
|
+
probe.style.position = "absolute";
|
|
1156
|
+
probe.style.visibility = "hidden";
|
|
1157
|
+
probe.style.width = value;
|
|
1158
|
+
document.body.appendChild(probe);
|
|
1159
|
+
const px = probe.getBoundingClientRect().width;
|
|
1160
|
+
document.body.removeChild(probe);
|
|
1161
|
+
return px;
|
|
1162
|
+
}
|
|
1163
|
+
function DesktopPanel({
|
|
1164
|
+
className,
|
|
1165
|
+
ariaLabel,
|
|
1166
|
+
children,
|
|
1167
|
+
id
|
|
1168
|
+
}) {
|
|
1169
|
+
const { open, close, panelId, sizing, resizable, setLiveWidth } = useAgentPanel();
|
|
1170
|
+
const containerRef = React8__namespace.useRef(null);
|
|
1171
|
+
React8__namespace.useEffect(() => {
|
|
1172
|
+
if (!resizable) return;
|
|
1173
|
+
const node = containerRef.current;
|
|
1174
|
+
if (!node) return;
|
|
1175
|
+
let startX = 0;
|
|
1176
|
+
let startPx = 0;
|
|
1177
|
+
let widthPx = parsePx(sizing.width);
|
|
1178
|
+
const onMove = (event) => {
|
|
1179
|
+
const delta = startX - event.clientX;
|
|
1180
|
+
const next = clampWidth(startPx + delta, sizing);
|
|
1181
|
+
widthPx = next;
|
|
1182
|
+
setLiveWidth(`${next}px`);
|
|
1183
|
+
};
|
|
1184
|
+
const onUp = () => {
|
|
1185
|
+
document.removeEventListener("pointermove", onMove);
|
|
1186
|
+
document.removeEventListener("pointerup", onUp);
|
|
1187
|
+
node.style.setProperty("--agent-panel-resolved-width", `${widthPx}px`);
|
|
1188
|
+
};
|
|
1189
|
+
const onDown = (event) => {
|
|
1190
|
+
event.preventDefault();
|
|
1191
|
+
startX = event.clientX;
|
|
1192
|
+
const rect = node.getBoundingClientRect();
|
|
1193
|
+
startPx = rect.width;
|
|
1194
|
+
widthPx = startPx;
|
|
1195
|
+
document.addEventListener("pointermove", onMove);
|
|
1196
|
+
document.addEventListener("pointerup", onUp);
|
|
1197
|
+
};
|
|
1198
|
+
const handle = node.querySelector("[data-resize-handle]");
|
|
1199
|
+
if (!handle) return;
|
|
1200
|
+
handle.addEventListener("pointerdown", onDown);
|
|
1201
|
+
return () => {
|
|
1202
|
+
handle.removeEventListener("pointerdown", onDown);
|
|
1203
|
+
};
|
|
1204
|
+
}, [resizable, sizing, setLiveWidth]);
|
|
1205
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1206
|
+
SheetPrimitive__namespace.Root,
|
|
1207
|
+
{
|
|
1208
|
+
open,
|
|
1209
|
+
onOpenChange: (next) => {
|
|
1210
|
+
if (!next) close();
|
|
1211
|
+
},
|
|
1212
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1213
|
+
SheetPrimitive__namespace.Content,
|
|
1214
|
+
{
|
|
1215
|
+
id: id ?? panelId,
|
|
1216
|
+
ref: containerRef,
|
|
1217
|
+
"data-slot": "agent-panel",
|
|
1218
|
+
"data-state": open ? "open" : "closed",
|
|
1219
|
+
"aria-label": ariaLabel ?? "AI assistant",
|
|
1220
|
+
className: chunkSDWR3F3Y_cjs.cn(
|
|
1221
|
+
"bg-background fixed inset-y-0 right-0 z-50 flex h-full flex-col border-l shadow-lg",
|
|
1222
|
+
"transition-[transform,width] duration-300 ease-in-out",
|
|
1223
|
+
"data-[state=closed]:translate-x-full data-[state=open]:translate-x-0",
|
|
1224
|
+
className
|
|
1225
|
+
),
|
|
1226
|
+
style: {
|
|
1227
|
+
width: `var(--agent-panel-resolved-width, ${sizing.width})`,
|
|
1228
|
+
minWidth: sizing.minWidth,
|
|
1229
|
+
maxWidth: sizing.maxWidth
|
|
1230
|
+
},
|
|
1231
|
+
onPointerDownOutside: (event) => event.preventDefault(),
|
|
1232
|
+
onInteractOutside: (event) => event.preventDefault(),
|
|
1233
|
+
children: [
|
|
1234
|
+
children,
|
|
1235
|
+
resizable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1236
|
+
"div",
|
|
1237
|
+
{
|
|
1238
|
+
"data-resize-handle": true,
|
|
1239
|
+
role: "separator",
|
|
1240
|
+
"aria-orientation": "vertical",
|
|
1241
|
+
"aria-label": "Resize panel",
|
|
1242
|
+
className: "bg-border hover:bg-primary/50 absolute inset-y-0 left-0 w-1 cursor-ew-resize touch-none transition-colors"
|
|
1243
|
+
}
|
|
1244
|
+
)
|
|
1245
|
+
]
|
|
1246
|
+
}
|
|
1247
|
+
) })
|
|
1248
|
+
}
|
|
1249
|
+
);
|
|
1250
|
+
}
|
|
1251
|
+
function MobilePanel({
|
|
1252
|
+
ariaLabel,
|
|
1253
|
+
children,
|
|
1254
|
+
className,
|
|
1255
|
+
id
|
|
1256
|
+
}) {
|
|
1257
|
+
const { open, close, panelId } = useAgentPanel();
|
|
1258
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1259
|
+
vaul.Drawer.Root,
|
|
1260
|
+
{
|
|
1261
|
+
open,
|
|
1262
|
+
onOpenChange: (next) => {
|
|
1263
|
+
if (!next) close();
|
|
1264
|
+
},
|
|
1265
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(vaul.Drawer.Portal, { children: [
|
|
1266
|
+
/* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
1267
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1268
|
+
vaul.Drawer.Content,
|
|
1269
|
+
{
|
|
1270
|
+
id: id ?? panelId,
|
|
1271
|
+
"data-slot": "agent-panel",
|
|
1272
|
+
"data-state": open ? "open" : "closed",
|
|
1273
|
+
"aria-label": ariaLabel ?? "AI assistant",
|
|
1274
|
+
className: chunkSDWR3F3Y_cjs.cn(
|
|
1275
|
+
"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto max-h-[90vh] flex-col rounded-t-[10px] border",
|
|
1276
|
+
className
|
|
1277
|
+
),
|
|
1278
|
+
children: [
|
|
1279
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
1280
|
+
children
|
|
1281
|
+
]
|
|
1282
|
+
}
|
|
1283
|
+
)
|
|
1284
|
+
] })
|
|
1285
|
+
}
|
|
1286
|
+
);
|
|
1287
|
+
}
|
|
1288
|
+
function AgentPanel({
|
|
1289
|
+
ariaLabel,
|
|
1290
|
+
className,
|
|
1291
|
+
children,
|
|
1292
|
+
content,
|
|
1293
|
+
id
|
|
1294
|
+
}) {
|
|
1295
|
+
const ctx = useAgentPanel();
|
|
1296
|
+
const body = content ? content({ close: ctx.close, open: ctx.open }) : children;
|
|
1297
|
+
if (ctx.isMobile) {
|
|
1298
|
+
return /* @__PURE__ */ jsxRuntime.jsx(MobilePanel, { ariaLabel, className, id, children: body });
|
|
1299
|
+
}
|
|
1300
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DesktopPanel, { ariaLabel, className, id, children: body });
|
|
1301
|
+
}
|
|
1302
|
+
AgentPanel.displayName = "AgentPanel";
|
|
1303
|
+
var AgentPanelHeader = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1304
|
+
"div",
|
|
1305
|
+
{
|
|
1306
|
+
ref,
|
|
1307
|
+
"data-slot": "agent-panel-header",
|
|
1308
|
+
className: chunkSDWR3F3Y_cjs.cn(
|
|
1309
|
+
"flex shrink-0 items-start justify-between gap-3 border-b p-4",
|
|
1310
|
+
className
|
|
1311
|
+
),
|
|
1312
|
+
...props
|
|
1313
|
+
}
|
|
1314
|
+
));
|
|
1315
|
+
AgentPanelHeader.displayName = "AgentPanelHeader";
|
|
1316
|
+
var AgentPanelTitle = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1317
|
+
"h2",
|
|
1318
|
+
{
|
|
1319
|
+
ref,
|
|
1320
|
+
"data-slot": "agent-panel-title",
|
|
1321
|
+
className: chunkSDWR3F3Y_cjs.cn(
|
|
1322
|
+
"text-base font-semibold leading-none tracking-tight",
|
|
1323
|
+
className
|
|
1324
|
+
),
|
|
1325
|
+
...props
|
|
1326
|
+
}
|
|
1327
|
+
));
|
|
1328
|
+
AgentPanelTitle.displayName = "AgentPanelTitle";
|
|
1329
|
+
var AgentPanelDescription = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1330
|
+
"p",
|
|
1331
|
+
{
|
|
1332
|
+
ref,
|
|
1333
|
+
"data-slot": "agent-panel-description",
|
|
1334
|
+
className: chunkSDWR3F3Y_cjs.cn("text-muted-foreground text-sm", className),
|
|
1335
|
+
...props
|
|
1336
|
+
}
|
|
1337
|
+
));
|
|
1338
|
+
AgentPanelDescription.displayName = "AgentPanelDescription";
|
|
1339
|
+
var AgentPanelClose = React8__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1340
|
+
const { isMobile, close } = useAgentPanel();
|
|
1341
|
+
const Comp = isMobile ? vaul.Drawer.Close : SheetPrimitive__namespace.Close;
|
|
1342
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1343
|
+
Comp,
|
|
1344
|
+
{
|
|
1345
|
+
ref,
|
|
1346
|
+
"data-slot": "agent-panel-close",
|
|
1347
|
+
"aria-label": "Close panel",
|
|
1348
|
+
className: chunkSDWR3F3Y_cjs.cn(
|
|
1349
|
+
"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",
|
|
1350
|
+
className
|
|
1351
|
+
),
|
|
1352
|
+
onClick: (event) => {
|
|
1353
|
+
props.onClick?.(event);
|
|
1354
|
+
if (!event.defaultPrevented) close();
|
|
1355
|
+
},
|
|
1356
|
+
...props,
|
|
1357
|
+
children: [
|
|
1358
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4", "aria-hidden": true }),
|
|
1359
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
1360
|
+
]
|
|
1361
|
+
}
|
|
1362
|
+
);
|
|
1363
|
+
});
|
|
1364
|
+
AgentPanelClose.displayName = "AgentPanelClose";
|
|
1365
|
+
var AgentPanelBody = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1366
|
+
"div",
|
|
1367
|
+
{
|
|
1368
|
+
ref,
|
|
1369
|
+
"data-slot": "agent-panel-body",
|
|
1370
|
+
className: chunkSDWR3F3Y_cjs.cn("min-h-0 flex-1 overflow-y-auto p-4", className),
|
|
1371
|
+
...props
|
|
1372
|
+
}
|
|
1373
|
+
));
|
|
1374
|
+
AgentPanelBody.displayName = "AgentPanelBody";
|
|
1375
|
+
var AgentPanelFooter = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1376
|
+
"div",
|
|
1377
|
+
{
|
|
1378
|
+
ref,
|
|
1379
|
+
"data-slot": "agent-panel-footer",
|
|
1380
|
+
className: chunkSDWR3F3Y_cjs.cn("shrink-0 border-t p-4", className),
|
|
1381
|
+
...props
|
|
1382
|
+
}
|
|
1383
|
+
));
|
|
1384
|
+
AgentPanelFooter.displayName = "AgentPanelFooter";
|
|
1385
|
+
var HASH_PREFIX = "#";
|
|
1386
|
+
var DEFAULT_HASH_KEY = "agent";
|
|
1387
|
+
function parseWidth(value, fallback) {
|
|
1388
|
+
if (typeof value === "number") return `${value}px`;
|
|
1389
|
+
if (typeof value === "string" && value.trim().length > 0) return value;
|
|
1390
|
+
return fallback;
|
|
1391
|
+
}
|
|
1392
|
+
function AgentPanelProvider({
|
|
1393
|
+
children,
|
|
1394
|
+
defaultOpen = false,
|
|
1395
|
+
open: openProp,
|
|
1396
|
+
onOpenChange,
|
|
1397
|
+
syncHash = true,
|
|
1398
|
+
hashKey = DEFAULT_HASH_KEY,
|
|
1399
|
+
shortcut = "mod+j",
|
|
1400
|
+
width = "24rem",
|
|
1401
|
+
minWidth = "20rem",
|
|
1402
|
+
maxWidth = "50vw",
|
|
1403
|
+
resizable = false,
|
|
1404
|
+
panelId,
|
|
1405
|
+
className,
|
|
1406
|
+
style
|
|
1407
|
+
}) {
|
|
1408
|
+
const isMobile = chunkQ7Y32IBM_cjs.useIsMobile();
|
|
1409
|
+
const isControlled = openProp !== void 0;
|
|
1410
|
+
const generatedId = React8__namespace.useId();
|
|
1411
|
+
const resolvedPanelId = panelId ?? `agent-panel-${generatedId}`;
|
|
1412
|
+
const sizing = React8__namespace.useMemo(
|
|
1413
|
+
() => ({
|
|
1414
|
+
width: parseWidth(width, "24rem"),
|
|
1415
|
+
minWidth: parseWidth(minWidth, "20rem"),
|
|
1416
|
+
maxWidth: parseWidth(maxWidth, "50vw")
|
|
1417
|
+
}),
|
|
1418
|
+
[width, minWidth, maxWidth]
|
|
1419
|
+
);
|
|
1420
|
+
const readHash = React8__namespace.useCallback(() => {
|
|
1421
|
+
if (typeof window === "undefined") return false;
|
|
1422
|
+
const hash = window.location.hash.replace(/^#/, "");
|
|
1423
|
+
return hash === hashKey || hash.startsWith(`${hashKey}?`);
|
|
1424
|
+
}, [hashKey]);
|
|
1425
|
+
const [internalOpen, setInternalOpen] = React8__namespace.useState(() => {
|
|
1426
|
+
if (isControlled) return Boolean(openProp);
|
|
1427
|
+
if (syncHash) {
|
|
1428
|
+
const fromHash = readHash();
|
|
1429
|
+
return fromHash || defaultOpen;
|
|
1430
|
+
}
|
|
1431
|
+
return defaultOpen;
|
|
1432
|
+
});
|
|
1433
|
+
const open = isControlled ? Boolean(openProp) : internalOpen;
|
|
1434
|
+
const setOpen = React8__namespace.useCallback(
|
|
1435
|
+
(next) => {
|
|
1436
|
+
const resolved = typeof next === "function" ? next(open) : next;
|
|
1437
|
+
if (!isControlled) {
|
|
1438
|
+
setInternalOpen(resolved);
|
|
1439
|
+
}
|
|
1440
|
+
onOpenChange?.(resolved);
|
|
1441
|
+
},
|
|
1442
|
+
[isControlled, onOpenChange, open]
|
|
1443
|
+
);
|
|
1444
|
+
const toggle = React8__namespace.useCallback(() => {
|
|
1445
|
+
setOpen((prev) => !prev);
|
|
1446
|
+
}, [setOpen]);
|
|
1447
|
+
const close = React8__namespace.useCallback(() => {
|
|
1448
|
+
setOpen(false);
|
|
1449
|
+
}, [setOpen]);
|
|
1450
|
+
const [liveWidth, setLiveWidth] = React8__namespace.useState("0px");
|
|
1451
|
+
chunkMSHCIIXL_cjs.useKeyboardShortcut(shortcut, toggle);
|
|
1452
|
+
React8__namespace.useEffect(() => {
|
|
1453
|
+
if (!syncHash || isControlled || typeof window === "undefined") return;
|
|
1454
|
+
const handleHashChange = () => {
|
|
1455
|
+
const next = readHash();
|
|
1456
|
+
setInternalOpen((prev) => prev === next ? prev : next);
|
|
1457
|
+
};
|
|
1458
|
+
window.addEventListener("hashchange", handleHashChange);
|
|
1459
|
+
return () => window.removeEventListener("hashchange", handleHashChange);
|
|
1460
|
+
}, [syncHash, isControlled, readHash]);
|
|
1461
|
+
React8__namespace.useEffect(() => {
|
|
1462
|
+
if (!syncHash || isControlled || typeof window === "undefined") return;
|
|
1463
|
+
const current = window.location.hash.replace(/^#/, "");
|
|
1464
|
+
const desired = open ? hashKey : "";
|
|
1465
|
+
if (open && current !== hashKey) {
|
|
1466
|
+
window.history.replaceState(null, "", `${HASH_PREFIX}${desired}`);
|
|
1467
|
+
} else if (!open && current === hashKey) {
|
|
1468
|
+
window.history.replaceState(
|
|
1469
|
+
null,
|
|
1470
|
+
"",
|
|
1471
|
+
window.location.pathname + window.location.search
|
|
1472
|
+
);
|
|
1473
|
+
}
|
|
1474
|
+
}, [open, syncHash, isControlled, hashKey]);
|
|
1475
|
+
React8__namespace.useEffect(() => {
|
|
1476
|
+
if (!open) setLiveWidth("0px");
|
|
1477
|
+
}, [open]);
|
|
1478
|
+
const contextValue = React8__namespace.useMemo(
|
|
1479
|
+
() => ({
|
|
1480
|
+
open,
|
|
1481
|
+
setOpen,
|
|
1482
|
+
toggle,
|
|
1483
|
+
close,
|
|
1484
|
+
sizing,
|
|
1485
|
+
liveWidth,
|
|
1486
|
+
setLiveWidth,
|
|
1487
|
+
resizable,
|
|
1488
|
+
panelId: resolvedPanelId,
|
|
1489
|
+
isMobile
|
|
1490
|
+
}),
|
|
1491
|
+
[
|
|
1492
|
+
open,
|
|
1493
|
+
setOpen,
|
|
1494
|
+
toggle,
|
|
1495
|
+
close,
|
|
1496
|
+
sizing,
|
|
1497
|
+
liveWidth,
|
|
1498
|
+
resizable,
|
|
1499
|
+
resolvedPanelId,
|
|
1500
|
+
isMobile
|
|
1501
|
+
]
|
|
1502
|
+
);
|
|
1503
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkJTSGZMKE_cjs.AgentPanelContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1504
|
+
"div",
|
|
1505
|
+
{
|
|
1506
|
+
"data-slot": "agent-panel-provider",
|
|
1507
|
+
"data-state": open ? "open" : "closed",
|
|
1508
|
+
"data-panel-id": resolvedPanelId,
|
|
1509
|
+
className: chunkSDWR3F3Y_cjs.cn("relative w-full", className),
|
|
1510
|
+
style: {
|
|
1511
|
+
"--agent-panel-width": open ? resizable ? liveWidth : sizing.width : "0px",
|
|
1512
|
+
"--agent-panel-min-width": sizing.minWidth,
|
|
1513
|
+
"--agent-panel-max-width": sizing.maxWidth,
|
|
1514
|
+
"--agent-panel-live-width": liveWidth,
|
|
1515
|
+
...style
|
|
1516
|
+
},
|
|
1517
|
+
children
|
|
1518
|
+
}
|
|
1519
|
+
) });
|
|
1520
|
+
}
|
|
1521
|
+
var positionClasses = {
|
|
1522
|
+
"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)]",
|
|
1523
|
+
"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)]",
|
|
1524
|
+
inline: "relative"
|
|
1525
|
+
};
|
|
1526
|
+
var AgentPanelTrigger = React8__namespace.forwardRef(
|
|
1527
|
+
({
|
|
1528
|
+
asChild = false,
|
|
1529
|
+
position = "bottom-right",
|
|
1530
|
+
icon,
|
|
1531
|
+
label,
|
|
1532
|
+
ariaLabel,
|
|
1533
|
+
className,
|
|
1534
|
+
children,
|
|
1535
|
+
onClick,
|
|
1536
|
+
type,
|
|
1537
|
+
...props
|
|
1538
|
+
}, ref) => {
|
|
1539
|
+
const { open, toggle, panelId } = useAgentPanel();
|
|
1540
|
+
const Comp = asChild ? reactSlot.Slot : Button;
|
|
1541
|
+
const isFloating = position !== "inline";
|
|
1542
|
+
const computedLabel = ariaLabel ?? label ?? "Toggle AI assistant";
|
|
1543
|
+
const handleClick = (event) => {
|
|
1544
|
+
onClick?.(event);
|
|
1545
|
+
if (!event.defaultPrevented) toggle();
|
|
1546
|
+
};
|
|
1547
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1548
|
+
Comp,
|
|
1549
|
+
{
|
|
1550
|
+
ref,
|
|
1551
|
+
type: asChild ? void 0 : type ?? "button",
|
|
1552
|
+
"data-slot": "agent-panel-trigger",
|
|
1553
|
+
"data-state": open ? "open" : "closed",
|
|
1554
|
+
"aria-label": computedLabel,
|
|
1555
|
+
"aria-expanded": open,
|
|
1556
|
+
"aria-controls": panelId,
|
|
1557
|
+
onClick: handleClick,
|
|
1558
|
+
className: chunkSDWR3F3Y_cjs.cn(
|
|
1559
|
+
isFloating && positionClasses[position],
|
|
1560
|
+
!isFloating && "data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
1561
|
+
className
|
|
1562
|
+
),
|
|
1563
|
+
...props,
|
|
1564
|
+
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1565
|
+
icon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquare, { className: "h-5 w-5", "aria-hidden": true }),
|
|
1566
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: computedLabel })
|
|
1567
|
+
] })
|
|
1568
|
+
}
|
|
1569
|
+
);
|
|
1570
|
+
}
|
|
1571
|
+
);
|
|
1572
|
+
AgentPanelTrigger.displayName = "AgentPanelTrigger";
|
|
1143
1573
|
var Drawer = ({
|
|
1144
1574
|
shouldScaleBackground = true,
|
|
1145
1575
|
...props
|
|
@@ -2989,7 +3419,7 @@ function MultiSelect({
|
|
|
2989
3419
|
onChange,
|
|
2990
3420
|
value: selectedValues
|
|
2991
3421
|
}) {
|
|
2992
|
-
const [buttonRef, popoverWidth] =
|
|
3422
|
+
const [buttonRef, popoverWidth] = chunkMSHCIIXL_cjs.usePopoverWidth();
|
|
2993
3423
|
const onSelectHandler = (value) => {
|
|
2994
3424
|
const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
|
|
2995
3425
|
onChange(nextValues);
|
|
@@ -6159,7 +6589,7 @@ function useAppRedirectUrls({
|
|
|
6159
6589
|
const controller = new AbortController();
|
|
6160
6590
|
const { signal } = controller;
|
|
6161
6591
|
stableApps.forEach((app) => {
|
|
6162
|
-
|
|
6592
|
+
chunkMSHCIIXL_cjs.initiateService.fetchRedirectUrl({
|
|
6163
6593
|
clientId: chunkHF24SZFI_cjs.getRuntimeEnv(app.clientId),
|
|
6164
6594
|
redirectUri: chunkHF24SZFI_cjs.getRuntimeEnv(app.redirectUri),
|
|
6165
6595
|
forwardedTo: resolveRef.current(app)
|
|
@@ -6185,7 +6615,7 @@ function useAppRedirectUrls({
|
|
|
6185
6615
|
}
|
|
6186
6616
|
var AppSwitcher = ({ forwardedTo }) => {
|
|
6187
6617
|
const [open, setOpen] = React8.useState(false);
|
|
6188
|
-
const config =
|
|
6618
|
+
const config = chunkMSHCIIXL_cjs.useBlocksAppConfigStore((state) => state.getConfig());
|
|
6189
6619
|
const filteredApps = React8.useMemo(
|
|
6190
6620
|
() => filteredAppSwitcherData.filter((app) => app.id !== config.name),
|
|
6191
6621
|
[config.name]
|
|
@@ -6218,7 +6648,7 @@ var OPTIONS = [
|
|
|
6218
6648
|
{ value: "dark", Icon: lucideReact.Moon, label: "Dark" }
|
|
6219
6649
|
];
|
|
6220
6650
|
function ThemeSwitcher() {
|
|
6221
|
-
const { theme, setTheme } =
|
|
6651
|
+
const { theme, setTheme } = chunkMSHCIIXL_cjs.useTheme();
|
|
6222
6652
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6223
6653
|
Tabs,
|
|
6224
6654
|
{
|
|
@@ -6285,14 +6715,14 @@ function UserAvatar({ size = "sm" }) {
|
|
|
6285
6715
|
);
|
|
6286
6716
|
}
|
|
6287
6717
|
function UserDropdownMenu() {
|
|
6288
|
-
const { name } =
|
|
6718
|
+
const { name } = chunkMSHCIIXL_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
6289
6719
|
const { data: data2 } = useGetUserInfo();
|
|
6290
6720
|
const userData = data2?.data;
|
|
6291
|
-
const { isPending, mutateAsync } =
|
|
6721
|
+
const { isPending, mutateAsync } = chunkMSHCIIXL_cjs.useLogout();
|
|
6292
6722
|
const { resetProjectStore } = chunkVAKGHXK6_cjs.useProjectStore();
|
|
6293
6723
|
const { setUnAuthenticated, clearTokens } = chunkVAKGHXK6_cjs.useAuthStore();
|
|
6294
6724
|
const { resetSelectedLanguages } = chunkVNUPOJ7H_cjs.useLanguageViewStore();
|
|
6295
|
-
const { data: myOrgsData, isLoading: isOrgsLoading } =
|
|
6725
|
+
const { data: myOrgsData, isLoading: isOrgsLoading } = chunkMSHCIIXL_cjs.useGetMyOrganizations();
|
|
6296
6726
|
const fullName = [userData?.firstName, userData?.lastName].filter(Boolean).join(" ") || "\u2014";
|
|
6297
6727
|
const email = userData?.email || "";
|
|
6298
6728
|
const roles = Object.values(userData?.roles || {}).flat();
|
|
@@ -6422,7 +6852,7 @@ var languages = [
|
|
|
6422
6852
|
{ key: "fr", title: "French" }
|
|
6423
6853
|
];
|
|
6424
6854
|
function LanguageSelector() {
|
|
6425
|
-
const { changeLanguage, language } =
|
|
6855
|
+
const { changeLanguage, language } = chunkMSHCIIXL_cjs.useLanguageSwitcher();
|
|
6426
6856
|
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
6427
6857
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6428
6858
|
"button",
|
|
@@ -6512,7 +6942,7 @@ var notificationListenerService = new NotificationListenerService();
|
|
|
6512
6942
|
|
|
6513
6943
|
// src/components/common/notification/use-notification-socket.ts
|
|
6514
6944
|
function useNotificationSocket() {
|
|
6515
|
-
const { data: configData } =
|
|
6945
|
+
const { data: configData } = chunkMSHCIIXL_cjs.useGetBlocksNotificationConfig(0, 100);
|
|
6516
6946
|
const queryClient = reactQuery.useQueryClient();
|
|
6517
6947
|
notificationListenerService.connect();
|
|
6518
6948
|
React8.useEffect(() => {
|
|
@@ -6527,7 +6957,7 @@ function useNotificationSocket() {
|
|
|
6527
6957
|
notificationListenerService.connection.on(
|
|
6528
6958
|
config.notifyMethod,
|
|
6529
6959
|
(message) => {
|
|
6530
|
-
|
|
6960
|
+
chunkMSHCIIXL_cjs.notificationService.getNotificationConfig(config, message);
|
|
6531
6961
|
try {
|
|
6532
6962
|
const notice = typeof message === "string" ? JSON.parse(message) : message;
|
|
6533
6963
|
const denom = JSON.parse(
|
|
@@ -6551,12 +6981,12 @@ function useNotificationFeed(open) {
|
|
|
6551
6981
|
const [notifications, setNotifications] = React8.useState([]);
|
|
6552
6982
|
const [hasMore, setHasMore] = React8.useState(true);
|
|
6553
6983
|
const listRef = React8.useRef(null);
|
|
6554
|
-
const { data: data2, isLoading, isFetching } =
|
|
6984
|
+
const { data: data2, isLoading, isFetching } = chunkMSHCIIXL_cjs.useGetNotifications(
|
|
6555
6985
|
pageNumber,
|
|
6556
6986
|
PAGE_SIZE
|
|
6557
6987
|
);
|
|
6558
|
-
const markAsRead =
|
|
6559
|
-
const markAllAsRead =
|
|
6988
|
+
const markAsRead = chunkMSHCIIXL_cjs.useMarkAsRead();
|
|
6989
|
+
const markAllAsRead = chunkMSHCIIXL_cjs.useMarkAllAsRead();
|
|
6560
6990
|
React8.useEffect(() => {
|
|
6561
6991
|
if (!data2?.notifications) return;
|
|
6562
6992
|
setNotifications((prev) => {
|
|
@@ -6790,7 +7220,7 @@ function ConsoleHeader() {
|
|
|
6790
7220
|
window.addEventListener("scroll", handleScroll);
|
|
6791
7221
|
return () => window.removeEventListener("scroll", handleScroll);
|
|
6792
7222
|
}, []);
|
|
6793
|
-
const { appLightLogo, appDarkLogo } =
|
|
7223
|
+
const { appLightLogo, appDarkLogo } = chunkMSHCIIXL_cjs.useLogo();
|
|
6794
7224
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6795
7225
|
"div",
|
|
6796
7226
|
{
|
|
@@ -6851,7 +7281,7 @@ function ConsoleHeader() {
|
|
|
6851
7281
|
}
|
|
6852
7282
|
function DashboardHeader(props) {
|
|
6853
7283
|
const { forwardedTo, redirectPaths, navigationMenus } = props;
|
|
6854
|
-
const { isSidebarOpen, toggleSidebar } = React8.useContext(
|
|
7284
|
+
const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkJTSGZMKE_cjs.SidebarContext);
|
|
6855
7285
|
const { pathname } = reactRouter.useLocation();
|
|
6856
7286
|
const { selectedProject } = chunkVAKGHXK6_cjs.useProjectStore();
|
|
6857
7287
|
const projectName = selectedProject?.name;
|
|
@@ -7142,7 +7572,7 @@ function SelectedProject() {
|
|
|
7142
7572
|
] });
|
|
7143
7573
|
}
|
|
7144
7574
|
function AuthLayout({ children, logo, sidePanel }) {
|
|
7145
|
-
return /* @__PURE__ */ jsxRuntime.jsx(React8.Suspense, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7575
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React8.Suspense, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkHTZX5UUU_cjs.PublicGuard, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-screen flex-col items-center px-6 py-10 lg:px-12", children: [
|
|
7146
7576
|
logo,
|
|
7147
7577
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-10 flex w-full max-w-6xl flex-col gap-8 lg:flex-row lg:items-start lg:justify-center", children: [
|
|
7148
7578
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full max-w-xl", children }),
|
|
@@ -7155,7 +7585,7 @@ function ConsoleLayout({ children, wrapper }) {
|
|
|
7155
7585
|
/* @__PURE__ */ jsxRuntime.jsx(ConsoleHeader, {}),
|
|
7156
7586
|
/* @__PURE__ */ jsxRuntime.jsx("main", { className: "pt-[59px]", children })
|
|
7157
7587
|
] });
|
|
7158
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7588
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkHTZX5UUU_cjs.ImpersonationChecker, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkHTZX5UUU_cjs.ImpersonationTerminator, { children: wrapper ? wrapper(content) : content }) });
|
|
7159
7589
|
}
|
|
7160
7590
|
function DashboardLayout({
|
|
7161
7591
|
children,
|
|
@@ -7164,7 +7594,7 @@ function DashboardLayout({
|
|
|
7164
7594
|
navigationMenus,
|
|
7165
7595
|
forwardedTo
|
|
7166
7596
|
}) {
|
|
7167
|
-
const content = /* @__PURE__ */ jsxRuntime.jsx(
|
|
7597
|
+
const content = /* @__PURE__ */ jsxRuntime.jsx(chunkJTSGZMKE_cjs.DashboardLayoutProvider, { isOpen: true, persist: true, children: /* @__PURE__ */ jsxRuntime.jsx(AgentPanelProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full overflow-hidden", children: [
|
|
7168
7598
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7169
7599
|
SidebarMenuDesktop,
|
|
7170
7600
|
{
|
|
@@ -7181,10 +7611,17 @@ function DashboardLayout({
|
|
|
7181
7611
|
forwardedTo
|
|
7182
7612
|
}
|
|
7183
7613
|
),
|
|
7184
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex min-h-0 w-full flex-1 overflow-hidden bg-[hsl(var(--surface-app))]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7614
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex min-h-0 w-full flex-1 overflow-hidden bg-[hsl(var(--surface-app))]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7615
|
+
"div",
|
|
7616
|
+
{
|
|
7617
|
+
"data-slot": "dashboard-main",
|
|
7618
|
+
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)]",
|
|
7619
|
+
children
|
|
7620
|
+
}
|
|
7621
|
+
) })
|
|
7185
7622
|
] })
|
|
7186
|
-
] }) });
|
|
7187
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7623
|
+
] }) }) });
|
|
7624
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkHTZX5UUU_cjs.ImpersonationChecker, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkHTZX5UUU_cjs.ImpersonationSynchronizer, { children: wrapper ? wrapper(content) : content }) });
|
|
7188
7625
|
}
|
|
7189
7626
|
var DEFAULT_EXCLUDE_PREFIXES = ["/app/project"];
|
|
7190
7627
|
var withScopedItemId = (menus, itemId, excludePrefixes) => menus.map((menu) => {
|
|
@@ -7231,7 +7668,7 @@ function OidcLayout({
|
|
|
7231
7668
|
return /* @__PURE__ */ jsxRuntime.jsx(OidcContext.Provider, { value: contextValue, children });
|
|
7232
7669
|
}
|
|
7233
7670
|
function PublicLayout({ children }) {
|
|
7234
|
-
return /* @__PURE__ */ jsxRuntime.jsx(React8.Suspense, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7671
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React8.Suspense, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkHTZX5UUU_cjs.PublicGuard, { children }) });
|
|
7235
7672
|
}
|
|
7236
7673
|
var LoginHeader = ({
|
|
7237
7674
|
docsUrl = "https://docs.seliseblocks.com/",
|
|
@@ -7240,7 +7677,7 @@ var LoginHeader = ({
|
|
|
7240
7677
|
}) => {
|
|
7241
7678
|
const {
|
|
7242
7679
|
config: { appLogoUrl }
|
|
7243
|
-
} =
|
|
7680
|
+
} = chunkMSHCIIXL_cjs.useBlocksAppConfigStore((state) => state);
|
|
7244
7681
|
const resolveLogo = (variant) => {
|
|
7245
7682
|
if (!appLogoUrl) return void 0;
|
|
7246
7683
|
if (typeof appLogoUrl === "string") return appLogoUrl;
|
|
@@ -8444,8 +8881,8 @@ var BlocksLoginPage = ({
|
|
|
8444
8881
|
] });
|
|
8445
8882
|
};
|
|
8446
8883
|
var LoginPage = () => {
|
|
8447
|
-
const config =
|
|
8448
|
-
const { start, isLoading } =
|
|
8884
|
+
const config = chunkMSHCIIXL_cjs.useBlocksAppConfigStore((state) => state.getConfig());
|
|
8885
|
+
const { start, isLoading } = chunkMSHCIIXL_cjs.useLogin();
|
|
8449
8886
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8450
8887
|
BlocksLoginPage,
|
|
8451
8888
|
{
|
|
@@ -8527,10 +8964,10 @@ var DefaultDoc = () => {
|
|
|
8527
8964
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-5 md:grid-cols-2 lg:grid-cols-3", children: data.map((item) => /* @__PURE__ */ jsxRuntime.jsx(DocCard, { ...item }, item.url)) });
|
|
8528
8965
|
};
|
|
8529
8966
|
function useCreateProjectRedirect() {
|
|
8530
|
-
const { name } =
|
|
8967
|
+
const { name } = chunkMSHCIIXL_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
8531
8968
|
const navigate = reactRouter.useNavigate();
|
|
8532
8969
|
const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
|
|
8533
|
-
const { isFetching, isReady, redirect } =
|
|
8970
|
+
const { isFetching, isReady, redirect } = chunkMSHCIIXL_cjs.usePrefetchRedirect({
|
|
8534
8971
|
clientId: osApp ? chunkHF24SZFI_cjs.getRuntimeEnv(osApp.clientId) : "",
|
|
8535
8972
|
redirectUri: osApp ? chunkHF24SZFI_cjs.getRuntimeEnv(osApp.redirectUri) : "",
|
|
8536
8973
|
forwardedTo: "/app/create-project",
|
|
@@ -8622,10 +9059,10 @@ function useProjectOverviewRedirect({
|
|
|
8622
9059
|
tenantGroupId
|
|
8623
9060
|
}) {
|
|
8624
9061
|
const navigate = reactRouter.useNavigate();
|
|
8625
|
-
const { name } =
|
|
9062
|
+
const { name } = chunkMSHCIIXL_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
8626
9063
|
const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
|
|
8627
9064
|
const redirectedRoute = `/app/project/${tenantGroupId}/environments`;
|
|
8628
|
-
const { isFetching, isReady, redirect } =
|
|
9065
|
+
const { isFetching, isReady, redirect } = chunkMSHCIIXL_cjs.usePrefetchRedirect({
|
|
8629
9066
|
clientId: osApp ? chunkHF24SZFI_cjs.getRuntimeEnv(osApp.clientId) : "",
|
|
8630
9067
|
redirectUri: osApp ? chunkHF24SZFI_cjs.getRuntimeEnv(osApp.redirectUri) : "",
|
|
8631
9068
|
forwardedTo: redirectedRoute,
|
|
@@ -8893,7 +9330,7 @@ var CallbackPage = ({ defaultRedirectUrl }) => {
|
|
|
8893
9330
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-screen items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader, { className: "h-12 w-12 animate-spin text-gray-500" }) });
|
|
8894
9331
|
};
|
|
8895
9332
|
function ProfilePage() {
|
|
8896
|
-
const { isLoading, error } =
|
|
9333
|
+
const { isLoading, error } = chunkMSHCIIXL_cjs.useInitiateRedirect({
|
|
8897
9334
|
clientId: chunkHF24SZFI_cjs.getRuntimeEnv("BLOCKS_IAM_CLIENT_ID"),
|
|
8898
9335
|
redirectUri: chunkHF24SZFI_cjs.getRuntimeEnv("BLOCKS_IAM_CALLBACK_URL"),
|
|
8899
9336
|
forwardedTo: "/app/profile"
|
|
@@ -9171,7 +9608,7 @@ var ConfirmationModal = ({
|
|
|
9171
9608
|
] })
|
|
9172
9609
|
] });
|
|
9173
9610
|
var DashboardOverview = () => {
|
|
9174
|
-
const { name } =
|
|
9611
|
+
const { name } = chunkMSHCIIXL_cjs.useBlocksAppConfigStore((state) => state.config);
|
|
9175
9612
|
const { data: data2, isFetching } = chunkPSATBGVF_cjs.useGetProject();
|
|
9176
9613
|
const {
|
|
9177
9614
|
endpoints,
|
|
@@ -9628,43 +10065,6 @@ var ProjectRepoList = ({
|
|
|
9628
10065
|
}
|
|
9629
10066
|
);
|
|
9630
10067
|
};
|
|
9631
|
-
var LoadingSkeleton2 = () => /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-6", children: [
|
|
9632
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
9633
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-8 w-1/4" }),
|
|
9634
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "mt-2 h-6 w-full" })
|
|
9635
|
-
] }),
|
|
9636
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6", children: [
|
|
9637
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-8 w-1/4" }),
|
|
9638
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "mt-2 h-6 w-full" })
|
|
9639
|
-
] })
|
|
9640
|
-
] }) });
|
|
9641
|
-
var ProjectCliSnippet = () => {
|
|
9642
|
-
const { data: data2, isLoading } = chunkPSATBGVF_cjs.useGetProject();
|
|
9643
|
-
const cliSetupCommand = "npm install -g @seliseblocks/cli";
|
|
9644
|
-
const blocksMicroservicesUrl = chunkZ6N3Y5AQ_cjs.getProjectBlocksApiUrl(data2?.data);
|
|
9645
|
-
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();
|
|
9646
|
-
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(LoadingSkeleton2, {});
|
|
9647
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
9648
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Frontend Setup commands" }) }),
|
|
9649
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { children: [
|
|
9650
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
9651
|
-
"If you have the Blocks CLI already installed, run:",
|
|
9652
|
-
/* @__PURE__ */ jsxRuntime.jsx(CopyableSnippet, { code: projectSetupCommand, isCopyable: true })
|
|
9653
|
-
] }),
|
|
9654
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6", children: [
|
|
9655
|
-
"If you haven't installed the CLI yet, install it globally using npm, then run the command:",
|
|
9656
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9657
|
-
CopyableSnippet,
|
|
9658
|
-
{
|
|
9659
|
-
code: `${cliSetupCommand}
|
|
9660
|
-
${projectSetupCommand}`,
|
|
9661
|
-
isCopyable: true
|
|
9662
|
-
}
|
|
9663
|
-
)
|
|
9664
|
-
] })
|
|
9665
|
-
] })
|
|
9666
|
-
] });
|
|
9667
|
-
};
|
|
9668
10068
|
var ProjectActions = ({
|
|
9669
10069
|
isDisabled,
|
|
9670
10070
|
createdBy,
|
|
@@ -9868,7 +10268,7 @@ function SidebarMobileView({
|
|
|
9868
10268
|
navigationMenus
|
|
9869
10269
|
}) {
|
|
9870
10270
|
const [open, setOpen] = React8.useState(false);
|
|
9871
|
-
const { appLightLogo, appDarkLogo } =
|
|
10271
|
+
const { appLightLogo, appDarkLogo } = chunkMSHCIIXL_cjs.useLogo();
|
|
9872
10272
|
const allowedMenu = chunkQ7Y32IBM_cjs.useFilteredMenus(navigationMenus);
|
|
9873
10273
|
return /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
|
|
9874
10274
|
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "icon", className: "shrink-0", children: [
|
|
@@ -9917,9 +10317,9 @@ function SidebarMenuDesktop({
|
|
|
9917
10317
|
redirectPaths,
|
|
9918
10318
|
navigationMenus
|
|
9919
10319
|
}) {
|
|
9920
|
-
const { isSidebarOpen, toggleSidebar } = React8.useContext(
|
|
9921
|
-
const { appLightLogo, appDarkLogo } =
|
|
9922
|
-
const icon =
|
|
10320
|
+
const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkJTSGZMKE_cjs.SidebarContext);
|
|
10321
|
+
const { appLightLogo, appDarkLogo } = chunkMSHCIIXL_cjs.useLogo();
|
|
10322
|
+
const icon = chunkMSHCIIXL_cjs.useIcon();
|
|
9923
10323
|
const allowedMenu = chunkQ7Y32IBM_cjs.useFilteredMenus(navigationMenus);
|
|
9924
10324
|
const { isActivePath: isProjectOverviewRoute } = chunkQ7Y32IBM_cjs.useIsActiveMenu("/app/project");
|
|
9925
10325
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -11011,7 +11411,7 @@ function MultiSelect2({
|
|
|
11011
11411
|
onChange,
|
|
11012
11412
|
value: selectedValues
|
|
11013
11413
|
}) {
|
|
11014
|
-
const [buttonRef, popoverWidth] =
|
|
11414
|
+
const [buttonRef, popoverWidth] = chunkMSHCIIXL_cjs.usePopoverWidth();
|
|
11015
11415
|
const onSelectHandler = (value) => {
|
|
11016
11416
|
const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
|
|
11017
11417
|
onChange(nextValues);
|
|
@@ -11128,7 +11528,7 @@ var ClearButton = ({ onClear }) => {
|
|
|
11128
11528
|
};
|
|
11129
11529
|
function Radio({ label, options, onChange, value }) {
|
|
11130
11530
|
const [search, setSearch] = React8.useState("");
|
|
11131
|
-
const [buttonRef, popoverWidth] =
|
|
11531
|
+
const [buttonRef, popoverWidth] = chunkMSHCIIXL_cjs.usePopoverWidth();
|
|
11132
11532
|
const isMobile = chunkQ7Y32IBM_cjs.useIsMobile();
|
|
11133
11533
|
const selected = React8.useMemo(
|
|
11134
11534
|
() => options.find((item) => item.value === value) || null,
|
|
@@ -11860,6 +12260,15 @@ exports.Accordion = Accordion;
|
|
|
11860
12260
|
exports.AccordionContent = AccordionContent;
|
|
11861
12261
|
exports.AccordionItem = AccordionItem;
|
|
11862
12262
|
exports.AccordionTrigger = AccordionTrigger;
|
|
12263
|
+
exports.AgentPanel = AgentPanel;
|
|
12264
|
+
exports.AgentPanelBody = AgentPanelBody;
|
|
12265
|
+
exports.AgentPanelClose = AgentPanelClose;
|
|
12266
|
+
exports.AgentPanelDescription = AgentPanelDescription;
|
|
12267
|
+
exports.AgentPanelFooter = AgentPanelFooter;
|
|
12268
|
+
exports.AgentPanelHeader = AgentPanelHeader;
|
|
12269
|
+
exports.AgentPanelProvider = AgentPanelProvider;
|
|
12270
|
+
exports.AgentPanelTitle = AgentPanelTitle;
|
|
12271
|
+
exports.AgentPanelTrigger = AgentPanelTrigger;
|
|
11863
12272
|
exports.Alert = Alert;
|
|
11864
12273
|
exports.AlertDescription = AlertDescription;
|
|
11865
12274
|
exports.AlertDialog = AlertDialog;
|
|
@@ -12076,7 +12485,6 @@ exports.ProfilePage = ProfilePage;
|
|
|
12076
12485
|
exports.Progress = Progress;
|
|
12077
12486
|
exports.ProjectActions = ProjectActions;
|
|
12078
12487
|
exports.ProjectCardLoadingSkeleton = ProjectCardLoadingSkeleton;
|
|
12079
|
-
exports.ProjectCliSnippet = ProjectCliSnippet;
|
|
12080
12488
|
exports.ProjectDetail = ProjectDetail;
|
|
12081
12489
|
exports.ProjectList = ProjectList;
|
|
12082
12490
|
exports.ProjectOverview = ProjectOverview;
|
|
@@ -12189,6 +12597,7 @@ exports.sidebarCollapsedTooltipClass = sidebarCollapsedTooltipClass;
|
|
|
12189
12597
|
exports.sortQueryParsers = sortQueryParsers;
|
|
12190
12598
|
exports.spinnerVariants = spinnerVariants;
|
|
12191
12599
|
exports.toggleVariants = toggleVariants;
|
|
12600
|
+
exports.useAgentPanel = useAgentPanel;
|
|
12192
12601
|
exports.useFileUpload = useFileUpload;
|
|
12193
12602
|
exports.useFormField = useFormField;
|
|
12194
12603
|
exports.useNotificationSocket = useNotificationSocket;
|
|
@@ -12196,5 +12605,5 @@ exports.useOidcContext = useOidcContext;
|
|
|
12196
12605
|
exports.usePaginationQueryParams = usePaginationQueryParams;
|
|
12197
12606
|
exports.useSortQueryParams = useSortQueryParams;
|
|
12198
12607
|
exports.useWizardStepper = useWizardStepper;
|
|
12199
|
-
//# sourceMappingURL=chunk-
|
|
12200
|
-
//# sourceMappingURL=chunk-
|
|
12608
|
+
//# sourceMappingURL=chunk-VNUHUNWE.cjs.map
|
|
12609
|
+
//# sourceMappingURL=chunk-VNUHUNWE.cjs.map
|