@cognizant-ai-lab/ui-common 1.14.0 → 1.15.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.
Files changed (101) hide show
  1. package/dist/Theme/Palettes.d.ts +1 -0
  2. package/dist/Theme/Palettes.js +13 -0
  3. package/dist/Theme/sheen.d.ts +172 -0
  4. package/dist/Theme/sheen.js +219 -0
  5. package/dist/components/AgentChat/ChatCommon/ChatCommon.js +111 -32
  6. package/dist/components/AgentChat/ChatCommon/ChatHistory.js +4 -3
  7. package/dist/components/AgentChat/ChatCommon/ControlButtons.js +27 -1
  8. package/dist/components/AgentChat/ChatCommon/Conversation.d.ts +2 -0
  9. package/dist/components/AgentChat/ChatCommon/Conversation.js +174 -18
  10. package/dist/components/AgentChat/ChatCommon/FormattedMarkdown.d.ts +12 -1
  11. package/dist/components/AgentChat/ChatCommon/FormattedMarkdown.js +20 -9
  12. package/dist/components/AgentChat/ChatCommon/SampleQueries.d.ts +1 -1
  13. package/dist/components/AgentChat/ChatCommon/SampleQueries.js +74 -17
  14. package/dist/components/AgentChat/ChatCommon/SendButton.js +32 -1
  15. package/dist/components/AgentChat/ChatCommon/SyntaxHighlighterThemes.d.ts +6 -0
  16. package/dist/components/AgentChat/ChatCommon/SyntaxHighlighterThemes.js +4 -1
  17. package/dist/components/AgentChat/Common/LlmChatButton.js +4 -2
  18. package/dist/components/AgentChat/VoiceChat/MicrophoneButton.js +5 -0
  19. package/dist/components/ChatBot/ChatBot.js +79 -25
  20. package/dist/components/CommandPalette/CommandPalette.d.ts +21 -0
  21. package/dist/components/CommandPalette/CommandPalette.js +411 -0
  22. package/dist/components/Common/ConfirmationModal.d.ts +2 -0
  23. package/dist/components/Common/ConfirmationModal.js +2 -2
  24. package/dist/components/Common/Footer.d.ts +2 -2
  25. package/dist/components/Common/Footer.js +86 -32
  26. package/dist/components/Common/LoadingSpinner.d.ts +2 -1
  27. package/dist/components/Common/LoadingSpinner.js +24 -3
  28. package/dist/components/Common/MUIDialog.js +1 -1
  29. package/dist/components/Common/Navbar.d.ts +4 -1
  30. package/dist/components/Common/Navbar.js +235 -43
  31. package/dist/components/Common/Snackbar.d.ts +1 -1
  32. package/dist/components/Common/Snackbar.js +81 -48
  33. package/dist/components/Common/Spotlight.d.ts +31 -0
  34. package/dist/components/Common/Spotlight.js +76 -0
  35. package/dist/components/ErrorPage/ErrorPage.js +1 -1
  36. package/dist/components/MultiAgentAccelerator/AgentFlow/AgentFlow.d.ts +14 -0
  37. package/dist/components/MultiAgentAccelerator/AgentFlow/AgentFlow.js +169 -96
  38. package/dist/components/MultiAgentAccelerator/AgentFlow/AgentNode.js +100 -23
  39. package/dist/components/MultiAgentAccelerator/AgentFlow/NetworkHud.d.ts +19 -0
  40. package/dist/components/MultiAgentAccelerator/AgentFlow/NetworkHud.js +128 -0
  41. package/dist/components/MultiAgentAccelerator/Editor/Const.d.ts +2 -1
  42. package/dist/components/MultiAgentAccelerator/Editor/Const.js +4 -2
  43. package/dist/components/MultiAgentAccelerator/Editor/NetworkEditorDock.js +62 -33
  44. package/dist/components/MultiAgentAccelerator/MultiAgentAccelerator.d.ts +2 -0
  45. package/dist/components/MultiAgentAccelerator/MultiAgentAccelerator.js +279 -72
  46. package/dist/components/MultiAgentAccelerator/NeuroSanStudioCallout.js +38 -22
  47. package/dist/components/MultiAgentAccelerator/PanelSeparator.d.ts +7 -1
  48. package/dist/components/MultiAgentAccelerator/PanelSeparator.js +44 -36
  49. package/dist/components/MultiAgentAccelerator/Publish/Publish.d.ts +30 -10
  50. package/dist/components/MultiAgentAccelerator/Publish/Publish.js +137 -42
  51. package/dist/components/MultiAgentAccelerator/Publish/PublishButton.d.ts +5 -2
  52. package/dist/components/MultiAgentAccelerator/Publish/PublishButton.js +45 -19
  53. package/dist/components/MultiAgentAccelerator/Publish/PublishConfirmation.d.ts +8 -2
  54. package/dist/components/MultiAgentAccelerator/Publish/PublishConfirmation.js +31 -4
  55. package/dist/components/MultiAgentAccelerator/Publish/PublishIconButton.d.ts +4 -2
  56. package/dist/components/MultiAgentAccelerator/Publish/PublishIconButton.js +17 -16
  57. package/dist/components/MultiAgentAccelerator/Publish/PublishPanel.d.ts +4 -2
  58. package/dist/components/MultiAgentAccelerator/Publish/PublishPanel.js +32 -2
  59. package/dist/components/MultiAgentAccelerator/Publish/PublishedNetworkUrl.js +3 -2
  60. package/dist/components/MultiAgentAccelerator/Publish/usePublishTarget.d.ts +2 -2
  61. package/dist/components/MultiAgentAccelerator/Publish/usePublishTarget.js +14 -7
  62. package/dist/components/MultiAgentAccelerator/Sidebar/AgentNetworkTreeItem.js +81 -53
  63. package/dist/components/MultiAgentAccelerator/Sidebar/Sidebar.js +40 -20
  64. package/dist/components/MultiAgentAccelerator/ThoughtBubbles/ThoughtBubbleOverlay.d.ts +4 -0
  65. package/dist/components/MultiAgentAccelerator/ThoughtBubbles/ThoughtBubbleOverlay.js +49 -28
  66. package/dist/components/MultiAgentAccelerator/Workspace/FloatingPanel.d.ts +21 -0
  67. package/dist/components/MultiAgentAccelerator/Workspace/FloatingPanel.js +57 -0
  68. package/dist/components/Settings/ApiKeyErrorBanner.d.ts +1 -0
  69. package/dist/components/Settings/ApiKeyErrorBanner.js +1 -1
  70. package/dist/components/Settings/ApiKeyInput.d.ts +2 -1
  71. package/dist/components/Settings/ApiKeyInput.js +31 -4
  72. package/dist/components/Settings/Byok/ByokInputs.d.ts +1 -1
  73. package/dist/components/Settings/Byok/ByokInputs.js +3 -1
  74. package/dist/components/Settings/Byok/ByokStorageTooltip.js +3 -2
  75. package/dist/components/Settings/Byok/ByokUnsavedChangesModal.d.ts +4 -0
  76. package/dist/components/Settings/Byok/ByokUnsavedChangesModal.js +3 -2
  77. package/dist/components/Settings/Byok/useByokKeyManager.d.ts +3 -2
  78. package/dist/components/Settings/Byok/useByokKeyManager.js +97 -27
  79. package/dist/components/Settings/FadingCheckmark.js +1 -1
  80. package/dist/components/Settings/PublishSettings.d.ts +4 -4
  81. package/dist/components/Settings/PublishSettings.js +33 -44
  82. package/dist/components/Settings/SettingsDialog.js +95 -41
  83. package/dist/components/Settings/SettingsLayout.d.ts +1 -3
  84. package/dist/components/Settings/SettingsLayout.js +41 -12
  85. package/dist/components/Settings/SettingsNav.d.ts +14 -0
  86. package/dist/components/Settings/SettingsNav.js +229 -0
  87. package/dist/components/Settings/SettingsRow.js +4 -1
  88. package/dist/controller/llm/Providers.d.ts +1 -0
  89. package/dist/controller/llm/Providers.js +4 -0
  90. package/dist/controller/publish/Publish.d.ts +34 -9
  91. package/dist/controller/publish/Publish.js +83 -23
  92. package/dist/index.d.ts +2 -0
  93. package/dist/index.js +2 -0
  94. package/dist/state/Publish.d.ts +25 -11
  95. package/dist/state/Publish.js +38 -3
  96. package/dist/state/Settings.d.ts +5 -79
  97. package/dist/state/Settings.js +36 -6
  98. package/dist/state/TemporaryNetworks.d.ts +12 -1
  99. package/dist/state/TemporaryNetworks.js +15 -8
  100. package/dist/tsconfig.build.tsbuildinfo +1 -1
  101. package/package.json +6 -4
