@elevasis/ui 2.3.1 → 2.4.0

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.
@@ -0,0 +1,12 @@
1
+ import { Container, Stack } from '@mantine/core';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ // src/components/layout/shell/PageContainer.tsx
5
+ var PageContainer = ({ children }) => {
6
+ return (
7
+ // Add padding to the top of the container to adjust for the topbar height
8
+ /* @__PURE__ */ jsx(Container, { size: "xl", p: 0, w: "100%", children: /* @__PURE__ */ jsx(Stack, { gap: "lg", children }) })
9
+ );
10
+ };
11
+
12
+ export { PageContainer };
@@ -0,0 +1,115 @@
1
+ import { useAppearance } from './chunk-QJ2KCHKX.js';
2
+ import { sidebarGroupChevronSize, sidebarIconInnerSize } from './chunk-DT3QYZVU.js';
3
+ import { Center, Box, UnstyledButton, Group, Text, Collapse, Stack } from '@mantine/core';
4
+ import { jsx, jsxs } from 'react/jsx-runtime';
5
+ import { IconChevronDown, IconChevronRight } from '@tabler/icons-react';
6
+
7
+ function SubshellLoader() {
8
+ const { loader } = useAppearance();
9
+ return /* @__PURE__ */ jsx(Center, { mih: "calc(100vh - 70px)", children: loader });
10
+ }
11
+ var activeColor = "var(--color-primary)";
12
+ var defaultTextColor = "var(--color-text)";
13
+ var subtleColor = "var(--color-text-subtle)";
14
+ var activeBg = `color-mix(in srgb, ${activeColor} 10%, transparent)`;
15
+ var CollapsibleSidebarGroup = ({
16
+ icon: Icon,
17
+ label,
18
+ isExpanded,
19
+ onToggle,
20
+ isActive = false,
21
+ badge,
22
+ children,
23
+ onLabelClick,
24
+ emptyMessage = "No items",
25
+ isEmpty = false,
26
+ isLoading = false,
27
+ loadingComponent
28
+ }) => {
29
+ const showActiveStyle = !isExpanded && isActive;
30
+ const iconColor = showActiveStyle ? activeColor : subtleColor;
31
+ const textColor = showActiveStyle ? activeColor : defaultTextColor;
32
+ const fontWeight = showActiveStyle ? 600 : 500;
33
+ const handleLabelClick = (e) => {
34
+ if (onLabelClick) {
35
+ e.stopPropagation();
36
+ onLabelClick();
37
+ }
38
+ };
39
+ return /* @__PURE__ */ jsxs(Box, { children: [
40
+ /* @__PURE__ */ jsx(
41
+ UnstyledButton,
42
+ {
43
+ onClick: onToggle,
44
+ style: {
45
+ display: "flex",
46
+ alignItems: "center",
47
+ width: "100%",
48
+ padding: "var(--mantine-spacing-xs)",
49
+ color: textColor,
50
+ backgroundColor: showActiveStyle ? activeBg : "transparent",
51
+ transition: `all var(--duration-fast) var(--easing)`,
52
+ cursor: "pointer",
53
+ overflow: "hidden"
54
+ },
55
+ onMouseEnter: (e) => {
56
+ if (!showActiveStyle) {
57
+ e.currentTarget.style.backgroundColor = "var(--color-surface-hover)";
58
+ }
59
+ },
60
+ onMouseLeave: (e) => {
61
+ if (!showActiveStyle) {
62
+ e.currentTarget.style.backgroundColor = "transparent";
63
+ }
64
+ },
65
+ children: /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", style: { width: "100%" }, children: [
66
+ /* @__PURE__ */ jsx(Box, { style: { flexShrink: 0, color: iconColor }, children: isExpanded ? /* @__PURE__ */ jsx(IconChevronDown, { size: sidebarGroupChevronSize }) : /* @__PURE__ */ jsx(IconChevronRight, { size: sidebarGroupChevronSize }) }),
67
+ /* @__PURE__ */ jsx(
68
+ Box,
69
+ {
70
+ style: { flexShrink: 0, color: iconColor, cursor: onLabelClick ? "pointer" : "inherit" },
71
+ onClick: onLabelClick ? handleLabelClick : void 0,
72
+ children: /* @__PURE__ */ jsx(Icon, { size: sidebarIconInnerSize, color: activeColor })
73
+ }
74
+ ),
75
+ /* @__PURE__ */ jsx(
76
+ Text,
77
+ {
78
+ size: "sm",
79
+ fw: fontWeight,
80
+ style: {
81
+ fontFamily: "var(--elevasis-font-family-subtitle)",
82
+ color: textColor,
83
+ transition: `color var(--duration-fast) var(--easing)`,
84
+ overflow: "hidden",
85
+ textOverflow: "ellipsis",
86
+ whiteSpace: "nowrap",
87
+ flex: 1,
88
+ cursor: onLabelClick ? "pointer" : "inherit"
89
+ },
90
+ onClick: onLabelClick ? handleLabelClick : void 0,
91
+ children: label
92
+ }
93
+ ),
94
+ badge && /* @__PURE__ */ jsx(Box, { style: { flexShrink: 0 }, children: badge })
95
+ ] })
96
+ }
97
+ ),
98
+ /* @__PURE__ */ jsx(Collapse, { in: isExpanded, children: /* @__PURE__ */ jsx(
99
+ Stack,
100
+ {
101
+ gap: 0,
102
+ mt: "xs",
103
+ ml: "xs",
104
+ style: {
105
+ borderLeft: `1px solid color-mix(in srgb, var(--color-primary) 40%, transparent)`,
106
+ marginLeft: "calc(var(--mantine-spacing-xs) + 6px)",
107
+ paddingLeft: "calc(var(--mantine-spacing-xs) - 2px)"
108
+ },
109
+ children: isLoading ? loadingComponent : isEmpty ? /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", style: { padding: "6px 8px" }, children: emptyMessage }) : children
110
+ }
111
+ ) })
112
+ ] });
113
+ };
114
+
115
+ export { CollapsibleSidebarGroup, SubshellLoader };
@@ -0,0 +1,45 @@
1
+ import { SubshellSidebarSection, SubshellNavItem } from './chunk-27COZ5AH.js';
2
+ import { useRouterContext } from './chunk-Q7DJKLEN.js';
3
+ import { Stack } from '@mantine/core';
4
+ import { IconSearch, IconChartBar, IconTrendingUp } from '@tabler/icons-react';
5
+ import { jsx, jsxs } from 'react/jsx-runtime';
6
+
7
+ var SEOSidebarTop = () => {
8
+ return /* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconSearch, label: "SEO" });
9
+ };
10
+ var NAV_ITEMS = [
11
+ { label: "SEO Pages", to: "/seo", icon: IconChartBar, exact: true },
12
+ { label: "Metrics", to: "/seo/metrics", icon: IconTrendingUp, exact: false }
13
+ ];
14
+ var SEOSidebarMiddle = () => {
15
+ const { currentPath, navigate } = useRouterContext();
16
+ return /* @__PURE__ */ jsx(Stack, { gap: "xs", p: "sm", style: { flex: 1, overflowY: "auto" }, children: NAV_ITEMS.map((item) => {
17
+ const isActive = item.exact ? currentPath === item.to || currentPath === `${item.to}/` : currentPath.startsWith(item.to);
18
+ return /* @__PURE__ */ jsx(
19
+ SubshellNavItem,
20
+ {
21
+ icon: item.icon,
22
+ label: item.label,
23
+ isActive,
24
+ onClick: () => navigate(item.to)
25
+ },
26
+ item.to
27
+ );
28
+ }) });
29
+ };
30
+ var SEOSidebar = () => {
31
+ return /* @__PURE__ */ jsxs(Stack, { gap: 0, style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
32
+ /* @__PURE__ */ jsx(SEOSidebarTop, {}),
33
+ /* @__PURE__ */ jsx(SEOSidebarMiddle, {})
34
+ ] });
35
+ };
36
+
37
+ // src/features/seo/manifest.ts
38
+ var seoManifest = {
39
+ key: "seo",
40
+ label: "SEO",
41
+ sidebar: SEOSidebar,
42
+ subshellRoutes: ["/seo"]
43
+ };
44
+
45
+ export { SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, seoManifest };
@@ -1,14 +1,16 @@
1
1
  import { ChatHeader, ChatSidebar } from './chunk-ROSMICXG.js';
