@cere/cere-design-system 0.0.4 → 0.0.6

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/index.js CHANGED
@@ -38,7 +38,7 @@ __export(index_exports, {
38
38
  Background: () => import_reactflow2.Background,
39
39
  BackgroundVariant: () => import_reactflow2.BackgroundVariant,
40
40
  Badge: () => Badge,
41
- Box: () => import_material19.Box,
41
+ Box: () => import_material20.Box,
42
42
  Breadcrumbs: () => Breadcrumbs,
43
43
  Button: () => Button,
44
44
  ButtonGroup: () => ButtonGroup,
@@ -52,10 +52,10 @@ __export(index_exports, {
52
52
  CodeEditor: () => CodeEditor,
53
53
  Collapse: () => Collapse,
54
54
  ConnectionLineType: () => import_reactflow2.ConnectionLineType,
55
- Container: () => import_material21.Container,
55
+ Container: () => import_material22.Container,
56
56
  Controls: () => import_reactflow2.Controls,
57
57
  Dialog: () => Dialog,
58
- Divider: () => Divider3,
58
+ Divider: () => Divider4,
59
59
  Drawer: () => Drawer2,
60
60
  Dropdown: () => Dropdown,
61
61
  EmptyState: () => EmptyState,
@@ -64,16 +64,16 @@ __export(index_exports, {
64
64
  FormControlLabel: () => import_material2.FormControlLabel,
65
65
  FormHelperText: () => import_material2.FormHelperText,
66
66
  FormLabel: () => import_material2.FormLabel,
67
- Grid: () => import_material16.Grid,
67
+ Grid: () => import_material17.Grid,
68
68
  IconButton: () => IconButton,
69
69
  InputAdornment: () => import_material2.InputAdornment,
70
70
  InputLabel: () => import_material2.InputLabel,
71
71
  Link: () => Link3,
72
72
  List: () => List5,
73
73
  ListItem: () => ListItem3,
74
- ListItemIcon: () => import_material14.ListItemIcon,
75
- ListItemSecondaryAction: () => import_material14.ListItemSecondaryAction,
76
- ListItemText: () => import_material14.ListItemText,
74
+ ListItemIcon: () => import_material15.ListItemIcon,
75
+ ListItemSecondaryAction: () => import_material15.ListItemSecondaryAction,
76
+ ListItemText: () => import_material15.ListItemText,
77
77
  Loading: () => Loading,
78
78
  LoadingButton: () => LoadingButton,
79
79
  Menu: () => Menu3,
@@ -91,7 +91,7 @@ __export(index_exports, {
91
91
  Sidebar: () => Sidebar,
92
92
  SidebarItem: () => SidebarItem,
93
93
  Snackbar: () => Snackbar,
94
- Stack: () => import_material18.Stack,
94
+ Stack: () => import_material19.Stack,
95
95
  Step: () => Step,
96
96
  StepButton: () => StepButton,
97
97
  StepContent: () => StepContent,
@@ -104,9 +104,9 @@ __export(index_exports, {
104
104
  TextField: () => TextField,
105
105
  ToggleButton: () => ToggleButton,
106
106
  ToggleButtonGroup: () => ToggleButtonGroup,
107
- Toolbar: () => import_material22.Toolbar,
107
+ Toolbar: () => import_material23.Toolbar,
108
108
  Tooltip: () => Tooltip2,
109
- Typography: () => import_material20.Typography,
109
+ Typography: () => import_material21.Typography,
110
110
  WorkspaceSelectorButton: () => WorkspaceSelectorButton,
111
111
  colors: () => colors,
112
112
  theme: () => theme
@@ -872,6 +872,8 @@ var import_Unarchive = __toESM(require("@mui/icons-material/Unarchive"));
872
872
  var import_Search2 = __toESM(require("@mui/icons-material/Search"));
873
873
  var import_Add = __toESM(require("@mui/icons-material/Add"));
874
874
  var import_Check = __toESM(require("@mui/icons-material/Check"));
875
+ var import_Settings = __toESM(require("@mui/icons-material/Settings"));
876
+ var import_PersonAddAlt = __toESM(require("@mui/icons-material/PersonAddAlt"));
875
877
  var import_jsx_runtime14 = require("react/jsx-runtime");
876
878
  var ServiceSelectorButton = ({
877
879
  services,
@@ -884,7 +886,9 @@ var ServiceSelectorButton = ({
884
886
  onServiceCreated,
885
887
  isManager = false,
886
888
  sx = {},
887
- panelWidth = 350
889
+ panelWidth = 350,
890
+ onOpenSettings,
891
+ onOpenAddMember
888
892
  }) => {
889
893
  const [anchorEl, setAnchorEl] = (0, import_react.useState)(null);
890
894
  const [searchTerm, setSearchTerm] = (0, import_react.useState)("");
@@ -972,7 +976,9 @@ var ServiceSelectorButton = ({
972
976
  onSearchChange: setSearchTerm,
973
977
  showArchived,
974
978
  onToggleArchived: () => setShowArchived(!showArchived),
975
- filteredServices
979
+ filteredServices,
980
+ onOpenSettings,
981
+ onOpenAddMember
976
982
  }
977
983
  )
978
984
  ] });
@@ -1098,7 +1104,9 @@ var ServiceSelectorButton = ({
1098
1104
  onSearchChange: setSearchTerm,
1099
1105
  showArchived,
1100
1106
  onToggleArchived: () => setShowArchived(!showArchived),
1101
- filteredServices
1107
+ filteredServices,
1108
+ onOpenSettings,
1109
+ onOpenAddMember
1102
1110
  }
1103
1111
  )
1104
1112
  ] });
@@ -1120,7 +1128,9 @@ var ServiceSelectorPanel = ({
1120
1128
  onSearchChange: externalOnSearchChange,
1121
1129
  showArchived: externalShowArchived,
1122
1130
  onToggleArchived: externalOnToggleArchived,
1123
- filteredServices: externalFilteredServices
1131
+ filteredServices: externalFilteredServices,
1132
+ onOpenSettings,
1133
+ onOpenAddMember
1124
1134
  }) => {
1125
1135
  const [internalSearchTerm, setInternalSearchTerm] = (0, import_react.useState)("");
1126
1136
  const [internalShowArchived, setInternalShowArchived] = (0, import_react.useState)(false);
@@ -1169,62 +1179,126 @@ var ServiceSelectorPanel = ({
1169
1179
  }
1170
1180
  },
1171
1181
  children: [
1172
- selectedService && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1182
+ selectedService && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1173
1183
  import_material7.Box,
1174
1184
  {
1175
1185
  sx: {
1176
1186
  paddingLeft: 2,
1177
1187
  paddingRight: 2,
1178
- paddingTop: 0.5,
1188
+ paddingTop: 1.5,
1189
+ paddingBottom: 1.5,
1179
1190
  borderBottom: 1,
1180
1191
  borderColor: "divider"
1181
1192
  },
1182
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1183
- import_material7.Box,
1184
- {
1185
- sx: {
1186
- display: "flex",
1187
- alignItems: "center",
1188
- justifyContent: "space-between",
1189
- mb: 1.5
1190
- },
1191
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material7.Box, { sx: { display: "flex", alignItems: "center" }, children: [
1193
+ children: [
1194
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material7.Box, { sx: {
1195
+ display: "flex",
1196
+ alignItems: "center",
1197
+ mb: 1.5
1198
+ }, children: [
1199
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1200
+ import_material7.Avatar,
1201
+ {
1202
+ sx: {
1203
+ width: 32,
1204
+ height: 32,
1205
+ bgcolor: "primary.main",
1206
+ fontSize: "0.9rem",
1207
+ mr: 1.5
1208
+ },
1209
+ children: selectedService.name.charAt(0)
1210
+ }
1211
+ ),
1212
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material7.Box, { sx: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material7.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
1213
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material7.Typography, { variant: "subtitle1", sx: { fontWeight: 600, fontSize: "1rem" }, children: selectedService.name }),
1192
1214
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1193
- import_material7.Avatar,
1215
+ import_material7.Box,
1194
1216
  {
1195
1217
  sx: {
1196
- width: 32,
1197
- height: 32,
1198
- bgcolor: "primary.main",
1199
- fontSize: "0.9rem",
1200
- mr: 1.5
1218
+ display: "inline-block",
1219
+ bgcolor: "rgba(0, 0, 0, 0.04)",
1220
+ color: "text.secondary",
1221
+ px: 1,
1222
+ py: 0.3,
1223
+ borderRadius: "12px",
1224
+ fontSize: "0.7rem",
1225
+ fontWeight: 500,
1226
+ lineHeight: 1
1201
1227
  },
1202
- children: selectedService.name.charAt(0)
1228
+ children: isManager ? "Manager" : "Viewer"
1203
1229
  }
1204
- ),
1205
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material7.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material7.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
1206
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material7.Typography, { variant: "subtitle1", sx: { fontWeight: 600, fontSize: "1rem" }, children: selectedService.name }),
1207
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1208
- import_material7.Box,
1209
- {
1210
- sx: {
1211
- display: "inline-block",
1212
- bgcolor: "rgba(0, 0, 0, 0.04)",
1213
- color: "text.secondary",
1214
- px: 1,
1215
- py: 0.3,
1216
- borderRadius: "12px",
1217
- fontSize: "0.7rem",
1218
- fontWeight: 500,
1219
- lineHeight: 1
1220
- },
1221
- children: isManager ? "Manager" : "Viewer"
1230
+ )
1231
+ ] }) })
1232
+ ] }),
1233
+ (onOpenSettings || onOpenAddMember) && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material7.Box, { sx: { display: "flex", gap: 1 }, children: [
1234
+ onOpenAddMember && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1235
+ import_material7.Button,
1236
+ {
1237
+ startIcon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_PersonAddAlt.default, {}),
1238
+ variant: "outlined",
1239
+ size: "small",
1240
+ onClick: (e) => {
1241
+ e.stopPropagation();
1242
+ onClose();
1243
+ onOpenAddMember(selectedServiceId || "");
1244
+ },
1245
+ disabled: !isManager,
1246
+ sx: {
1247
+ flex: 1,
1248
+ textTransform: "none",
1249
+ color: "text.secondary",
1250
+ fontSize: "0.8rem",
1251
+ py: 0.75,
1252
+ justifyContent: "flex-start",
1253
+ borderColor: "rgba(0, 0, 0, 0.12)",
1254
+ borderRadius: "6px",
1255
+ "&:hover": {
1256
+ borderColor: "rgba(0, 0, 0, 0.23)",
1257
+ backgroundColor: "rgba(0, 0, 0, 0.03)"
1258
+ },
1259
+ "&:disabled": {
1260
+ opacity: 0.5,
1261
+ cursor: "not-allowed"
1222
1262
  }
1223
- )
1224
- ] }) })
1225
- ] })
1226
- }
1227
- )
1263
+ },
1264
+ children: "Add member"
1265
+ }
1266
+ ),
1267
+ onOpenSettings && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1268
+ import_material7.Button,
1269
+ {
1270
+ startIcon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_Settings.default, {}),
1271
+ variant: "outlined",
1272
+ size: "small",
1273
+ onClick: (e) => {
1274
+ e.stopPropagation();
1275
+ onClose();
1276
+ onOpenSettings(selectedServiceId || "");
1277
+ },
1278
+ disabled: !isManager,
1279
+ sx: {
1280
+ flex: 1,
1281
+ textTransform: "none",
1282
+ color: "text.secondary",
1283
+ fontSize: "0.8rem",
1284
+ py: 0.75,
1285
+ justifyContent: "flex-start",
1286
+ borderColor: "rgba(0, 0, 0, 0.12)",
1287
+ borderRadius: "6px",
1288
+ "&:hover": {
1289
+ borderColor: "rgba(0, 0, 0, 0.23)",
1290
+ backgroundColor: "rgba(0, 0, 0, 0.03)"
1291
+ },
1292
+ "&:disabled": {
1293
+ opacity: 0.5,
1294
+ cursor: "not-allowed"
1295
+ }
1296
+ },
1297
+ children: "Settings"
1298
+ }
1299
+ )
1300
+ ] })
1301
+ ]
1228
1302
  }
