@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
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
3
  Copyright 2025 Cognizant Technology Solutions Corp, www.cognizant.com.
4
4
 
@@ -14,17 +14,19 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
14
  See the License for the specific language governing permissions and
15
15
  limitations under the License.
16
16
  */
17
+ import AddBoxRounded from "@mui/icons-material/AddBoxRounded";
17
18
  import Close from "@mui/icons-material/Close";
18
19
  import StopCircle from "@mui/icons-material/StopCircle";
19
20
  import Box from "@mui/material/Box";
20
21
  import IconButton from "@mui/material/IconButton";
21
22
  import Slide from "@mui/material/Slide";
22
23
  import Snackbar from "@mui/material/Snackbar";
23
- import { useTheme } from "@mui/material/styles";
24
+ import { alpha, useTheme } from "@mui/material/styles";
24
25
  import Tooltip from "@mui/material/Tooltip";
25
26
  import Typography from "@mui/material/Typography";
26
27
  import { ReactFlowProvider } from "@xyflow/react";
27
- import { useCallback, useEffect, useMemo, useRef, useState } from "react";
28
+ import { AnimatePresence, motion } from "motion/react";
29
+ import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
28
30
  import { useJoyride } from "react-joyride";
29
31
  import { Group, Panel, usePanelRef } from "react-resizable-panels";
30
32
  import { extractConversations } from "./AgentConversations.js";
@@ -33,18 +35,21 @@ import { AgentFlow } from "./AgentFlow/AgentFlow.js";
33
35
  import { extractAgentNetworkDesignerProgress } from "./AgentNetworkDesigner.js";
34
36
  import { AGENT_NETWORK_DEFINITION_KEY, AGENT_NETWORK_DESIGNER_ID, AGENT_NETWORK_HOCON, AGENT_NETWORK_NAME_KEY, EXPIRED_NETWORKS_CHECK_INTERVAL_MS, GRACE_PERIOD_MS, NEURO_SAN_CALLOUT_DELAY_MS, SHOW_TOUR_DELAY_MS, TRIGGER_APP_TOUR_EVENT_NAME, } from "./const.js";
35
37
  import { NeuroSanStudioCallout } from "./NeuroSanStudioCallout.js";
36
- import { PanelSeparator } from "./PanelSeparator.js";
38
+ import { PanelSeparator, SEPARATOR_HIT_WIDTH } from "./PanelSeparator.js";
37
39
  import { BYOK } from "./Schema/SlyData.js";
38
40
  import { Sidebar } from "./Sidebar/Sidebar.js";
39
41
  import { extractTemporaryNetworksFromMessage, isTemporaryNetwork, notifySaveError, streamNetworkDesignerUpsert, } from "./TemporaryNetworks.js";
40
42
  import { MAIN_TOUR_STEPS } from "./Tour/MainTourSteps.js";
43
+ import { FloatingPanel } from "./Workspace/FloatingPanel.js";
41
44
  import { getAgentFunction, getAgentNetworks, getConnectivity } from "../../controller/agent/Agent.js";
42
45
  import { getAgentIconSuggestions, getNetworkIconSuggestions } from "../../controller/agent/IconSuggestions.js";
43
46
  import { AnnouncementId, useAnnouncementsStore } from "../../state/Announcements.js";
44
47
  import { useAgentChatHistoryStore } from "../../state/ChatHistory.js";
48
+ import { usePublishStore } from "../../state/Publish.js";
45
49
  import { getApiKey, LLM_PROVIDER_API_KEY_FIELD, useSettingsStore } from "../../state/Settings.js";
46
50
  import { useTempNetworksStore } from "../../state/TemporaryNetworks.js";
47
51
  import { TourPromptState, useTourStore } from "../../state/Tour.js";
52
+ import { getSheen, glassSurface, glowShadow, gradientText, SHEEN_EASE, SHEEN_FONT_DISPLAY, SHEEN_RADIUS, SHEEN_RADIUS_SURFACE, sheenGradient, spinningBorder, } from "../../Theme/sheen.js";
48
53
  import { toDisplayName } from "../../utils/AgentName.js";
49
54
  import { getZIndex } from "../../utils/zIndexLayers.js";
50
55
  import { ChatCommon } from "../AgentChat/ChatCommon/ChatCommon.js";
@@ -55,14 +60,48 @@ import { ConfirmationModal, StyledButton } from "../Common/ConfirmationModal.js"
55
60
  import { MUIAlert } from "../Common/MUIAlert.js";
56
61
  import { MUIDialog } from "../Common/MUIDialog.js";
57
62
  import { closeNotification, NotificationType, sendNotification } from "../Common/notification.js";
63
+ // Gap (px) between the floating panels and the workspace edges
64
+ const WORKSPACE_GAP = 14;
65
+ // Widths (px) the side cards keep while sliding in/out, so their content slides rather than squishes
66
+ const SIDEBAR_SLIDE_WIDTH = 280;
67
+ const CHAT_SLIDE_WIDTH = 380;
68
+ // How long the panels' size transition runs when zen mode collapses / expands them (ms)
69
+ const PANEL_TRANSITION_MS = 650;
70
+ // Before the first measurement: roughly the floating navbar's height plus its margin (px)
71
+ const DEFAULT_TOP_OFFSET = 76;
72
+ // Treat panels at (or within rounding of) 0% as collapsed
73
+ const isCollapsedSize = (size) => size.asPercentage < 0.5;
58
74
  // Optimization to avoid creating a new empty map on every render
59
75
  const EMPTY_THOUGHT_BUBBLE_EDGES = new Map();