@@ -17,60 +17,93 @@ limitations under the License.
17
17
  import CloseIcon from "@mui/icons-material/Close";
18
18
  import Box from "@mui/material/Box";
19
19
  import IconButton from "@mui/material/IconButton";
20
- import { alpha, styled, useTheme } from "@mui/material/styles";
20
+ import { keyframes, styled, useTheme } from "@mui/material/styles";
21
+ import { motion, useReducedMotion } from "motion/react";
21
22
  import { SnackbarContent, useSnackbar } from "notistack";
23
+ import { getSheen, glassSurface, gradientBorder, SHEEN_RADIUS, sheenGradient } from "../../Theme/sheen.js";
24
+ // notistack's default auto-hide duration (ms), used when the snackbar doesn't specify one
25
+ const DEFAULT_AUTO_HIDE_MS = 5000;
26
+ // Countdown for the progress line along the bottom of the toast
27
+ const DRAIN = keyframes `
28
+ from { transform: scaleX(1); }
29
+ to { transform: scaleX(0); }
30
+ `;
31
+ // Spring for the toast entrance
32
+ const TOAST_SPRING = { type: "spring", stiffness: 380, damping: 26, mass: 0.8 };
22
33
  // #region: Styled Components
23
- const IconBox = styled(Box)({
24
- display: "flex",
25
- "&.success": {
26
- color: "var(--bs-success)",
27
- },
28
- "&.error": {
29
- color: "var(--bs-danger)",
30
- },
31
- "&.warning": {
32
- color: "var(--bs-warning)",
33
- },
34
- "&.info": {
35
- color: "var(--bs-info)",
36
- },
34
+ // Status icon sitting in a small glowing disc tinted with the status color
35
+ const IconBox = styled(Box)(({ theme }) => {
36
+ const palette = (theme.vars ?? theme).palette;
37
+ const statusColor = (color) => ({
38
+ backgroundColor: theme.alpha(color, 0.16),
39
+ boxShadow: `inset 0 0 0 1px ${theme.alpha(color, 0.35)}, 0 0 16px -2px ${theme.alpha(color, 0.55)}`,
40
+ color,
41
+ });
42
+ return {
43
+ alignItems: "center",
44
+ borderRadius: "50%",
45
+ display: "flex",
46
+ flexShrink: 0,
47
+ height: "1.9rem",
48
+ justifyContent: "center",
49
+ marginRight: "0.7rem",
50
+ width: "1.9rem",
51
+ "& svg": { fontSize: "1.15rem", marginInlineEnd: "0 !important" },
52
+ "&.success": statusColor(palette.success.main),
53
+ "&.error": statusColor(palette.error.main),
54
+ "&.warning": statusColor(palette.warning.main),
55
+ "&.info": statusColor(palette.info.main),
56
+ };
37
57
  });
38
58
  // #endregion: Types
39
- export const Snackbar = ({ ref, description, hideIconVariant = false, iconVariant, id, message, variant, }) => {
59
+ export const Snackbar = ({ ref, anchorOrigin, autoHideDuration, description, hideIconVariant = false, iconVariant, id, message, persist, variant, }) => {
40
60
  const { closeSnackbar } = useSnackbar();
41
61
  const handleCloseSnackbar = () => closeSnackbar(id);
42
62
  const icon = iconVariant[variant];
43
- // Theming/Dark mode
44
63
  const theme = useTheme();
45
- const shadowColor = theme.palette.mode === "dark" ? theme.palette.common.white : theme.palette.common.black;
46
- return (_jsx(SnackbarContent, { ref: ref, role: "alert", children: _jsxs(Box, { className: `${variant}-snackbar-notification`, id: `${id}-snackbar-box`, "data-testid": `${id}-snackbar-box`, sx: {
47
- // A single line of text centers on the icon. With a description, the icon stays at the top.
48
- alignItems: description ? "flex-start" : "center",
49
- background: theme.palette.background.paper,
50
- borderColor: "transparent",
51
- borderRadius: "var(--bs-border-radius)",
52
- borderWidth: "1px",
53
- boxShadow: `0 6px 16px 0 ${alpha(shadowColor, 0.08)}, 0 3px 6px -4px ${alpha(shadowColor, 0.12)},
54
- 0 9px 28px 8px ${alpha(shadowColor, 0.05)}`,
55
- display: "flex",
56
- maxWidth: "450px",
57
- minWidth: "250px",
58
- padding: "0.9rem",
59
- // Room for the close button
60
- paddingRight: "2.5rem",
61
- }, children: [!hideIconVariant && (_jsx(Box, { id: `${id}-snackbar-icon-box-container`,
62
- // With a description, as tall as the title's first line so the icon centers on it
63
- sx: description
64
- ? { alignItems: "center", display: "flex", fontSize: "0.95rem", height: "1.5em" }
65
- : {}, children: _jsx(IconBox, { className: variant, "data-testid": `${id}-snackbar-icon-box`, id: `${id}-snackbar-icon-box`, children: icon }) })), _jsxs(Box, { id: `${id}-snackbar-content-box`, sx: { flex: 1, minWidth: 0, wordWrap: "break-word" }, children: [_jsx(Box, { id: `${id}-snackbar-message-box`, sx: {
66
- // If no description, this is the only message, so reduce font size
67
- fontSize: description ? "0.95rem" : "0.85rem",
68
- }, children: message }), _jsx(IconButton, { "aria-label": "close", id: `${id}-close-icon-btn`, onClick: handleCloseSnackbar, sx: {
69
- position: "absolute",
70
- right: 4,
71
- top: 4,
72
- }, children: _jsx(CloseIcon, { "data-testid": `${id}-close-icon`, id: `${id}-close-icon`, sx: {
73
- color: "var(--bs-gray-medium)",
74
- fontSize: "0.6em",
75
- } }) }), description && (_jsx(Box, { id: `${id}-snackbar-description-box`, sx: { fontSize: "0.8rem", paddingTop: "10px" }, children: description }))] })] }) }));
64
+ const reduceMotion = useReducedMotion();
65
+ // Slide in from the edge the toast is anchored to
66
+ const fromRight = anchorOrigin?.horizontal !== "left";
67
+ const hideAfterMs = autoHideDuration === undefined ? DEFAULT_AUTO_HIDE_MS : autoHideDuration;
68
+ const showProgress = !persist && hideAfterMs != null && hideAfterMs > 0;
69
+ return (_jsx(SnackbarContent, { ref: ref, role: "alert", children: _jsx(motion.div, { animate: { opacity: 1, x: 0, scale: 1 }, initial: reduceMotion ? { opacity: 0 } : { opacity: 0, x: fromRight ? 56 : -56, scale: 0.94 }, style: { transformOrigin: fromRight ? "right center" : "left center" }, transition: reduceMotion ? { duration: 0.2 } : TOAST_SPRING, children: _jsxs(Box, { className: `${variant}-snackbar-notification`, id: `${id}-snackbar-box`, "data-testid": `${id}-snackbar-box`, sx: {
70
+ // A single line of text centers on the icon. With a description, the icon stays at the top.
71
+ alignItems: description ? "flex-start" : "center",
72
+ // Frosted-glass toast with an iridescent hairline
73
+ ...glassSurface(theme, SHEEN_RADIUS),
74
+ ...gradientBorder(theme, SHEEN_RADIUS, 1, 0.45),
75
+ color: "text.primary",
76
+ display: "flex",
77
+ maxWidth: "450px",
78
+ minWidth: "250px",
79
+ overflow: "hidden",
80
+ padding: "0.9rem",
81
+ // Room for the close button
82
+ paddingRight: "2.5rem",
83
+ // Pause the countdown line while hovered, as notistack pauses the timer
84
+ "&:hover .snackbar-progress": { animationPlayState: "paused" },
85
+ }, children: [!hideIconVariant && (_jsx(Box, { id: `${id}-snackbar-icon-box-container`,
86
+ // With a description, as tall as the title's first line so the icon centers on it
87
+ sx: description ? { alignItems: "center", display: "flex", marginTop: "-0.2rem" } : {}, children: _jsx(IconBox, { className: variant, "data-testid": `${id}-snackbar-icon-box`, id: `${id}-snackbar-icon-box`, children: icon }) })), _jsxs(Box, { id: `${id}-snackbar-content-box`, sx: { flex: 1, minWidth: 0, wordWrap: "break-word" }, children: [_jsx(Box, { id: `${id}-snackbar-message-box`, sx: {
88
+ // If no description, this is the only message, so reduce font size
89
+ fontSize: description ? "0.95rem" : "0.85rem",
90
+ }, children: message }), _jsx(IconButton, { "aria-label": "close", id: `${id}-close-icon-btn`, onClick: handleCloseSnackbar, sx: {
91
+ position: "absolute",
92
+ right: 4,
93
+ top: 4,
94
+ }, children: _jsx(CloseIcon, { "data-testid": `${id}-close-icon`, id: `${id}-close-icon`, sx: {
95
+ color: "text.secondary",
96
+ fontSize: "0.6em",
97
+ } }) }), description && (_jsx(Box, { id: `${id}-snackbar-description-box`, sx: { fontSize: "0.8rem", paddingTop: "10px" }, children: description }))] }), showProgress && (_jsx(Box, { "aria-hidden": true, className: "snackbar-progress", "data-testid": `${id}-snackbar-progress`, sx: {
98
+ animation: `${DRAIN} ${hideAfterMs}ms linear forwards`,
99
+ backgroundImage: sheenGradient(theme, 90),
100
+ bottom: 0,
101
+ boxShadow: `0 0 10px ${getSheen(theme).glow}`,
102
+ height: "2px",
103
+ left: 0,
104
+ opacity: 0.9,
105
+ position: "absolute",
106
+ right: 0,
107
+ transformOrigin: "left center",
108
+ } }))] }) }) }));
76
109
  };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Cursor "spotlight": a soft radial glow, tinted with the sheen accent, that follows the pointer inside a surface.
3
+ * The pointer position is written to CSS custom properties (--spotlight-x / --spotlight-y) directly on the element,
4
+ * so moving the pointer never re-renders React.
5
+ */
6
+ import { BoxProps } from "@mui/material/Box";
7
+ import { CSSObject, Theme } from "@mui/material/styles";
8
+ import { PointerEvent as ReactPointerEvent } from "react";
9
+ /**
10
+ * Hook returning pointer handlers that track the pointer inside the element they are attached to, via CSS variables.
11
+ * Pair with `spotlightStyles` (or use the `Spotlight` component).
12
+ */
13
+ export declare const useSpotlight: () => {
14
+ onPointerMove: (event: ReactPointerEvent<HTMLElement>) => void;
15
+ onPointerLeave: (event: ReactPointerEvent<HTMLElement>) => void;
16
+ };
17
+ /**
18
+ * Styles painting the spotlight glow in an ::after pseudo-element. The host gets position: relative and
19
+ * isolation: isolate so the glow sits under the content.
20
+ * @param theme MUI theme (for the accent color)
21
+ * @param size Radius of the glow, in px
22
+ */
23
+ export declare const spotlightStyles: (theme: Theme, size?: number) => CSSObject;
24
+ interface SpotlightProps extends BoxProps {
25
+ readonly size?: number;
26
+ }
27
+ /**
28
+ * Box that paints a pointer-following glow behind its children. Combine with glassSurface for a "lit glass" card.
29
+ */
30
+ export declare const Spotlight: ({ size, sx, children, ...rest }: SpotlightProps) => import("react/jsx-runtime").JSX.Element;
31
+ export {};
@@ -0,0 +1,76 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ Copyright 2025 Cognizant Technology Solutions Corp, www.cognizant.com.
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ */
17
+ /**
18
+ * Cursor "spotlight": a soft radial glow, tinted with the sheen accent, that follows the pointer inside a surface.
19
+ * The pointer position is written to CSS custom properties (--spotlight-x / --spotlight-y) directly on the element,
20
+ * so moving the pointer never re-renders React.
21
+ */
22
+ import Box from "@mui/material/Box";
23
+ import { useCallback } from "react";
24
+ import { getSheen } from "../../Theme/sheen.js";
25
+ const SPOTLIGHT_X_VAR = "--spotlight-x";
26
+ const SPOTLIGHT_Y_VAR = "--spotlight-y";
27
+ const SPOTLIGHT_OPACITY_VAR = "--spotlight-opacity";
28
+ /**
29
+ * Hook returning pointer handlers that track the pointer inside the element they are attached to, via CSS variables.
30
+ * Pair with `spotlightStyles` (or use the `Spotlight` component).
31
+ */
32
+ export const useSpotlight = () => {
33
+ const onPointerMove = useCallback((event) => {
34
+ const element = event.currentTarget;
35
+ const rect = element.getBoundingClientRect();
36
+ element.style.setProperty(SPOTLIGHT_X_VAR, `${event.clientX - rect.left}px`);
37
+ element.style.setProperty(SPOTLIGHT_Y_VAR, `${event.clientY - rect.top}px`);
38
+ element.style.setProperty(SPOTLIGHT_OPACITY_VAR, "1");
39
+ }, []);
40
+ const onPointerLeave = useCallback((event) => {
41
+ event.currentTarget.style.setProperty(SPOTLIGHT_OPACITY_VAR, "0");
42
+ }, []);
43
+ return { onPointerMove, onPointerLeave };
44
+ };
45
+ /**
46
+ * Styles painting the spotlight glow in an ::after pseudo-element. The host gets position: relative and
47
+ * isolation: isolate so the glow sits under the content.
48
+ * @param theme MUI theme (for the accent color)
49
+ * @param size Radius of the glow, in px
50
+ */
51
+ export const spotlightStyles = (theme, size = 280) => {
52
+ const sheen = getSheen(theme);
53
+ return {
54
+ position: "relative",
55
+ isolation: "isolate",
56
+ "&::after": {
57
+ content: '""',
58
+ position: "absolute",
59
+ inset: 0,
60
+ zIndex: -1,
61
+ borderRadius: "inherit",
62
+ background: `radial-gradient(${size}px circle at var(${SPOTLIGHT_X_VAR}, 50%) var(${SPOTLIGHT_Y_VAR}, 50%), ` +
63
+ `${sheen.tint}, transparent 70%)`,
64
+ opacity: `var(${SPOTLIGHT_OPACITY_VAR}, 0)`,
65
+ transition: "opacity 0.35s ease",
66
+ pointerEvents: "none",
67
+ },
68
+ };
69
+ };
70
+ /**
71
+ * Box that paints a pointer-following glow behind its children. Combine with glassSurface for a "lit glass" card.
72
+ */
73
+ export const Spotlight = ({ size = 280, sx, children, ...rest }) => {
74
+ const handlers = useSpotlight();
75
+ return (_jsx(Box, { ...rest, ...handlers, sx: [(theme) => spotlightStyles(theme, size), ...(Array.isArray(sx) ? sx : [sx])], children: children }));
76
+ };
@@ -43,6 +43,6 @@ const ErrorPage = ({ id, errorText }) => {
43
43
  setPicture(undefined);
44
44
  await smartSignOut(currentUser, auth0Domain, auth0ClientId, oidcProvider);
45
45
  };
46
- return (_jsxs(_Fragment, { children: [_jsx(Navbar, { enableAuthentication: enableAuthentication, authenticationType: authenticationType, id: "nav-bar", logo: LOGO, logoServiceToken: logoServiceToken, pathname: router.pathname, query: router.query, signOut: handleSignOut, supportEmailAddress: supportEmailAddress, userInfo: userInfo }), _jsxs(Box, { id: id, sx: { marginLeft: "1rem" }, children: [_jsx(NeuroAIBreadcrumbs, {}), _jsx("h4", { id: "error-header", style: { color: "var(--bs-red)", marginTop: "1rem" }, children: "Oops, an internal error occurred on our end." }), _jsxs("div", { id: "error-div-1", children: [_jsxs(Box, { id: "no-need-to-worry", sx: { marginBottom: "1.5rem" }, children: [_jsx("b", { id: "bold-1", children: "There's no need to worry \u2013 you didn't do anything wrong." }), " This is a bug in our server and we'll fix it as soon as possible."] }), _jsx(Box, { id: "try-these-steps", sx: { marginBottom: "1.5rem" }, children: "To attempt to recover from the error, try these steps:" }), _jsx(Box, { id: "refresh-page", sx: { marginBottom: "1.5rem" }, children: _jsxs("ul", { id: "error-boundary-advice-list", className: "list-decimal list-inside", children: [_jsx("li", { id: "error-advice-refresh", children: "Refresh the page to see if the error goes away." }), _jsx("li", { id: "error-advice-reload", children: "Close and re-open your browser, then navigate back to the page where you encountered the error." })] }) }), "If none of that helps, please report the following error to the LEAF team:"] }), _jsx("div", { id: "error-text-div", style: { fontFamily: "monospace", marginTop: "1.5rem", marginBottom: "1.5rem" }, children: errorText }), "More information may be available in the browser console. Please include such information in your report if possible."] }), _jsx(Footer, { supportEmailAddress: supportEmailAddress, logoLinkUrl: "https://www.cognizant.com/", logoUrl: "/cognizant-logo-white.svg" })] }));
46
+ return (_jsxs(_Fragment, { children: [_jsx(Navbar, { enableAuthentication: enableAuthentication, authenticationType: authenticationType, id: "nav-bar", logo: LOGO, logoServiceToken: logoServiceToken, pathname: router.pathname, query: router.query, signOut: handleSignOut, supportEmailAddress: supportEmailAddress, userInfo: userInfo }), _jsxs(Box, { id: id, sx: { marginLeft: "1rem" }, children: [_jsx(NeuroAIBreadcrumbs, {}), _jsx(Box, { component: "h4", id: "error-header", sx: { color: "error.main", marginTop: "1rem" }, children: "Oops, an internal error occurred on our end." }), _jsxs("div", { id: "error-div-1", children: [_jsxs(Box, { id: "no-need-to-worry", sx: { marginBottom: "1.5rem" }, children: [_jsx("b", { id: "bold-1", children: "There's no need to worry \u2013 you didn't do anything wrong." }), " This is a bug in our server and we'll fix it as soon as possible."] }), _jsx(Box, { id: "try-these-steps", sx: { marginBottom: "1.5rem" }, children: "To attempt to recover from the error, try these steps:" }), _jsx(Box, { id: "refresh-page", sx: { marginBottom: "1.5rem" }, children: _jsxs("ul", { id: "error-boundary-advice-list", className: "list-decimal list-inside", children: [_jsx("li", { id: "error-advice-refresh", children: "Refresh the page to see if the error goes away." }), _jsx("li", { id: "error-advice-reload", children: "Close and re-open your browser, then navigate back to the page where you encountered the error." })] }) }), "If none of that helps, please report the following error to the LEAF team:"] }), _jsx("div", { id: "error-text-div", style: { fontFamily: "monospace", marginTop: "1.5rem", marginBottom: "1.5rem" }, children: errorText }), "More information may be available in the browser console. Please include such information in your report if possible."] }), _jsx(Footer, { supportEmailAddress: supportEmailAddress, logoLinkUrl: "https://www.cognizant.com/", logoUrl: "/cognizant-logo-white.svg" })] }));
47
47
  };
48
48
  export default ErrorPage;
@@ -6,6 +6,16 @@ import { AgentNetworkDefinitionEntry } from "../const.js";
6
6
  import { AgentIconSuggestions } from "../../../controller/Types/AgentIconSuggestions.js";
7
7
  import { ConnectivityInfo } from "../../../generated/neuro-san/NeuroSanClient.js";
8
8
  import { ThoughtBubbleEdgeShape } from "../ThoughtBubbles/ThoughtBubbleEdge.js";
9
+ /**
10
+ * Insets (px) of the part of the canvas that is not covered by floating UI (side panels, navbar). The canvas itself
11
+ * is full-bleed; the HUD, toolbar, thought bubbles and fit-view framing are kept inside this "safe area".
12
+ */
13
+ export interface CanvasSafeArea {
14
+ readonly top: number;
15
+ readonly right: number;
16
+ readonly bottom: number;
17
+ readonly left: number;
18
+ }
9
19
  export interface AgentFlowProps {
10
20
  readonly agentCounts?: Map<string, number>;
11
21
  readonly agentIconSuggestions?: AgentIconSuggestions;
@@ -25,6 +35,10 @@ export interface AgentFlowProps {
25
35
  /** The history key for the currently selected network (used to scope sly_data reads/writes per network). */
26
36
  readonly networkId?: string;
27
37
  readonly neuroSanURL?: string;
38
+ /**
39
+ * Region of the canvas left uncovered by floating panels. Defaults to the whole canvas.
40
+ */
41
+ readonly safeArea?: CanvasSafeArea;
28
42
  /**
29
43
  * Called after a popup save triggers a new network reservation that replaces the currently viewed network.
30
44
  * @param oldNetworkId The agent_name of the network that was replaced.