1229
1303
  ),
1230
1304
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material7.Box, { sx: { px: 2, pt: 2, pb: 1.5 }, children: [
@@ -2163,36 +2237,158 @@ var Dialog = ({
2163
2237
  // src/components/layout/Drawer.tsx
2164
2238
  var import_Drawer = __toESM(require("@mui/material/Drawer"));
2165
2239
  var import_styles17 = require("@mui/material/styles");
2240
+ var import_material14 = require("@mui/material");
2241
+ var import_Close2 = __toESM(require("@mui/icons-material/Close"));
2166
2242
  var import_jsx_runtime27 = require("react/jsx-runtime");
2167
2243
  var StyledDrawer2 = (0, import_styles17.styled)(import_Drawer.default, {
2168
- shouldForwardProp: (prop) => prop !== "width" && prop !== "miniWidth" && prop !== "collapsed"
2169
- })(({ theme: theme2, width = 240, miniWidth = 72, collapsed }) => ({
2244
+ shouldForwardProp: (prop) => prop !== "width" && prop !== "miniWidth" && prop !== "collapsed" && prop !== "topOffset"
2245
+ })(({ theme: theme2, width = 240, miniWidth = 72, collapsed, topOffset = 0 }) => ({
2170
2246
  width: collapsed ? miniWidth : width,
2171
2247
  flexShrink: 0,
2172
2248
  "& .MuiDrawer-paper": {
2173
2249
  width: collapsed ? miniWidth : width,
2174
2250
  boxSizing: "border-box",
2175
2251
  boxShadow: "0px 2px 10px rgba(0, 0, 0, 0.05)",
2176
- transition: theme2.transitions.create("width", {
2252
+ transition: theme2.transitions.create(["width", "top", "height"], {
2177
2253
  easing: theme2.transitions.easing.sharp,
2178
2254
  duration: theme2.transitions.duration.enteringScreen
2179
2255
  }),
2180
- overflow: collapsed ? "hidden" : "auto"
2256
+ overflow: "visible",
2257
+ // Let internal content handle scrolling
2258
+ display: "flex",
2259
+ flexDirection: "column",
2260
+ top: `${topOffset}px !important`,
2261
+ height: topOffset > 0 ? `calc(100% - ${topOffset}px) !important` : "100%",
2262
+ zIndex: `${theme2.zIndex.modal} !important`
2263
+ // Use modal zIndex to be above everything except AppBar (which is modal + 1)
2181
2264
  }
2182
2265
  }));
2183
2266
  var Drawer2 = ({
2184
- width = 240,
2267
+ width,
2185
2268
  miniWidth = 72,
2186
2269
  collapsed = false,
2270
+ title,
2271
+ header,
2272
+ showCloseButton,
2273
+ tabs,
2274
+ activeTab = 0,
2275
+ onTabChange,
2276
+ footer,
2277
+ contentProps,
2278
+ anchor = "right",
2279
+ variant = "temporary",
2280
+ topOffset = 0,
2281
+ children,
2282
+ onClose,
2187
2283
  ...props
2188
2284
  }) => {
2189
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2285
+ const defaultWidth = variant === "temporary" || variant === "persistent" ? 400 : 240;
2286
+ const finalWidth = width ?? defaultWidth;
2287
+ const shouldShowClose = showCloseButton ?? (variant === "temporary" || variant === "persistent");
2288
+ const hasHeader = title || header || shouldShowClose || tabs;
2289
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2190
2290
  StyledDrawer2,
2191
2291
  {
2192
- width,
2292
+ width: finalWidth,
2193
2293
  miniWidth,
2194
2294
  collapsed,
2195
- ...props
2295
+ anchor,
2296
+ variant,
2297
+ topOffset,
2298
+ onClose,
2299
+ ModalProps: {
2300
+ ...props.ModalProps,
2301
+ style: {
2302
+ zIndex: topOffset > 0 ? void 0 : void 0
2303
+ // Let styled component handle zIndex
2304
+ }
2305
+ },
2306
+ BackdropProps: {
2307
+ ...props.BackdropProps,
2308
+ style: {
2309
+ backgroundColor: "rgba(0, 0, 0, 0.5)"
2310
+ }
2311
+ },
2312
+ ...props,
2313
+ children: [
2314
+ hasHeader && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
2315
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2316
+ import_material14.Box,
2317
+ {
2318
+ sx: {
2319
+ display: "flex",
2320
+ alignItems: "center",
2321
+ justifyContent: "space-between",
2322
+ p: 2,
2323
+ minHeight: 64,
2324
+ borderBottom: 1,
2325
+ borderColor: "divider"
2326
+ },
2327
+ children: header || /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
2328
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material14.Box, { sx: { flex: 1 }, children: typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material14.Typography, { variant: "h6", children: title }) : title }),
2329
+ shouldShowClose && onClose && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2330
+ import_material14.IconButton,
2331
+ {
2332
+ onClick: (e) => {
2333
+ e.stopPropagation();
2334
+ onClose(e, "backdropClick");
2335
+ },
2336
+ size: "small",
2337
+ sx: { ml: 1 },
2338
+ "aria-label": "close",
2339
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_Close2.default, {})
2340
+ }
2341
+ )
2342
+ ] })
2343
+ }
2344
+ ),
2345
+ tabs && tabs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2346
+ import_material14.Tabs,
2347
+ {
2348
+ value: activeTab,
2349
+ onChange: (_, newValue) => onTabChange?.(newValue),
2350
+ variant: tabs.length > 4 ? "scrollable" : "standard",
2351
+ scrollButtons: tabs.length > 4 ? "auto" : false,
2352
+ sx: {
2353
+ borderBottom: 1,
2354
+ borderColor: "divider",
2355
+ px: 2,
2356
+ "& .MuiTabs-scrollableContainer": {
2357
+ overflow: "auto"
2358
+ }
2359
+ },
2360
+ children: tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material14.Tab, { label: tab }, index))
2361
+ }
2362
+ )
2363
+ ] }),
2364
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2365
+ import_material14.Box,
2366
+ {
2367
+ sx: {
2368
+ flex: 1,
2369
+ overflow: "auto",
2370
+ display: "flex",
2371
+ flexDirection: "column"
2372
+ },
2373
+ ...contentProps,
2374
+ children
2375
+ }
2376
+ ),
2377
+ footer && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
2378
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material14.Divider, {}),
2379
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2380
+ import_material14.Box,
2381
+ {
2382
+ sx: {
2383
+ p: 2,
2384
+ borderTop: 1,
2385
+ borderColor: "divider"
2386
+ },
2387
+ children: footer
2388
+ }
2389
+ )
2390
+ ] })
2391
+ ]
2196
2392
  }