76
+ /**
77
+ * Maps an API key name to the corresponding LLM provider
78
+ */
79
+ const API_KEY_TO_PROVIDER = {
80
+ openai_api_key: "OpenAI",
81
+ anthropic_api_key: "Anthropic",
82
+ google_api_key: "Google",
83
+ };
84
+ /**
85
+ * Given a SlyData schema, returns the set of LLM providers that are supported by the agent network.
86
+ * @param agentLlmConfig The `llm_config` property of the SlyData schema, if any.
87
+ * @returns A Set of LLM providers for which BYOK keys are supported by the current network. Empty if none.
88
+ * @note Semantics are "oneOf": a key must be supplied for at least one of the named providers
89
+ */
90
+ const getSupportedLlmProviders = (agentLlmConfig) => {
91
+ const isByokKeyField = (key) => Object.hasOwn(API_KEY_TO_PROVIDER, key);
92
+ const parsedAgentLlmConfig = BYOK.safeParse(agentLlmConfig);
93
+ if (!parsedAgentLlmConfig.success || !parsedAgentLlmConfig.data.required?.includes("llm_config")) {
94
+ return new Set();
95
+ }
96
+ const providerKeys = Object.keys(parsedAgentLlmConfig.data.properties?.llm_config?.properties ?? {});
97
+ return new Set(providerKeys.filter(isByokKeyField).map((key) => API_KEY_TO_PROVIDER[key]));
98
+ };
60
99
  /**
61
100
  * Main Multi-Agent Accelerator component that contains the sidebar, agent flow, and chat components.
62
101
  * @param backendNeuroSanApiUrl Initial URL of the backend Neuro-San API. User can change this in the UI.
63
102
  * @param username Identifier to use for interactions with the backend (for personalization and tracking).
64
103
  */