2
- import { SubshellSidebarSection, SubshellLoader, PageContainer, CollapsibleSidebarGroup, SubshellNavItem } from './chunk-OCP2MBTY.js';
2
+ import { SubshellLoader, CollapsibleSidebarGroup } from './chunk-IDACMRGQ.js';
3
3
  import { ResourceHealthPanel } from './chunk-ZG7MLOBE.js';
4
+ import { PageContainer } from './chunk-BZZCNLT6.js';
5
+ import { SubshellSidebarSection, SubshellNavItem } from './chunk-27COZ5AH.js';
4
6
  import { CustomModal, ConfirmationModal } from './chunk-GBMNCNHX.js';
5
- import { BaseNode, useGraphTheme, BaseEdge, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-2VEXBZNO.js';
7
+ import { BaseNode, useGraphTheme, BaseEdge, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-G3G2QEB6.js';
6
8
  import { useCyberColors, CyberDonut } from './chunk-KFICYU6S.js';
7
9
  import { AppShellLoader } from './chunk-YEX4MQSY.js';
10
+ import { getResourceStatusColor, useMergedExecution, useTimelineData, useAgentIterationData, getStatusIcon } from './chunk-XA34RETF.js';
8
11
  import { useStatusFilter, useResourceSearch, useResourcesDomainFilters, filterByDomainFilters, useCommandViewDomainFilters } from './chunk-PEZ4WOPF.js';
9
12
  import { useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, usePaginationState, useResources, useRecentExecutionsByResource, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStats, useResourceExecutions, useCheckpointTasks, useCalibrationProjects, useCalibrationProject, useAllCalibrationProjects, useCommandViewStore, useCalibrationSSE, useCalibrationRunFull, useExecuteRun, useGradeRun, useCalibrationRuns, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, showApiErrorNotification, showSuccessNotification, calibrationKeys, useDeleteProject, useCreateProject, useBulkDeleteExecutions } from './chunk-IPRMGSCV.js';
10
13
  import { useGraphHighlighting, calculateGraphHeight, Graph_module_css_default, GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
11
- import { getResourceStatusColor, useMergedExecution, useTimelineData, useAgentIterationData, getStatusIcon } from './chunk-XA34RETF.js';
12
14
  import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-ISHNN42L.js';
13
15
  import { SubshellContainer, SubshellSidebar, SubshellRightSideContainer, SubshellContentContainer } from './chunk-RX4UWZZR.js';
14
16
  import { JsonViewer, CardHeader, PageTitleCaption, CollapsibleSection, TabCountBadge, ResourceCard, ContextViewer, EmptyState, APIErrorAlert } from './chunk-Y3D3WFJG.js';
@@ -0,0 +1,35 @@
1
+ import { Table, Group, Text, Button } from '@mantine/core';
2
+ import { IconChevronUp, IconChevronDown, IconSelector, IconTrash } from '@tabler/icons-react';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
+
5
+ // src/components/table/SortableHeader.tsx
6
+ function SortableHeader({ column, children, sort, onToggle, style, w }) {
7
+ const isActive = sort.column === column;
8
+ return /* @__PURE__ */ jsx(Table.Th, { style: { ...style, cursor: "pointer", userSelect: "none" }, w, onClick: () => onToggle(column), children: /* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "nowrap", children: [
9
+ children,
10
+ isActive ? sort.direction === "asc" ? /* @__PURE__ */ jsx(IconChevronUp, { size: 14 }) : /* @__PURE__ */ jsx(IconChevronDown, { size: 14 }) : /* @__PURE__ */ jsx(IconSelector, { size: 14, style: { opacity: 0.3 } })
11
+ ] }) });
12
+ }
13
+ function TableSelectionToolbar({ selectedCount, onDelete, isDeleting }) {
14
+ if (selectedCount === 0) return null;
15
+ return /* @__PURE__ */ jsxs(Group, { gap: "sm", children: [
16
+ /* @__PURE__ */ jsxs(Text, { size: "sm", fw: 600, c: "blue", children: [
17
+ selectedCount,
18
+ " selected"
19
+ ] }),
20
+ onDelete && /* @__PURE__ */ jsx(
21
+ Button,
22
+ {
23
+ size: "sm",
24
+ color: "red",
25
+ variant: "light",
26
+ leftSection: /* @__PURE__ */ jsx(IconTrash, { size: 16 }),
27
+ loading: isDeleting,
28
+ onClick: onDelete,
29
+ children: "Delete"
30
+ }
31
+ )
32
+ ] });
33
+ }
34
+
35
+ export { SortableHeader, TableSelectionToolbar };