2197
2393
  );
2198
2394
  };
@@ -2234,13 +2430,13 @@ var CardActions = (props) => {
2234
2430
  };
2235
2431
 
2236
2432
  // src/components/layout/List.tsx
2237
- var import_material14 = require("@mui/material");
2433
+ var import_material15 = require("@mui/material");
2238
2434
  var import_styles19 = require("@mui/material/styles");
2239
2435
  var import_jsx_runtime29 = require("react/jsx-runtime");
2240
2436
  var List5 = (props) => {
2241
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material14.List, { ...props });
2437
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material15.List, { ...props });
2242
2438
  };
2243
- var StyledListItem = (0, import_styles19.styled)(import_material14.ListItem, {
2439
+ var StyledListItem = (0, import_styles19.styled)(import_material15.ListItem, {
2244
2440
  shouldForwardProp: (prop) => prop !== "hoverable"
2245
2441
  })(({ hoverable = true }) => ({
2246
2442
  border: `1px solid ${colors.grey[200]}`,
@@ -2262,16 +2458,16 @@ var ListItem3 = ({
2262
2458
  ...props
2263
2459
  }) => {
2264
2460
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(StyledListItem, { hoverable, ...props, children: [
2265
- icon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material14.ListItemIcon, { children: icon }),
2461
+ icon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material15.ListItemIcon, { children: icon }),
2266
2462
  (primary || secondary) && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2267
- import_material14.ListItemText,
2463
+ import_material15.ListItemText,
2268
2464
  {
2269
2465
  primary,
2270
2466
  secondary
2271
2467
  }
2272
2468
  ),
2273
2469
  children,
2274
- action && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material14.ListItemSecondaryAction, { children: action })
2470
+ action && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material15.ListItemSecondaryAction, { children: action })
2275
2471
  ] });
2276
2472
  };