65
- export const MultiAgentAccelerator = ({ defaultNeuroSanUrl, username, }) => {
104
+ export const MultiAgentAccelerator = ({ defaultNeuroSanUrl, startTour = false, username, }) => {
66
105
  // MUI theme
67
106
  const theme = useTheme();
68
107
  const enableZenMode = useSettingsStore((state) => state.settings.behavior.enableZenMode);
@@ -119,24 +158,57 @@ export const MultiAgentAccelerator = ({ defaultNeuroSanUrl, username, }) => {
119
158
  // Introductory tour
120
159
  // Track that the user requested the tour, and we should start it once network data is available
121
160
  const [tourRequested, setTourRequested] = useState(false);
161
+ // Asked to start the tour (e.g. "?tour=true" in the URL). An effect rather than the initial state, since on a
162
+ // direct page load the request only arrives after the first render, once the router has parsed the URL.
163
+ useEffect(() => {
164
+ if (startTour)
165
+ setTourRequested(true);
166
+ }, [startTour]);
122
167
  // Tour persisted status
123
168
  const tourStatus = useTourStore((s) => s.status);
124
169
  const setTourStatus = useTourStore((s) => s.setStatus);
170
+ // Tour tooltip: specular glass card with a gradient primary button (joyride takes plain inline styles)
171
+ const sheen = getSheen(theme);
172
+ const themeVars = theme.vars ?? theme;
125
173
  const { controls, Tour } = useJoyride({
126
174
  continuous: true,
127
175
  steps: MAIN_TOUR_STEPS,
128
176
  options: {
129
177
  buttons: ["back", "close", "primary", "skip"],
130
- backgroundColor: "var(--bs-secondary)",
131
- textColor: "var(--bs-white)",
132
- primaryColor: "var(--bs-accent3-medium)",
133
- arrowColor: "var(--bs-secondary)",
134
- overlayColor: "rgba(var(--bs-primary-rgb), 0.82)",
178
+ backgroundColor: themeVars.palette.background.paper,
179
+ textColor: themeVars.palette.text.primary,
180
+ primaryColor: themeVars.palette.primary.main,
181
+ arrowColor: themeVars.palette.background.paper,
182
+ overlayColor: alpha(theme.palette.background.default, 0.72),
183
+ spotlightRadius: SHEEN_RADIUS,
135
184
  showProgress: true,
136
185
  zIndex: getZIndex(3, theme),
137
186
  skipBeacon: true,
138
187
  skipScroll: true,
139
188
  },
189
+ styles: {
190
+ tooltip: {
191
+ backgroundImage: `linear-gradient(180deg, ${sheen.tint}, transparent 45%)`,
192
+ border: `1px solid ${sheen.glassBorder}`,
193
+ borderRadius: SHEEN_RADIUS_SURFACE,
194
+ boxShadow: `inset 0 1px 0 ${sheen.highlight}, ${glowShadow(theme, 40)}`,
195
+ },
196
+ tooltipTitle: {
197
+ fontFamily: SHEEN_FONT_DISPLAY,
198
+ fontSize: "1.25rem",
199
+ fontWeight: 500,
200
+ },
201
+ buttonPrimary: {
202
+ backgroundImage: sheenGradient(theme),
203
+ borderRadius: 999,
204
+ boxShadow: glowShadow(theme, 16),
205
+ color: themeVars.palette.primary.contrastText,
206
+ fontWeight: 600,
207
+ padding: "8px 16px",
208
+ },
209
+ buttonBack: { color: themeVars.palette.text.secondary },
210
+ buttonSkip: { color: themeVars.palette.text.secondary },
211
+ },
140
212
  locale: {
141
213
  last: "End Tour",
142
214
  skip: "Exit Tour",
@@ -154,6 +226,67 @@ export const MultiAgentAccelerator = ({ defaultNeuroSanUrl, username, }) => {
154
226
  const chatRef = useRef(null);
155
227
  const leftPanelRef = usePanelRef();
156
228
  const rightPanelRef = usePanelRef();
229
+ // Workspace geometry. The workspace is full-bleed: it is pulled up under the floating navbar and out to the
230
+ // viewport edges, so we measure where it would naturally start (via a zero-size sentinel) and offset by that.
231
+ const sentinelRef = useRef(null);
232
+ const [naturalOffset, setNaturalOffset] = useState({
233
+ top: DEFAULT_TOP_OFFSET,
234
+ left: 0,
235
+ });
236
+ useLayoutEffect(() => {
237
+ const measure = () => {
238
+ const rect = sentinelRef.current?.getBoundingClientRect();
239
+ if (!rect)
240
+ return;
241
+ const next = {
242
+ top: Math.max(0, Math.round(rect.top + window.scrollY)),
243
+ left: Math.max(0, Math.round(rect.left + window.scrollX)),
244
+ };
245
+ setNaturalOffset((prev) => (prev.top === next.top && prev.left === next.left ? prev : next));
246
+ };
247
+ measure();
248
+ window.addEventListener("resize", measure);
249
+ // Web fonts can change the navbar's height once they load
250
+ void document.fonts?.ready?.then(measure);
251
+ return () => window.removeEventListener("resize", measure);
252
+ }, []);
253
+ // Current sizes of the side panels, for keeping the canvas chrome inside the uncovered area
254
+ const [leftPanelSize, setLeftPanelSize] = useState(null);
255
+ const [rightPanelSize, setRightPanelSize] = useState(null);
256
+ // Collapsed state of the side panels: follows the panel sizes (e.g. dragged shut), and is set directly by zen mode
257
+ const [isLeftCollapsed, setIsLeftCollapsed] = useState(false);
258
+ const [isRightCollapsed, setIsRightCollapsed] = useState(false);
259
+ const handleLeftPanelResize = useCallback((size) => {
260
+ setLeftPanelSize(size);
261
+ setIsLeftCollapsed(isCollapsedSize(size));
262
+ }, []);
263
+ const handleRightPanelResize = useCallback((size) => {
264
+ setRightPanelSize(size);
265
+ setIsRightCollapsed(isCollapsedSize(size));
266
+ }, []);
267
+ // True while zen mode is animating the side panels in or out
268
+ const [isPanelTransitioning, setIsPanelTransitioning] = useState(false);
269
+ const panelTransitionTimerRef = useRef(null);
270
+ const startPanelTransition = useCallback(() => {
271
+ setIsPanelTransitioning(true);
272
+ if (panelTransitionTimerRef.current)
273
+ clearTimeout(panelTransitionTimerRef.current);
274
+ panelTransitionTimerRef.current = setTimeout(() => {
275
+ panelTransitionTimerRef.current = null;
276
+ setIsPanelTransitioning(false);
277
+ }, PANEL_TRANSITION_MS);
278
+ }, []);
279
+ useEffect(() => () => {
280
+ if (panelTransitionTimerRef.current)
281
+ clearTimeout(panelTransitionTimerRef.current);
282
+ }, []);
283
+ // Region of the canvas not covered by the navbar or the floating panels
284
+ const safeArea = useMemo(() => ({
285
+ top: naturalOffset.top + WORKSPACE_GAP,
286
+ right: WORKSPACE_GAP + (rightPanelSize?.inPixels ?? 0) + SEPARATOR_HIT_WIDTH,
287
+ bottom: WORKSPACE_GAP,
288
+ left: WORKSPACE_GAP + (leftPanelSize?.inPixels ?? 0) + SEPARATOR_HIT_WIDTH,
289
+ }), [leftPanelSize?.inPixels, naturalOffset.top, rightPanelSize?.inPixels]);
157
290
  // Clear chat whenever the user navigates to the Agent Network Designer, so they start fresh each time
158
291
  useEffect(() => {
159
292
  if (selectedNetwork === AGENT_NETWORK_DESIGNER_ID) {
@@ -233,33 +366,6 @@ export const MultiAgentAccelerator = ({ defaultNeuroSanUrl, username, }) => {
233
366
  chatRef.current?.handleStop();
234
367
  resetState();
235
368
  }, [resetState]);
236
- /**
237
- * Maps an API key name to the corresponding LLM provider
238
- */
239
- const apiKeyToProvider = useCallback((key) => {
240
- switch (key) {
241
- case "openai_api_key":
242
- return "OpenAI";
243
- case "anthropic_api_key":
244
- return "Anthropic";
245
- default:
246
- return null;
247
- }
248
- }, []);
249
- /**
250
- * Given a SlyData schema, returns the set of LLM providers that are supported by the agent network.
251
- * @note Semantics are "oneOf": a key must be supplied for at least one of the named providers
252
- */
253
- const getSupportedLlmProviders = useCallback((schema) => {
254
- const parsed = BYOK.safeParse(schema);
255
- if (!parsed.success || !parsed.data.required?.includes("llm_config")) {
256
- return new Set();
257
- }
258
- const providerKeys = Object.keys(parsed.data.properties?.llm_config?.properties ?? {});
259
- return new Set(providerKeys
260
- .map((key) => apiKeyToProvider(key))
261
- .filter((provider) => provider !== null));
262
- }, [apiKeyToProvider]);
263
369
  useEffect(() => {
264
370
  ;
265
371
  (async () => {
@@ -287,9 +393,10 @@ export const MultiAgentAccelerator = ({ defaultNeuroSanUrl, username, }) => {
287
393
  // Get agent function from server
288
394
  const agentFunction = await getAgentFunction(neuroSanURL, selectedNetwork, username);
289
395
  setNetworkDescription(agentFunction?.function?.description || "");
290
- const schema = agentFunction?.function?.sly_data_schema;
291
- setSupportedByokProviders(getSupportedLlmProviders(schema));
292
- setSlyDataSchema(schema);
396
+ const slyDataSchemaTemp = agentFunction?.function?.sly_data_schema;
397
+ const supportedLlmProviders = getSupportedLlmProviders(slyDataSchemaTemp);
398
+ setSupportedByokProviders(supportedLlmProviders);
399
+ setSlyDataSchema(slyDataSchemaTemp);
293
400
  }
294
401
  catch (e) {
295
402
  console.warn(`Unable to get agent details for network ${selectedNetwork}:`, e);
@@ -300,7 +407,7 @@ export const MultiAgentAccelerator = ({ defaultNeuroSanUrl, username, }) => {
300
407
  if (selectedNetwork && !isLegacyAgentType(selectedNetwork)) {
301
408
  void fetchAgentDetails();
302
409
  }
303
- }, [getSupportedLlmProviders, neuroSanURL, selectedNetwork, username]);
410
+ }, [neuroSanURL, selectedNetwork, username]);
304
411
  useEffect(() => {
305
412
  ;
306
413
  (async () => {
@@ -478,6 +585,9 @@ export const MultiAgentAccelerator = ({ defaultNeuroSanUrl, username, }) => {
478
585
  useAgentChatHistoryStore
479
586
  .getState()
480
587
  .copyHistory(selectedNetwork, replacement.agentInfo.agent_name);
588
+ // Move the publish state to the edited network, which has a new id. A publish that's still
589
+ // running finishes on the edited network.
590
+ usePublishStore.getState().replaceNetwork(selectedNetwork, replacement.agentInfo.agent_name);
481
591
  setSelectedNetwork(replacement.agentInfo.agent_name);
482
592
  }
483
593
  }
@@ -500,10 +610,13 @@ export const MultiAgentAccelerator = ({ defaultNeuroSanUrl, username, }) => {
500
610
  setIsStreaming(true);
501
611
  // Collapse outer panels for Zen mode
502
612
  if (enableZenMode) {
613
+ startPanelTransition();
503
614
  leftPanelRef?.current?.collapse();
504
615
  rightPanelRef?.current?.collapse();
616
+ setIsLeftCollapsed(true);
617
+ setIsRightCollapsed(true);
505
618
  }
506
- }, [enableZenMode, leftPanelRef, rightPanelRef]);
619
+ }, [enableZenMode, leftPanelRef, rightPanelRef, startPanelTransition]);
507
620
  const onStreamingComplete = useCallback(() => {
508
621
  // When streaming is complete, clean up any refs and state
509
622
  conversationsRef.current = null;
@@ -512,10 +625,13 @@ export const MultiAgentAccelerator = ({ defaultNeuroSanUrl, username, }) => {
512
625
  resetState();
513
626
  // Un-collapse outer panels for Zen mode
514
627
  if (enableZenMode) {
628
+ startPanelTransition();
515
629
  leftPanelRef?.current?.expand();
516
630
  rightPanelRef?.current?.expand();
631
+ setIsLeftCollapsed(leftPanelRef.current?.isCollapsed() === true);
632
+ setIsRightCollapsed(rightPanelRef.current?.isCollapsed() === true);
517
633
  }
518
- }, [enableZenMode, leftPanelRef, resetState, rightPanelRef]);
634
+ }, [enableZenMode, leftPanelRef, resetState, rightPanelRef, startPanelTransition]);
519
635
  const handleDeleteNetwork = (networkId, isExpired) => {
520
636
  if (isExpired) {
521
637
  // It's expired, so just delete it without confirmation
@@ -566,6 +682,11 @@ export const MultiAgentAccelerator = ({ defaultNeuroSanUrl, username, }) => {
566
682
  useEffect(() => {
567
683
  if (!tourRequested)
568
684
  return;
685
+ // If nothing is selected yet, pick the first network to show once the list has loaded
686
+ if (selectedNetwork == null && networks?.length > 0) {
687
+ setSelectedNetwork(networks[0].agent_name);
688
+ return;
689
+ }
569
690
  // Determine whether the sample network for the tour is ready
570
691
  const networkReady = selectedNetwork != null && agentsInNetwork?.length > 0;
571
692
  if (networkReady) {
@@ -580,29 +701,79 @@ export const MultiAgentAccelerator = ({ defaultNeuroSanUrl, username, }) => {
580
701
  return intersection.size === 0 ? supportedByokProviders : new Set();
581
702
  };
582
703
  const hasMissingApiKeys = getMissingApiKeys().size > 0;
583
- const getLeftPanel = () => (_jsx(Panel, { collapsible: true, defaultSize: "20%", id: "multi-agent-accelerator-left-panel", minSize: "10%", panelRef: leftPanelRef, children: _jsx(Sidebar, { id: "multi-agent-accelerator-sidebar", isAwaitingLlm: isAwaitingLlm, networkIconSuggestions: networkIconSuggestions, networks: networks, neuroSanServerURL: neuroSanURL, newlyAddedTemporaryNetworks: newlyAddedTemporaryNetworks, onDeleteNetwork: handleDeleteNetwork, onEditNetwork: handleEditNetwork, setSelectedNetwork: (newNetwork) => changeSelectedNetwork(newNetwork), temporaryNetworks: temporaryNetworks }) }));
584
- const getCenterPanel = () => (_jsx(Panel, { collapsible: true, defaultSize: "45%", id: "multi-agent-accelerator-center-panel", minSize: "10%", children: _jsx(ReactFlowProvider, { children: _jsx(Box, { id: "multi-agent-accelerator-agent-flow-container", sx: {
704
+ const getLeftPanel = () => (_jsx(Panel, { collapsible: true, defaultSize: "20%", id: "multi-agent-accelerator-left-panel", minSize: "10%", onResize: handleLeftPanelResize, panelRef: leftPanelRef, style: { overflow: "visible" }, children: _jsx(FloatingPanel, { collapsed: isLeftCollapsed, id: "multi-agent-accelerator-left-card", isTransitioning: isPanelTransitioning, minWidth: SIDEBAR_SLIDE_WIDTH, side: "left", children: _jsx(Sidebar, { id: "multi-agent-accelerator-sidebar", isAwaitingLlm: isAwaitingLlm, networkIconSuggestions: networkIconSuggestions, networks: networks, neuroSanServerURL: neuroSanURL, newlyAddedTemporaryNetworks: newlyAddedTemporaryNetworks, onDeleteNetwork: handleDeleteNetwork, onEditNetwork: handleEditNetwork, setSelectedNetwork: (newNetwork) => changeSelectedNetwork(newNetwork), temporaryNetworks: temporaryNetworks }) }) }));
705
+ // The center panel is a transparent window onto the canvas beneath: it only exists to be resized against (and
706
+ // as a tour anchor). Pointer events pass through to the canvas.
707
+ const getCenterPanel = () => (_jsx(Panel, { collapsible: true, defaultSize: "45%", id: "multi-agent-accelerator-center-panel", minSize: "10%", style: { pointerEvents: "none" } }));
708
+ // Full-bleed canvas layer behind the floating panels
709
+ const getCanvas = () => (_jsx(Box, { id: "multi-agent-accelerator-canvas", sx: { inset: 0, position: "absolute", zIndex: 0 }, children: _jsx(ReactFlowProvider, { children: _jsx(Box, { id: "multi-agent-accelerator-agent-flow-container", sx: {
585
710
  display: "flex",
586
- justifyContent: "center",
587
- alignItems: "center",
588
- width: "100%",
589
711
  height: "100%",
590
- margin: "0 auto",
591
- }, children: _jsx(AgentFlow, { agentCounts: agentCounts, agentsInNetwork: agentsInNetwork, agentIconSuggestions: agentIconSuggestions, extraSlyData: extraSlyData, id: "multi-agent-accelerator-agent-flow", currentConversations: currentConversations, currentUser: username, isAwaitingLlm: isAwaitingLlm, isEditingNetwork: isEditingNetwork, isStreaming: isStreaming, isTemporaryNetwork: isSelectedNetworkTemporary, networkDisplayName: networkDisplayName || "", networkId: isSelectedNetworkTemporary ? selectedNetwork : "", neuroSanURL: neuroSanURL, onSaveAgent: onSaveAgent, setIsEditingNetwork: setIsEditingNetwork, thoughtBubbleEdges: thoughtBubbleEdges, setSelectedNetwork: changeSelectedNetwork, setThoughtBubbleEdges: setThoughtBubbleEdges }, "multi-agent-accelerator-agent-flow") }) }) }));
592
- const getRightPanel = () => (_jsx(Panel, { collapsible: true, defaultSize: "35%", id: "multi-agent-accelerator-right-panel", minSize: "15%", panelRef: rightPanelRef, children: _jsx(ChatCommon, { agentPlaceholders: {
593
- [AGENT_NETWORK_DESIGNER_ID]: "Describe in plain language the network you would like to build.",
594
- }, currentUser: username, customAgentGreetings: {
595
- [AGENT_NETWORK_DESIGNER_ID]: "Let's build a network together!",
596
- }, extraSlyData: extraSlyData, id: "agent-network-ui", isAwaitingLlm: isAwaitingLlm, hasMissingApiKeys: hasMissingApiKeys, networkDescription: networkDescription, neuroSanURL: neuroSanURL, onChunkReceived: onChunkReceived, onStreamingComplete: onStreamingComplete, onStreamingStarted: onStreamingStarted, ref: chatRef, sampleQueries: sampleQueries, setIsAwaitingLlm: setIsAwaitingLlm, selectedNetwork: selectedNetwork, setSelectedNetwork: changeSelectedNetwork, slyDataSchema: slyDataSchema }, selectedNetwork ?? "no-network") }));
712
+ width: "100%",
713
+ }, children: _jsx(AgentFlow, { agentCounts: agentCounts, agentsInNetwork: agentsInNetwork, agentIconSuggestions: agentIconSuggestions, extraSlyData: extraSlyData, id: "multi-agent-accelerator-agent-flow", currentConversations: currentConversations, currentUser: username, isAwaitingLlm: isAwaitingLlm, isEditingNetwork: isEditingNetwork, isStreaming: isStreaming, isTemporaryNetwork: isSelectedNetworkTemporary, networkDisplayName: networkDisplayName || "", networkId: isSelectedNetworkTemporary ? selectedNetwork : "", neuroSanURL: neuroSanURL, onSaveAgent: onSaveAgent, safeArea: safeArea, setIsEditingNetwork: setIsEditingNetwork, thoughtBubbleEdges: thoughtBubbleEdges, setSelectedNetwork: changeSelectedNetwork, setThoughtBubbleEdges: setThoughtBubbleEdges }, "multi-agent-accelerator-agent-flow") }) }) }));
714
+ const getRightPanel = () => (_jsx(Panel, { collapsible: true, defaultSize: "35%", id: "multi-agent-accelerator-right-panel", minSize: "15%", onResize: handleRightPanelResize, panelRef: rightPanelRef, style: { overflow: "visible" }, children: _jsx(FloatingPanel, { collapsed: isRightCollapsed, id: "multi-agent-accelerator-right-card", isTransitioning: isPanelTransitioning, minWidth: CHAT_SLIDE_WIDTH, side: "right", children: _jsx(Box, { sx: { boxSizing: "border-box", height: "100%", p: 1 }, children: _jsx(ChatCommon, { agentPlaceholders: {
715
+ [AGENT_NETWORK_DESIGNER_ID]: "Describe in plain language the network you would like to build.",
716
+ }, currentUser: username, customAgentGreetings: {
717
+ [AGENT_NETWORK_DESIGNER_ID]: "Let's build a network together!",
718
+ }, extraSlyData: extraSlyData, id: "agent-network-ui", isAwaitingLlm: isAwaitingLlm, hasMissingApiKeys: hasMissingApiKeys, networkDescription: networkDescription, neuroSanURL: neuroSanURL, onChunkReceived: onChunkReceived, onStreamingComplete: onStreamingComplete, onStreamingStarted: onStreamingStarted, ref: chatRef, sampleQueries: sampleQueries, setIsAwaitingLlm: setIsAwaitingLlm, selectedNetwork: selectedNetwork, setSelectedNetwork: changeSelectedNetwork, slyDataSchema: slyDataSchema }, selectedNetwork ?? "no-network") }) }) }));
719
+ // Box positioned over the uncovered part of the canvas (between the floating panels)
720
+ const safeAreaSx = {
721
+ bottom: `${safeArea.bottom}px`,
722
+ left: `${safeArea.left}px`,
723
+ position: "absolute",
724
+ right: `${safeArea.right}px`,
725
+ top: `${safeArea.top}px`,
726
+ transition: `left 0.55s ${SHEEN_EASE}, right 0.55s ${SHEEN_EASE}`,
727
+ };
728
+ /**
729
+ * Empty state: with no network selected, a glowing prompt floats in the middle of the canvas.
730
+ */
731
+ const getEmptyState = () => (_jsx(AnimatePresence, { children: selectedNetwork == null && (_jsx(Box, { id: "multi-agent-accelerator-empty-state", sx: {
732
+ ...safeAreaSx,
733
+ alignItems: "center",
734
+ display: "flex",
735
+ justifyContent: "center",
736
+ pointerEvents: "none",
737
+ zIndex: 1,
738
+ }, children: _jsxs(motion.div, { animate: { opacity: 1, y: 0, scale: 1 }, exit: { opacity: 0, y: -12, scale: 0.97 }, initial: { opacity: 0, y: 18, scale: 0.96 }, style: { maxWidth: 520, padding: "0 16px", position: "relative", textAlign: "center" }, transition: { type: "spring", stiffness: 200, damping: 26 }, children: [_jsx(Box, { "aria-hidden": true, sx: {
739
+ background: `radial-gradient(circle, ${getSheen(theme).auroraA}, transparent 70%)`,
740
+ borderRadius: "50%",
741
+ height: 420,
742
+ left: "50%",
743
+ opacity: 0.8,
744
+ position: "absolute",
745
+ top: "50%",
746
+ transform: "translate(-50%, -50%)",
747
+ width: 420,
748
+ zIndex: -1,
749
+ } }), _jsx(Typography, { component: "h2", sx: {
750
+ ...gradientText(theme),
751
+ fontFamily: SHEEN_FONT_DISPLAY,
752
+ fontSize: { xs: "1.75rem", md: "2.25rem" },
753
+ fontWeight: 500,
754
+ letterSpacing: "-0.01em",
755
+ lineHeight: 1.15,
756
+ mb: 1.5,
757
+ }, children: "Select a network" }), _jsxs(Typography, { sx: { color: "text.secondary", fontSize: "1rem", lineHeight: 1.6, pointerEvents: "auto" }, children: ["Pick one from Agent Networks, or click", _jsx(IconButton, { "aria-label": "Open Agent Network Designer", id: "multi-agent-accelerator-empty-state-designer-button", onClick: () => changeSelectedNetwork(AGENT_NETWORK_DESIGNER_ID), size: "small", sx: {
758
+ mx: 0.25,
759
+ verticalAlign: "middle",
760
+ "&:hover": { boxShadow: glowShadow(theme, 16) },
761
+ }, children: _jsx(AddBoxRounded, { sx: { color: "primary.main", fontSize: "1.2rem" } }) }), "to design your own."] })] }) })) }));
597
762
  const getStopButton = () => isAwaitingLlm &&
598
763
  enableZenMode && (_jsx(Box, { id: "stop-button-container", sx: {
599
764
  position: "absolute",
600
- bottom: "1rem",
601
- right: "1rem",
765
+ bottom: `${WORKSPACE_GAP + 12}px`,
766
+ right: `${safeArea.right + 12}px`,
767
+ transition: `right 0.55s ${SHEEN_EASE}`,
602
768
  zIndex: getZIndex(2, theme),
603
769
  }, children: _jsx(Tooltip, { title: "Stop response (Esc)", children: _jsx(LlmChatButton, { "aria-label": "Stop", id: "stop-output-button", onClick: handleExternalStop, sx: {
770
+ ...glassSurface(theme, 999),
771
+ color: "error.main",
772
+ transition: "background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease",
604
773
  "&:hover": {
605
774
  backgroundColor: "error.main",
775
+ boxShadow: `0 0 28px -4px ${themeVars.palette.error.main}`,
776
+ color: "error.contrastText",
606
777
  },
607
778
  }, children: _jsx(StopCircle, { fontSize: "large", id: "stop-button-icon" }) }) }) }));
608
779
  const getDeleteNetworkConfirmationModal = () => confirmationModalOpen ? (_jsx(ConfirmationModal, { id: "delete-network-confirmation-modal", content: `The network "${toDisplayName(networkToBeDeleted)}" will be deleted. ` +
@@ -641,28 +812,44 @@ export const MultiAgentAccelerator = ({ defaultNeuroSanUrl, username, }) => {
641
812
  * Only displayed when Agent Network Designer is active.
642
813
  */
643
814
  const getProgressPopper = () => isStreaming &&
644
- isNetworkDesignerMode && (_jsx(Box, { sx: {
815
+ isNetworkDesignerMode && (_jsx(Box, { id: "multi-agent-accelerator-network-preview", sx: {
645
816
  position: "absolute",
646
- top: 0,
647
- left: 0,
648
- width: "600px",
649
- height: "600px",
817
+ top: `${safeArea.top + 64}px`,
818
+ left: `${safeArea.left + 12}px`,
819
+ width: "min(600px, 60vw)",
820
+ height: "min(600px, 70vh)",
650
821
  zIndex: getZIndex(2, theme),
651
822
  }, children: _jsx(ReactFlowProvider, { children: _jsxs(Box, { sx: {
823
+ // Live preview while the designer streams: glass with a rotating iridescent border
824
+ ...glassSurface(theme),
825
+ ...spinningBorder(theme),
652
826
  alignItems: "center",
653
- background: "var(--bs-secondary)",
654
- border: "4px solid var(--bs-yellow)",
827
+ boxShadow: glowShadow(theme),
655
828
  display: "flex",
656
829
  flexDirection: "column",
657
830
  height: "100%",
658
831
  justifyContent: "center",
659
832
  margin: "0 auto",
660
833
  maxWidth: 1000,
661
- opacity: "95%",
834
+ overflow: "hidden",
662
835
  width: "100%",
663
- }, children: [_jsx(Typography, { variant: "h6", sx: { padding: "0.5rem 1rem", fontWeight: "bold", color: "white" }, children: "Network Preview" }), agentsInNetworkDesigner?.length > 0 ? (_jsx(AgentFlow, { id: "and-network-preview", agentsInNetwork: agentsInNetworkDesigner, isAgentNetworkDesignerMode: true, isAwaitingLlm: false, isStreaming: false, thoughtBubbleEdges: EMPTY_THOUGHT_BUBBLE_EDGES }, "and-network-preview")) : (_jsx(Typography, { variant: "body1", sx: { color: "white" }, children: "Awaiting status from Agent Network Designer..." }))] }) }) }));
836
+ }, children: [_jsx(Typography, { variant: "h6", sx: {
837
+ color: "text.primary",
838
+ fontFamily: SHEEN_FONT_DISPLAY,
839
+ fontWeight: 500,
840
+ padding: "0.5rem 1rem",
841
+ }, children: "Network Preview" }), agentsInNetworkDesigner?.length > 0 ? (_jsx(AgentFlow, { id: "and-network-preview", agentsInNetwork: agentsInNetworkDesigner, isAgentNetworkDesignerMode: true, isAwaitingLlm: false, isStreaming: false, thoughtBubbleEdges: EMPTY_THOUGHT_BUBBLE_EDGES }, "and-network-preview")) : (_jsx(Typography, { variant: "body1", sx: { color: "text.secondary" }, children: "Awaiting status from Agent Network Designer..." }))] }) }) }));
664
842
  const getMissingApiKeysAlert = () => hasMissingApiKeys && (_jsx(MUIAlert, { closeable: false, id: "llm-chat-missing-api-keys-alert", severity: "warning", sx: {
665
- my: 1.5,
843
+ ...glassSurface(theme, SHEEN_RADIUS),
844
+ boxShadow: "0 18px 50px -18px rgba(0, 0, 0, 0.6)",
845
+ left: `calc(${safeArea.left}px + (100% - ${safeArea.left + safeArea.right}px) / 2)`,
846
+ maxWidth: `min(640px, calc(100% - ${safeArea.left + safeArea.right + 24}px))`,
847
+ position: "absolute",
848
+ top: `${safeArea.top + 64}px`,
849
+ transform: "translateX(-50%)",
850
+ transition: `left 0.55s ${SHEEN_EASE}`,
851
+ width: "100%",
852
+ zIndex: getZIndex(2, theme),
666
853
  "& .MuiAlert-message": {
667
854
  width: "100%",
668
855
  textAlign: "center",
@@ -695,14 +882,34 @@ export const MultiAgentAccelerator = ({ defaultNeuroSanUrl, username, }) => {
695
882
  position: "absolute",
696
883
  right: 4,
697
884
  top: 20,
885
+ zIndex: 1,
698
886
  "&:hover": {
699
887
  bgcolor: "action.hover",
700
888
  },
701
889
  }, children: _jsx(Close, { fontSize: "small" }) }), _jsx(NeuroSanStudioCallout, {})] }) }));
702
- return (_jsxs(_Fragment, { children: [getNeuroSanStudioCallout(), getMissingApiKeysAlert(), Tour, getTourModal(), getProgressPopper(), getDeleteNetworkConfirmationModal(), _jsxs(Box, { id: "multi-agent-accelerator-container", sx: {
890
+ return (_jsxs(_Fragment, { children: [getNeuroSanStudioCallout(), Tour, getTourModal(), getDeleteNetworkConfirmationModal(), _jsx(Box, { "aria-hidden": true, ref: sentinelRef, sx: { height: 0, width: "100%" } }), _jsxs(Box, { id: "multi-agent-accelerator-container", sx: {
891
+ // Full-bleed "mission control" workspace: the canvas fills the viewport, panels float over it
892
+ flexShrink: 0,
893
+ height: "100dvh",
894
+ isolation: "isolate",
895
+ marginLeft: `-${naturalOffset.left}px`,
896
+ marginTop: `-${naturalOffset.top}px`,
897
+ minHeight: 480,
898
+ overflow: "hidden",
703
899
  position: "relative",
704
- width: "100%",
705
- height: "100%",
706
- minHeight: 0,
707
- }, children: [_jsxs(Group, { children: [getLeftPanel(), _jsx(PanelSeparator, {}), getCenterPanel(), _jsx(PanelSeparator, {}), getRightPanel()] }), getStopButton()] })] }));
900
+ width: `calc(100% + ${naturalOffset.left * 2}px)`,
901
+ zIndex: 0,
902
+ }, children: [getCanvas(), getEmptyState(), _jsx(Box, { id: "multi-agent-accelerator-panels", sx: {
903
+ bottom: `${WORKSPACE_GAP}px`,
904
+ left: `${WORKSPACE_GAP}px`,
905
+ pointerEvents: "none",
906
+ position: "absolute",
907
+ right: `${WORKSPACE_GAP}px`,
908
+ top: `${naturalOffset.top + WORKSPACE_GAP}px`,
909
+ zIndex: 2,
910
+ // Zen mode: animate the panels' sizes while they collapse / expand
911
+ ...(isPanelTransitioning && {
912
+ "& [data-panel]": { transition: `flex-grow ${PANEL_TRANSITION_MS}ms ${SHEEN_EASE}` },
913
+ }),
914
+ }, children: _jsxs(Group, { style: { height: "100%", pointerEvents: "none" }, children: [getLeftPanel(), _jsx(PanelSeparator, {}), getCenterPanel(), _jsx(PanelSeparator, {}), getRightPanel()] }) }), getMissingApiKeysAlert(), getProgressPopper(), getStopButton()] })] }));
708
915
  };
@@ -1,37 +1,53 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import GitHubIcon from "@mui/icons-material/GitHub";
2
3
  import Box from "@mui/material/Box";
3
- import Paper from "@mui/material/Paper";
4
- import { alpha } from "@mui/material/styles";
5
4
  import Typography from "@mui/material/Typography";
6
- export const NeuroSanStudioCallout = () => (_jsxs(Paper, { "aria-label": "neuro-san-studio GitHub repository", component: "a", elevation: 4, href: "https://github.com/cognizant-ai-lab/neuro-san-studio", rel: "noopener noreferrer", sx: (theme) => {
7
- const paper = theme.palette.background.paper;
8
- const primary = theme.palette.primary.main;
5
+ import { getSheen, glassSurface, glowShadow, gradientBorder, SHEEN_EASE, sheenGradient } from "../../Theme/sheen.js";
6
+ export const NeuroSanStudioCallout = () => (_jsxs(Box, { "aria-label": "neuro-san-studio GitHub repository", component: "a", href: "https://github.com/cognizant-ai-lab/neuro-san-studio", rel: "noopener noreferrer", sx: (theme) => {
7
+ const sheen = getSheen(theme);
8
+ const border = gradientBorder(theme, undefined, 1, 0.35);
9
9
  return {
10
+ // Specular glass card with an iridescent hairline that lights up on hover
11
+ ...glassSurface(theme),
12
+ ...border,
13
+ "&::before": {
14
+ ...border["&::before"],
15
+ transition: `opacity 0.4s ${SHEEN_EASE}`,
16
+ },
10
17
  "&:hover": {
11
- backgroundImage: `linear-gradient(135deg, ${paper}, ${alpha(primary, 0.14)})`,
12
- borderColor: "primary.main",
13
- boxShadow: `0 0 0 3px ${alpha(primary, 0.22)}, ${theme.shadows[6]}`,
14
- color: "secondary.main",
18
+ boxShadow: glowShadow(theme, 28),
19
+ transform: "translateY(-3px)",
15
20
  },
16
- bgcolor: "background.paper",
17
- backgroundImage: `linear-gradient(135deg, ${paper}, ${alpha(primary, 0.06)})`,
18
- border: "1px solid",
19
- borderColor: "divider",
20
- borderRadius: 2,
21
+ "&:hover::before": { opacity: 1 },
22
+ "&:hover .callout-chip": { transform: "rotate(-6deg) scale(1.06)" },
23
+ "&:focus-visible": { boxShadow: glowShadow(theme, 28), outline: "none" },
21
24
  color: "text.primary",
22
25
  display: "block",
23
26
  mt: 2,
24
- p: 2,
25
- textAlign: "center",
27
+ p: 2.5,
26
28
  textDecoration: "none", // prevent underline on hover
27
- transition: theme.transitions.create(["color", "border-color", "box-shadow"], {
28
- duration: theme.transitions.duration.shortest,
29
+ transition: theme.transitions.create(["box-shadow", "transform"], {
30
+ duration: 400,
31
+ easing: SHEEN_EASE,
29
32
  }),
33
+ // Faint inner glow in the top-right corner
34
+ backgroundImage: `radial-gradient(120% 90% at 100% 0%, ${sheen.tint}, transparent 60%), ` +
35
+ `linear-gradient(180deg, ${sheen.highlight}, transparent 38%)`,
30
36
  };
31
- }, target: "_blank", children: [_jsx(Typography, { sx: { fontWeight: 700 }, variant: "body1", children: "\u2B50 Star us on GitHub!" }), _jsx(Typography, { sx: { mt: 0.5, mb: 1.25, opacity: 0.92 }, variant: "body2", children: "See the latest releases, explore examples, read the User Guide and help grow the community on GitHub." }), _jsx(Box, { alt: "GitHub Repo stars", component: "img", loading: "lazy", referrerPolicy: "no-referrer", src: "https://img.shields.io/github/stars/cognizant-ai-lab/neuro-san-studio?label=Neuro%20SAN%20Studio", sx: {
32
- borderRadius: 1,
33
- border: "1px solid",
34
- borderColor: "divider",
37
+ }, target: "_blank", children: [_jsxs(Box, { sx: { alignItems: "center", display: "flex", gap: 1.5 }, children: [_jsx(Box, { "aria-hidden": true, className: "callout-chip", sx: (theme) => ({
38
+ alignItems: "center",
39
+ backgroundImage: sheenGradient(theme),
40
+ borderRadius: "10px",
41
+ boxShadow: `inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 18px -6px ${getSheen(theme).glow}`,
42
+ color: (theme.vars ?? theme).palette.primary.contrastText,
43
+ display: "flex",
44
+ flexShrink: 0,
45
+ height: 36,
46
+ justifyContent: "center",
47
+ transition: `transform 0.4s ${SHEEN_EASE}`,
48
+ width: 36,
49
+ }), children: _jsx(GitHubIcon, { sx: { fontSize: 20 } }) }), _jsx(Typography, { sx: { fontWeight: 650, letterSpacing: "-0.01em" }, variant: "body1", children: "\u2B50 Star us on GitHub!" })] }), _jsx(Typography, { sx: { color: "text.secondary", lineHeight: 1.55, mt: 1.25, mb: 1.5 }, variant: "body2", children: "See the latest releases, explore examples, read the User Guide and help grow the community on GitHub." }), _jsx(Box, { alt: "GitHub Repo stars", component: "img", loading: "lazy", referrerPolicy: "no-referrer", src: "https://img.shields.io/github/stars/cognizant-ai-lab/neuro-san-studio?label=Neuro%20SAN%20Studio", sx: {
50
+ borderRadius: "6px",
35
51
  display: "inline-block",
36
52
  height: 20,
37
53
  verticalAlign: "middle",
@@ -1,5 +1,11 @@
1
1
  import { FC } from "react";
2
+ export declare const SEPARATOR_HIT_WIDTH = 14;
2
3
  /**
3
- * Styled Separator that wraps the default react-resizable-panels Separator component. It adds some visual flair.
4
+ * Slim glowing grab handle between the floating workspace panels. The separator itself is a transparent hit area
5
+ * (so the canvas shows through the gap between panels); the visible part is a short pill that lengthens and lights
6
+ * up with the iridescent gradient on hover, keyboard focus or while dragging.
7
+ *
8
+ * react-resizable-panels sets data-separator to "hover" | "active" | "focus" | "inactive" | "disabled", which we
9
+ * use for the interactive states.
4
10
  */
5
11
  export declare const PanelSeparator: FC;