2277
2473
 
@@ -2299,14 +2495,14 @@ var Avatar4 = ({ size = "medium", ...props }) => {
2299
2495
  };
2300
2496
 
2301
2497
  // src/components/layout/Table.tsx
2302
- var import_material15 = require("@mui/material");
2498
+ var import_material16 = require("@mui/material");
2303
2499
  var import_styles21 = require("@mui/material/styles");
2304
2500
  var import_jsx_runtime31 = require("react/jsx-runtime");
2305
- var StyledTableContainer = (0, import_styles21.styled)(import_material15.TableContainer)({
2501
+ var StyledTableContainer = (0, import_styles21.styled)(import_material16.TableContainer)({
2306
2502
  borderRadius: 8,
2307
2503
  border: `1px solid ${colors.grey[200]}`
2308
2504
  });
2309
- var StyledTableHead = (0, import_styles21.styled)(import_material15.TableHead)({
2505
+ var StyledTableHead = (0, import_styles21.styled)(import_material16.TableHead)({
2310
2506
  backgroundColor: colors.grey[50],
2311
2507
  "& .MuiTableCell-head": {
2312
2508
  fontWeight: 600,
@@ -2314,7 +2510,7 @@ var StyledTableHead = (0, import_styles21.styled)(import_material15.TableHead)({
2314
2510
  }
2315
2511
  });
2316
2512
  var Table = ({ stickyHeader = false, children, ...props }) => {
2317
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StyledTableContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_material15.Table, { stickyHeader, ...props, children }) });
2513
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StyledTableContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_material16.Table, { stickyHeader, ...props, children }) });
2318
2514
  };
2319
2515
  var TableHeader = ({
2320
2516
  columns,
@@ -2322,8 +2518,8 @@ var TableHeader = ({
2322
2518
  order = "asc",
2323
2519
  onSort
2324
2520
  }) => {
2325
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StyledTableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_material15.TableRow, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_material15.TableCell, { align: column.align || "left", children: column.sortable && onSort ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2326
- import_material15.TableSortLabel,
2521
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StyledTableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_material16.TableRow, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_material16.TableCell, { align: column.align || "left", children: column.sortable && onSort ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2522
+ import_material16.TableSortLabel,
2327
2523
  {
2328
2524
  active: orderBy === column.id,
2329
2525
  direction: orderBy === column.id ? order : "asc",
@@ -2334,7 +2530,7 @@ var TableHeader = ({
2334
2530
  };
2335
2531
 
2336
2532
  // src/components/layout/Grid.tsx
2337
- var import_material16 = require("@mui/material");
2533
+ var import_material17 = require("@mui/material");
2338
2534
 
2339
2535
  // src/components/layout/Breadcrumbs.tsx
2340
2536
  var import_Breadcrumbs = __toESM(require("@mui/material/Breadcrumbs"));
@@ -2381,11 +2577,11 @@ var Breadcrumbs = ({ items, ...props }) => {
2381
2577
  };
2382
2578
 
2383
2579
  // src/components/layout/Accordion.tsx
2384
- var import_material17 = require("@mui/material");
2580
+ var import_material18 = require("@mui/material");
2385
2581
  var import_ExpandMore = __toESM(require("@mui/icons-material/ExpandMore"));
2386
2582
  var import_styles23 = require("@mui/material/styles");
2387
2583
  var import_jsx_runtime33 = require("react/jsx-runtime");
2388
- var StyledAccordion = (0, import_styles23.styled)(import_material17.Accordion)({
2584
+ var StyledAccordion = (0, import_styles23.styled)(import_material18.Accordion)({
2389
2585
  borderRadius: 8,
2390
2586
  boxShadow: "none",
2391
2587
  border: `1px solid ${colors.grey[200]}`,
@@ -2396,7 +2592,7 @@ var StyledAccordion = (0, import_styles23.styled)(import_material17.Accordion)({
2396
2592
  margin: 0
2397
2593
  }
2398
2594
  });
2399
- var StyledAccordionSummary = (0, import_styles23.styled)(import_material17.AccordionSummary)({
2595
+ var StyledAccordionSummary = (0, import_styles23.styled)(import_material18.AccordionSummary)({
2400
2596
  backgroundColor: colors.grey[50],
2401
2597
  borderRadius: "8px 8px 0 0",
2402
2598
  "&.Mui-expanded": {
@@ -2406,7 +2602,7 @@ var StyledAccordionSummary = (0, import_styles23.styled)(import_material17.Accor
2406
2602
  margin: "12px 0"
2407
2603
  }
2408
2604
  });
2409
- var StyledAccordionDetails = (0, import_styles23.styled)(import_material17.AccordionDetails)({
2605
+ var StyledAccordionDetails = (0, import_styles23.styled)(import_material18.AccordionDetails)({
2410
2606
  padding: "16px"
2411
2607
  });
2412
2608
  var Accordion = ({
@@ -2446,27 +2642,27 @@ var import_jsx_runtime35 = require("react/jsx-runtime");
2446
2642
  var StyledDivider = (0, import_styles25.styled)(import_Divider.default)({
2447
2643
  borderColor: colors.grey[200]
2448
2644
  });
2449
- var Divider3 = ({ ...props }) => {
2645
+ var Divider4 = ({ ...props }) => {
2450
2646
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledDivider, { ...props });
2451
2647
  };
2452
2648
 
2453
2649
  // src/components/layout/Stack.tsx
2454
- var import_material18 = require("@mui/material");
2650
+ var import_material19 = require("@mui/material");
2455
2651
 
2456
2652
  // src/components/layout/Box.tsx
2457
- var import_material19 = require("@mui/material");
2653
+ var import_material20 = require("@mui/material");
2458
2654
 
2459
2655
  // src/components/layout/Typography.tsx
2460
- var import_material20 = require("@mui/material");
2656
+ var import_material21 = require("@mui/material");
2461
2657
 
2462
2658
  // src/components/layout/Container.tsx
2463
- var import_material21 = require("@mui/material");
2659
+ var import_material22 = require("@mui/material");
2464
2660
 
2465
2661
  // src/components/layout/AppBar.tsx
2466
- var import_material22 = require("@mui/material");
2662
+ var import_material23 = require("@mui/material");
2467
2663
  var import_styles26 = require("@mui/material/styles");
2468
2664
  var import_jsx_runtime36 = require("react/jsx-runtime");
2469
- var StyledAppBar = (0, import_styles26.styled)(import_material22.AppBar, {
2665
+ var StyledAppBar = (0, import_styles26.styled)(import_material23.AppBar, {
2470
2666
  shouldForwardProp: (prop) => prop !== "appBarHeight"
2471
2667
  })(({ appBarHeight = 64 }) => ({
2472
2668
  backgroundColor: colors.background.paper,
@@ -2475,7 +2671,7 @@ var StyledAppBar = (0, import_styles26.styled)(import_material22.AppBar, {
2475
2671
  height: appBarHeight,
2476
2672
  zIndex: 1300
2477
2673
  }));
2478
- var StyledToolbar = (0, import_styles26.styled)(import_material22.Toolbar)(({ theme: theme2 }) => ({
2674
+ var StyledToolbar = (0, import_styles26.styled)(import_material23.Toolbar)(({ theme: theme2 }) => ({
2479
2675
  height: "100%",
2480
2676
  paddingLeft: theme2.spacing(2),
2481
2677
  paddingRight: theme2.spacing(2),
@@ -2486,15 +2682,16 @@ var AppBar = ({ height = 64, children, ...props }) => {
2486
2682
  };
2487
2683
 
2488
2684
  // src/components/layout/Collapse.tsx
2489
- var import_material23 = require("@mui/material");
2685
+ var import_material24 = require("@mui/material");
2490
2686
  var import_jsx_runtime37 = require("react/jsx-runtime");
2491
2687
  var Collapse = (props) => {
2492
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material23.Collapse, { ...props });
2688
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material24.Collapse, { ...props });
2493
2689
  };
2494
2690
 
2495
2691
  // src/components/feedback/Alert.tsx
2692
+ var import_react4 = __toESM(require("react"));
2496
2693
  var import_Alert = __toESM(require("@mui/material/Alert"));
2497
- var import_material24 = require("@mui/material");
2694
+ var import_material25 = require("@mui/material");
2498
2695
  var import_Snackbar = __toESM(require("@mui/material/Snackbar"));
2499
2696
  var import_styles27 = require("@mui/material/styles");
2500
2697
  var import_jsx_runtime38 = require("react/jsx-runtime");
@@ -2511,7 +2708,7 @@ var Alert = ({
2511
2708
  ...props
2512
2709
  }) => {
2513
2710
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(StyledAlert, { severity, ...props, children: [
2514
- title && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material24.AlertTitle, { children: title }),
2711
+ title && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material25.AlertTitle, { children: title }),
2515
2712
  children
2516
2713
  ] });
2517
2714
  };
@@ -2527,10 +2724,16 @@ var Snackbar = ({
2527
2724
  autoHideDuration = 6e3,
2528
2725
  ...props
2529
2726
  }) => {
2727
+ const handleClose = (_event, reason) => {
2728
+ if (reason === "clickaway" && onClose) {
2729
+ return;
2730
+ }
2731
+ onClose?.();
2732
+ };
2530
2733
  const content = children || (message ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2531
2734
  Alert,
2532
2735
  {
2533
- onClose,
2736
+ onClose: onClose ? handleClose : void 0,
2534
2737
  severity,
2535
2738
  variant,
2536
2739
  title,
@@ -2541,12 +2744,31 @@ var Snackbar = ({
2541
2744
  if (!content) {
2542
2745
  return null;
2543
2746
  }
2747
+ const NoTransition = import_react4.default.forwardRef(
2748
+ (props2, ref) => {
2749
+ return import_react4.default.cloneElement(props2.children, {
2750
+ ref,
2751
+ style: {
2752
+ ...props2.children.props.style,
2753
+ transition: "opacity 0.3s ease-in-out"
2754
+ }
2755
+ });
2756
+ }
2757
+ );
2758
+ NoTransition.displayName = "NoTransition";
2544
2759
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2545
2760
  StyledSnackbar,
2546
2761
  {
2547
2762
  anchorOrigin,
2548
2763
  autoHideDuration,
2549
- onClose,
2764
+ onClose: handleClose,
2765
+ disableWindowBlurListener: true,
2766
+ ClickAwayListenerProps: {
2767
+ onClickAway: () => {
2768
+ }
2769
+ // Prevent scroll issues
2770
+ },
2771
+ TransitionComponent: NoTransition,
2550
2772
  ...props,
2551
2773
  children: content
2552
2774
  }
@@ -2554,7 +2776,7 @@ var Snackbar = ({
2554
2776
  };
2555
2777
 
2556
2778
  // src/components/feedback/EmptyState.tsx
2557
- var import_material25 = require("@mui/material");
2779
+ var import_material26 = require("@mui/material");
2558
2780
  var import_jsx_runtime39 = require("react/jsx-runtime");
2559
2781
  var EmptyState = ({
2560
2782
  title = "No items found",
@@ -2563,7 +2785,7 @@ var EmptyState = ({
2563
2785
  action
2564
2786
  }) => {
2565
2787
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
2566
- import_material25.Box,
2788
+ import_material26.Box,
2567
2789
  {
2568
2790
  sx: {
2569
2791
  display: "flex",
@@ -2576,7 +2798,7 @@ var EmptyState = ({
2576
2798
  },
2577
2799
  children: [
2578
2800
  icon && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2579
- import_material25.Box,
2801
+ import_material26.Box,
2580
2802
  {
2581
2803
  sx: {
2582
2804
  color: colors.text.secondary,
@@ -2586,16 +2808,16 @@ var EmptyState = ({
2586
2808
  children: icon
2587
2809
  }
2588
2810
  ),
2589
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material25.Typography, { variant: "h6", sx: { marginBottom: 1, color: colors.text.primary }, children: title }),
2590
- description && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material25.Typography, { variant: "body2", sx: { color: colors.text.secondary, marginBottom: 3 }, children: description }),
2591
- action && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material25.Box, { children: action })
2811
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material26.Typography, { variant: "h6", sx: { marginBottom: 1, color: colors.text.primary }, children: title }),
2812
+ description && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material26.Typography, { variant: "body2", sx: { color: colors.text.secondary, marginBottom: 3 }, children: description }),
2813
+ action && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material26.Box, { children: action })
2592
2814
  ]
2593
2815
  }
2594
2816
  );
2595
2817
  };
2596
2818
 
2597
2819
  // src/components/feedback/Loading.tsx
2598
- var import_material26 = require("@mui/material");
2820
+ var import_material27 = require("@mui/material");
2599
2821
  var import_jsx_runtime40 = require("react/jsx-runtime");
2600
2822
  var Loading = ({
2601
2823
  message = "Loading...",
@@ -2603,7 +2825,7 @@ var Loading = ({
2603
2825
  fullScreen = false
2604
2826
  }) => {
2605
2827
  const content = /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2606
- import_material26.Box,
2828
+ import_material27.Box,
2607
2829
  {
2608
2830
  sx: {
2609
2831
  display: "flex",
@@ -2625,8 +2847,8 @@ var Loading = ({
2625
2847
  }
2626
2848
  },
2627
2849
  children: [
2628
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material26.CircularProgress, { size, thickness: 4 }),
2629
- message && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material26.Typography, { variant: "body2", color: "text.secondary", children: message })
2850
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material27.CircularProgress, { size, thickness: 4 }),
2851
+ message && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material27.Typography, { variant: "body2", color: "text.secondary", children: message })
2630
2852
  ]
2631
2853
  }
2632
2854
  );
@@ -2634,7 +2856,7 @@ var Loading = ({
2634
2856
  };
2635
2857
 
2636
2858
  // src/components/feedback/AppLoading.tsx
2637
- var import_material27 = require("@mui/material");
2859
+ var import_material28 = require("@mui/material");
2638
2860
  var import_jsx_runtime41 = require("react/jsx-runtime");
2639
2861
  var AppLoading = ({
2640
2862
  message = "Loading...",
@@ -2642,7 +2864,7 @@ var AppLoading = ({
2642
2864
  sx = {}
2643
2865
  }) => {
2644
2866
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
2645
- import_material27.Box,
2867
+ import_material28.Box,
2646
2868
  {
2647
2869
  sx: {
2648
2870
  display: "flex",
@@ -2661,7 +2883,7 @@ var AppLoading = ({
2661
2883
  },
2662
2884
  children: [
2663
2885
  logo && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2664
- import_material27.Box,
2886
+ import_material28.Box,
2665
2887
  {
2666
2888
  component: "img",
2667
2889
  src: logo,
@@ -2673,28 +2895,28 @@ var AppLoading = ({
2673
2895
  }
2674
2896
  }
2675
2897
  ),
2676
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material27.CircularProgress, { size: 40, thickness: 4, sx: { mb: 2 } }),
2677
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material27.Typography, { variant: "body1", color: "text.secondary", children: message })
2898
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material28.CircularProgress, { size: 40, thickness: 4, sx: { mb: 2 } }),
2899
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material28.Typography, { variant: "body1", color: "text.secondary", children: message })
2678
2900
  ]
2679
2901
  }
2680
2902
  );
2681
2903
  };
2682
2904
 
2683
2905
  // src/components/feedback/CircularProgress.tsx
2684
- var import_material28 = require("@mui/material");
2906
+ var import_material29 = require("@mui/material");
2685
2907
  var import_jsx_runtime42 = require("react/jsx-runtime");
2686
2908
  var CircularProgress6 = ({
2687
2909
  size = 40,
2688
2910
  thickness = 4,
2689
2911
  ...props
2690
2912
  }) => {
2691
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material28.CircularProgress, { size, thickness, ...props });
2913
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material29.CircularProgress, { size, thickness, ...props });
2692
2914
  };
2693
2915
 
2694
2916
  // src/components/third-party/FlowEditor.tsx
2695
- var import_react4 = require("react");
2917
+ var import_react5 = require("react");
2696
2918
  var import_reactflow = __toESM(require("reactflow"));
2697
- var import_material29 = require("@mui/material");
2919
+ var import_material30 = require("@mui/material");
2698
2920
  var import_styles28 = require("@mui/material/styles");
2699
2921
  var import_reactflow2 = require("reactflow");
2700
2922
  var import_jsx_runtime43 = require("react/jsx-runtime");
@@ -2715,7 +2937,7 @@ var FlowEditor = ({
2715
2937
  ...reactFlowProps
2716
2938
  }) => {
2717
2939
  const theme2 = (0, import_styles28.useTheme)();
2718
- const handleInit = (0, import_react4.useCallback)(
2940
+ const handleInit = (0, import_react5.useCallback)(
2719
2941
  (instance) => {
2720
2942
  if (onInit) {
2721
2943
  onInit(instance);
@@ -2724,7 +2946,7 @@ var FlowEditor = ({
2724
2946
  [onInit]
2725
2947
  );
2726
2948
  return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_reactflow.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2727
- import_material29.Box,
2949
+ import_material30.Box,
2728
2950
  {
2729
2951
  sx: {
2730
2952
  width: "100%",
@@ -2791,9 +3013,9 @@ var FlowEditor = ({
2791
3013
  };
2792
3014
 
2793
3015
  // src/components/third-party/CodeEditor.tsx
2794
- var import_react5 = require("react");
2795
- var import_react6 = __toESM(require("@monaco-editor/react"));
2796
- var import_material30 = require("@mui/material");
3016
+ var import_react6 = require("react");
3017
+ var import_react7 = __toESM(require("@monaco-editor/react"));
3018
+ var import_material31 = require("@mui/material");
2797
3019
  var import_Fullscreen = __toESM(require("@mui/icons-material/Fullscreen"));
2798
3020
  var import_FullscreenExit = __toESM(require("@mui/icons-material/FullscreenExit"));
2799
3021
  var import_jsx_runtime44 = require("react/jsx-runtime");
@@ -2840,32 +3062,32 @@ var CodeEditor = ({
2840
3062
  containerProps,
2841
3063
  typeDefinitions
2842
3064
  }) => {
2843
- const [isEditorReady, setIsEditorReady] = (0, import_react5.useState)(false);
2844
- const [validationErrors, setValidationErrors] = (0, import_react5.useState)([]);
2845
- const [isFullscreen, setIsFullscreen] = (0, import_react5.useState)(false);
2846
- const [tsCode, setTsCode] = (0, import_react5.useState)(value);
2847
- const [actualHeight, setActualHeight] = (0, import_react5.useState)(
3065
+ const [isEditorReady, setIsEditorReady] = (0, import_react6.useState)(false);
3066
+ const [validationErrors, setValidationErrors] = (0, import_react6.useState)([]);
3067
+ const [isFullscreen, setIsFullscreen] = (0, import_react6.useState)(false);
3068
+ const [tsCode, setTsCode] = (0, import_react6.useState)(value);
3069
+ const [actualHeight, setActualHeight] = (0, import_react6.useState)(
2848
3070
  typeof height === "number" ? `${height}px` : height
2849
3071
  );
2850
- const internalEditorRef = (0, import_react5.useRef)(null);
2851
- const internalMonacoRef = (0, import_react5.useRef)(null);
3072
+ const internalEditorRef = (0, import_react6.useRef)(null);
3073
+ const internalMonacoRef = (0, import_react6.useRef)(null);
2852
3074
  const finalEditorRef = editorRef || internalEditorRef;
2853
3075
  const finalMonacoRef = monacoRef || internalMonacoRef;
2854
- (0, import_react5.useEffect)(() => {
3076
+ (0, import_react6.useEffect)(() => {
2855
3077
  if (isFullscreen) {
2856
- setActualHeight("100vh");
3078
+ setActualHeight("calc(100vh - 80px)");
2857
3079
  } else {
2858
3080
  setActualHeight(typeof height === "number" ? `${height}px` : height);
2859
3081
  }
2860
3082
  }, [height, isFullscreen]);
2861
- const toggleFullscreen = (0, import_react5.useCallback)(() => {
3083
+ const toggleFullscreen = (0, import_react6.useCallback)(() => {
2862
3084
  const newFullscreenState = !isFullscreen;
2863
3085
  setIsFullscreen(newFullscreenState);
2864
3086
  if (onFullscreenChange) {
2865
3087
  onFullscreenChange(newFullscreenState);
2866
3088
  }
2867
3089
  }, [isFullscreen, onFullscreenChange]);
2868
- (0, import_react5.useEffect)(() => {
3090
+ (0, import_react6.useEffect)(() => {
2869
3091
  if (!isFullscreen) return;
2870
3092
  function escapeHandler(event) {
2871
3093
  if (event.key === "Escape") {
@@ -2882,7 +3104,7 @@ var CodeEditor = ({
2882
3104
  window.removeEventListener("keydown", escapeHandler, { capture: true });
2883
3105
  };
2884
3106
  }, [isFullscreen, onFullscreenChange]);
2885
- const handleEditorDidMount = (0, import_react5.useCallback)(
3107
+ const handleEditorDidMount = (0, import_react6.useCallback)(
2886
3108
  (editor, monaco) => {
2887
3109
  console.log("CodeEditor: onMount called", { editor: !!editor, monaco: !!monaco });
2888
3110
  try {
@@ -2936,7 +3158,7 @@ var CodeEditor = ({
2936
3158
  },
2937
3159
  [isFullscreen, onFullscreenChange, onValidate, onMount, finalEditorRef, finalMonacoRef]
2938
3160
  );
2939
- (0, import_react5.useEffect)(() => {
3161
+ (0, import_react6.useEffect)(() => {
2940
3162
  if (!isEditorReady || !finalMonacoRef?.current || !typeDefinitions) return;
2941
3163
  const monaco = finalMonacoRef.current;
2942
3164
  const definitions = Array.isArray(typeDefinitions) ? typeDefinitions : [typeDefinitions];
@@ -2958,7 +3180,7 @@ var CodeEditor = ({
2958
3180
  setTsCode(valueStr);
2959
3181
  onChange(valueStr);
2960
3182
  };
2961
- (0, import_react5.useEffect)(() => {
3183
+ (0, import_react6.useEffect)(() => {
2962
3184
  if (value !== tsCode) {
2963
3185
  setTsCode(value);
2964
3186
  if (isEditorReady && finalEditorRef?.current) {
@@ -2984,12 +3206,12 @@ var CodeEditor = ({
2984
3206
  ...options
2985
3207
  };
2986
3208
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2987
- import_material30.Box,
3209
+ import_material31.Box,
2988
3210
  {
2989
3211
  sx: {
2990
3212
  display: "flex",
2991
3213
  flexDirection: "column",
2992
- height: "100%",
3214
+ height: isFullscreen ? "100vh" : "100%",
2993
3215
  minHeight: isFullscreen ? "100vh" : editorMinHeight,
2994
3216
  position: isFullscreen ? "fixed" : "relative",
2995
3217
  top: isFullscreen ? 0 : "auto",
@@ -2998,10 +3220,14 @@ var CodeEditor = ({
2998
3220
  bottom: isFullscreen ? 0 : "auto",
2999
3221
  zIndex: isFullscreen ? 9999 : "auto",
3000
3222
  bgcolor: "background.paper",
3001
- p: isFullscreen ? 2 : 0
3223
+ pt: isFullscreen ? "80px" : 0,
3224
+ // Add padding top in fullscreen to account for header (64px) + spacing (16px)
3225
+ px: isFullscreen ? 2 : 0,
3226
+ pb: isFullscreen ? 2 : 0,
3227
+ overflow: isFullscreen ? "hidden" : "visible"
3002
3228
  },
3003
3229
  children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3004
- import_material30.Box,
3230
+ import_material31.Box,
3005
3231
  {
3006
3232
  sx: {
3007
3233
  flex: 1,
@@ -3016,16 +3242,18 @@ var CodeEditor = ({
3016
3242
  },
3017
3243
  ...containerProps,
3018
3244
  children: [
3019
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material30.Tooltip, { title: isFullscreen ? "Exit Fullscreen" : "Fullscreen", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3020
- import_material30.IconButton,
3245
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material31.Tooltip, { title: isFullscreen ? "Exit Fullscreen" : "Fullscreen", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3246
+ import_material31.IconButton,
3021
3247
  {
3022
3248
  onClick: toggleFullscreen,
3023
3249
  size: "small",
3024
3250
  sx: {
3025
- position: "absolute",
3026
- top: 8,
3027
- right: 8,
3028
- zIndex: 10,
3251
+ position: isFullscreen ? "fixed" : "absolute",
3252
+ top: isFullscreen ? 72 : 8,
3253
+ // Position below header in fullscreen mode (header is ~64px)
3254
+ right: isFullscreen ? 16 : 8,
3255
+ zIndex: 1e4,
3256
+ // Ensure it's above other elements
3029
3257
  bgcolor: "rgba(255, 255, 255, 0.7)",
3030
3258
  "&:hover": {
3031
3259
  bgcolor: "rgba(255, 255, 255, 0.9)"
@@ -3036,7 +3264,7 @@ var CodeEditor = ({
3036
3264
  }
3037
3265
  ) }),
3038
3266
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3039
- import_material30.Box,
3267
+ import_material31.Box,
3040
3268
  {
3041
3269
  sx: {
3042
3270
  flex: 1,
@@ -3046,7 +3274,7 @@ var CodeEditor = ({
3046
3274
  position: "relative"
3047
3275
  },
3048
3276
  children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3049
- import_react6.default,
3277
+ import_react7.default,
3050
3278
  {
3051
3279
  height: actualHeight,
3052
3280
  defaultLanguage: language,
@@ -3056,7 +3284,7 @@ var CodeEditor = ({
3056
3284
  onMount: handleEditorDidMount,
3057
3285
  theme: themeProp || "vs",
3058
3286
  options: defaultOptions,
3059
- loading: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material30.Box, { sx: { p: 2, textAlign: "center" }, children: "Loading Monaco Editor..." }),
3287
+ loading: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material31.Box, { sx: { p: 2, textAlign: "center" }, children: "Loading Monaco Editor..." }),
3060
3288
  beforeMount: (monaco) => {
3061
3289
  console.log("CodeEditor: beforeMount called", { monaco: !!monaco });
3062
3290
  }
@@ -3065,7 +3293,7 @@ var CodeEditor = ({
3065
3293
  }
3066
3294
  ),
3067
3295
  validationErrors.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3068
- import_material30.Alert,
3296
+ import_material31.Alert,
3069
3297
  {
3070
3298
  severity: "error",
3071
3299
  sx: {
@@ -3082,15 +3310,15 @@ var CodeEditor = ({
3082
3310
  overflow: "auto"
3083
3311
  },
3084
3312
  children: [
3085
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material30.Box, { sx: { mb: 1, fontWeight: 600 }, children: "Please fix the following errors:" }),
3086
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material30.Box, { component: "ul", sx: { m: 0, pl: 2 }, children: [
3087
- validationErrors.slice(0, 3).map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material30.Box, { component: "li", sx: { fontSize: "0.85rem" }, children: [
3313
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material31.Box, { sx: { mb: 1, fontWeight: 600 }, children: "Please fix the following errors:" }),
3314
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material31.Box, { component: "ul", sx: { m: 0, pl: 2 }, children: [
3315
+ validationErrors.slice(0, 3).map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material31.Box, { component: "li", sx: { fontSize: "0.85rem" }, children: [
3088
3316
  "Line ",
3089
3317
  error.startLineNumber,
3090
3318
  ": ",
3091
3319
  error.message
3092
3320
  ] }, index)),
3093
- validationErrors.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material30.Box, { component: "li", sx: { fontSize: "0.85rem" }, children: [
3321
+ validationErrors.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material31.Box, { component: "li", sx: { fontSize: "0.85rem" }, children: [
3094
3322
  validationErrors.length - 3,
3095
3323
  " more error",
3096
3324
  validationErrors.length - 3 > 1 ? "s" : "",