@workflow/web 5.0.0-beta.28 → 5.0.0-beta.29

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 (28) hide show
  1. package/build/client/assets/arrow-up-right-nUJMbeWN.js +15 -0
  2. package/build/client/assets/{encryption-BQTnudEZ.js → encryption-CLVP4klT.js} +2 -2
  3. package/build/client/assets/{entry.client-DQZ2hM2V.js → entry.client-Q4eUIqMI.js} +1 -1
  4. package/build/client/assets/{highlighted-body-B3W2YXNL-CQ-a-eYE.js → highlighted-body-B3W2YXNL-_4bJAUnT.js} +2 -2
  5. package/build/client/assets/{home-DuZRFOMe.js → home-W4Ja_rr1.js} +4 -4
  6. package/build/client/assets/{index-BXZSIDEp.js → index-Q81MFBxC.js} +22 -22
  7. package/build/client/assets/{index-ConSkUmc.js → index-STTN0-2V.js} +1 -1
  8. package/build/client/assets/manifest-56b6d9e0.js +1 -0
  9. package/build/client/assets/{mermaid-3ZIDBTTL-QcES6x1o.js → mermaid-3ZIDBTTL-BfwKRFTU.js} +33 -9
  10. package/build/client/assets/{root-BiHTsCtP.js → root-DOkL1_-J.js} +5 -15
  11. package/build/client/assets/root-okIQN2A_.css +1 -0
  12. package/build/client/assets/{run-detail-DSpZ5dnN.js → run-detail-CRleiBxx.js} +68 -98
  13. package/build/client/assets/server-build-H39y96IB.css +1 -0
  14. package/build/client/assets/{workflow-graph-viewer-CyKfZJOQ.js → workflow-graph-viewer-CvsdACR5.js} +3 -3
  15. package/build/client/assets/{zstd-browser-decoder-BigjGoI1.js → zstd-browser-decoder-bX851D8O.js} +2 -2
  16. package/build/server/assets/{app-Cl6-bhGd.js → app-jsOjV9W7.js} +1 -1
  17. package/build/server/assets/{highlighted-body-B3W2YXNL-Daljn6fi.js → highlighted-body-B3W2YXNL-DpTmbI4L.js} +2 -2
  18. package/build/server/assets/{index-B_N7SdQh.js → index-CJPCT6Jd.js} +3 -3
  19. package/build/server/assets/{mermaid-3ZIDBTTL-xnUhfFrD.js → mermaid-3ZIDBTTL-Dl6hRpcE.js} +2 -2
  20. package/build/server/assets/{server-build-D5Nuwxaw.js → server-build-BRxoSdNU.js} +431 -192
  21. package/build/server/assets/{token-DDgfwjzz.js → token-BqP-cpRD.js} +2 -2
  22. package/build/server/assets/{token-util-CthtfGuG.js → token-util-DaPlIe_a.js} +2 -2
  23. package/build/server/assets/{zstd-browser-decoder-zp5ZpR7T.js → zstd-browser-decoder-Cyb8--z9.js} +2 -2
  24. package/build/server/index.js +1 -1
  25. package/package.json +6 -6
  26. package/build/client/assets/manifest-bb838d97.js +0 -1
  27. package/build/client/assets/root-BT69a3LD.css +0 -1
  28. package/build/client/assets/server-build-BkKXPNcO.css +0 -1
@@ -1,8 +1,9 @@
1
- import { r as reactExports, j as jsxRuntimeExports, f as reactDomExports, G as ReactDOM, B as useNavigate, C as useSearchParams, A as Link, w as withComponentProps, H as useParams } from "./index-BXZSIDEp.js";
2
- import { C as Check, a as Copy, d as CircleAlert, U as parseStepName, G as parseWorkflowName, V as ErrorCard, Y as format, Z as Zap, S as Send, R as ResolveHookModal, t as ChevronUp, X, Q as ErrorBoundary, _ as Circle, u as unwrapOrThrow, W as WorkflowWebAPIError, K as unwrapServerActionResult, $ as useEscapeKeydown, w as composeEventHandlers, a0 as useCallbackRef, a1 as useLayoutEffect2, v as useControllableState, a2 as useId, a3 as createContext2, x as Presence, z as createContextScope, p as hideOthers, q as ReactRemoveScroll, a4 as useFocusGuards, a5 as LAYOUT, a6 as wakeUpRun, n as resumeHook, A as Alert, e as AlertTitle, g as getErrorTitle, h as AlertDescription, i as getErrorMessage, b as Skeleton$1, a7 as RunActionsButtons, H as StatusBadge, j as CopyableText, c as RelativeTime, T as Tabs, M as TabsList, N as TabsTrigger, O as TabsContent, B as cancelRun, a8 as recreateRun } from "./workflow-graph-viewer-CyKfZJOQ.js";
3
- import { c as createLucideIcon, W as cn, X as DataInspector, Y as DecryptClickContext, Z as Button, $ as Spinner, a0 as Lock, a1 as CollapsibleRoot, a2 as CollapsibleTrigger, a3 as CollapsibleContent, M as cva, a4 as RESERVED_ATTRIBUTE_KEY_PREFIX, a5 as ContextCardProvider, h as useToast, a6 as Skeleton, a7 as Yr, a8 as isEncryptedMarker, C as ChevronRight, a9 as TimestampTooltip, aa as formatDuration, ab as _r, ac as RunClickContext, ad as StreamClickContext, ae as Collapsible, af as isExpiredMarker, ag as isDoStreamStep, ah as extractConversation, ai as hasEncryptedFields, aj as getEventDataRefFields, ak as useSidebarDataOptional, al as clsx, am as useActiveSpan, an as useSidebarData, ao as Tooltip, ap as TooltipTrigger, aq as IconButton, ar as TooltipContent, H as ChevronDown, as as useRowWindow, at as isSpanDimmedBySearch, au as ROW_HEIGHT_PX, av as getSpanDurationMs, aw as isSpanErrored, ax as formatDurationPrecise, ay as TooltipProvider, az as ActiveSpanProvider, aA as useReducedMotion, aB as searchSpans, aC as computeRootBounds, aD as computeTimeMarkers, aE as clampViewportToRoot, aF as getHighResInMs, aG as scrollRowIntoView, aH as TIMELINE_PADDING_PX, aI as Minimap, aJ as Timeline, aK as TimelineHeader, aL as wheelZoomScaleFactor, aM as wheelDeltaToPixels, aN as SidebarDataProvider, aO as fetchHook, l as fetchEvents, aP as hydrateResourceIOAsync, J as fetchRun, aQ as fetchStep, aR as hydrateResourceIO, aS as fetchStreams, aT as Slot, I as useComposedRefs, aU as Slottable, e as cn$1, aV as buttonVariants, aW as fetchEvent, aX as fetchEventsByCorrelationId, aY as isEncryptedData, aZ as hydrateData, a_ as getWebRevivers, T as Tooltip$1, a as TooltipTrigger$1, b as TooltipContent$1, a$ as LIVE_UPDATE_INTERVAL_MS$1, u as useServerConfig, b0 as getEncryptionKeyForRun, t as toast, L as LoaderCircle, b1 as StreamViewer } from "./mermaid-3ZIDBTTL-QcES6x1o.js";
4
- import { decrypt, importKey } from "./encryption-BQTnudEZ.js";
5
- import "./index-ConSkUmc.js";
1
+ import { r as reactExports, j as jsxRuntimeExports, p as reactDomExports, G as ReactDOM, d as useNavigate, e as useSearchParams, c as Link, w as withComponentProps, H as useParams } from "./index-Q81MFBxC.js";
2
+ import { C as Check, a as Copy, d as CircleAlert, U as parseStepName, G as parseWorkflowName, V as ErrorCard, Y as format, Z as Zap, S as Send, R as ResolveHookModal, t as ChevronUp, X, Q as ErrorBoundary, _ as Circle, u as unwrapOrThrow, W as WorkflowWebAPIError, K as unwrapServerActionResult, $ as useEscapeKeydown, w as composeEventHandlers, a0 as useCallbackRef, a1 as useLayoutEffect2, v as useControllableState, a2 as useId, a3 as createContext2, x as Presence, z as createContextScope, p as hideOthers, q as ReactRemoveScroll, a4 as useFocusGuards, a5 as LAYOUT, a6 as wakeUpRun, n as resumeHook, A as Alert, e as AlertTitle, g as getErrorTitle, h as AlertDescription, i as getErrorMessage, b as Skeleton$1, a7 as RunActionsButtons, H as StatusBadge, j as CopyableText, c as RelativeTime, T as Tabs, M as TabsList, N as TabsTrigger, O as TabsContent, B as cancelRun, a8 as recreateRun } from "./workflow-graph-viewer-CvsdACR5.js";
3
+ import { c as createLucideIcon, W as cn, X as DataInspector, Y as DecryptClickContext, Z as Button, $ as Spinner, a0 as Lock, a1 as CollapsibleRoot, a2 as CollapsibleTrigger, a3 as CollapsibleContent, M as cva, a4 as RESERVED_ATTRIBUTE_KEY_PREFIX, a5 as ContextCardProvider, h as useToast, a6 as Skeleton, a7 as Yr, a8 as isEncryptedMarker, C as ChevronRight, a9 as TimestampTooltip, aa as formatDuration, ab as _r, ac as RunClickContext, ad as StreamClickContext, ae as Collapsible, af as isExpiredMarker, ag as isDoStreamStep, ah as extractConversation, ai as hasEncryptedFields, aj as getEventDataRefFields, ak as useSidebarDataOptional, al as clsx, am as useActiveSpan, an as useSidebarData, ao as Tooltip, ap as TooltipTrigger, aq as IconButton, ar as TooltipContent, H as ChevronDown, as as useRowWindow, at as isSpanDimmedBySearch, au as ROW_HEIGHT_PX, av as getSpanDurationMs, aw as isSpanErrored, ax as formatDurationPrecise, ay as TooltipProvider, az as ActiveSpanProvider, aA as useReducedMotion, aB as searchSpans, aC as computeRootBounds, aD as computeTimeMarkers, aE as clampViewportToRoot, aF as getHighResInMs, aG as scrollRowIntoView, aH as TIMELINE_PADDING_PX, aI as Minimap, aJ as Timeline, aK as TimelineHeader, aL as wheelZoomScaleFactor, aM as wheelDeltaToPixels, aN as SidebarDataProvider, aO as fetchHook, l as fetchEvents, aP as hydrateResourceIOAsync, J as fetchRun, aQ as fetchStep, aR as hydrateResourceIO, aS as fetchStreams, aT as Slot, I as useComposedRefs, aU as Slottable, e as cn$1, aV as buttonVariants, aW as fetchEvent, aX as fetchEventsByCorrelationId, aY as isEncryptedData, aZ as hydrateData, a_ as getWebRevivers, T as Tooltip$1, a as TooltipTrigger$1, b as TooltipContent$1, a$ as LIVE_UPDATE_INTERVAL_MS$1, u as useServerConfig, b0 as getEncryptionKeyForRun, t as toast, L as LoaderCircle, b1 as StreamViewer } from "./mermaid-3ZIDBTTL-BfwKRFTU.js";
4
+ import { A as ArrowUpRight } from "./arrow-up-right-nUJMbeWN.js";
5
+ import { decrypt, importKey } from "./encryption-CLVP4klT.js";
6
+ import "./index-STTN0-2V.js";
6
7
  /**
7
8
  * @license lucide-react v0.575.0 - ISC
8
9
  *
@@ -431,7 +432,7 @@ function CopyableDataBlock({ data }) {
431
432
  function isReservedAttributeKey(key) {
432
433
  return key.startsWith(RESERVED_ATTRIBUTE_KEY_PREFIX);
433
434
  }
434
- const rowValueVariants = cva("max-w-[60%] truncate text-right text-copy-13 text-gray-1000", {
435
+ const rowValueVariants = cva("min-w-0 flex-1 truncate text-right text-copy-13 text-gray-1000", {
435
436
  variants: {
436
437
  variant: {
437
438
  default: "",
@@ -442,7 +443,7 @@ const rowValueVariants = cva("max-w-[60%] truncate text-right text-copy-13 text-
442
443
  variant: "default"
443
444
  }
444
445
  });
445
- const rowCopyValueVariants = cva("flex min-w-0 max-w-[60%] items-center justify-end gap-1 text-copy-13 text-gray-1000", {
446
+ const rowCopyValueVariants = cva("flex min-w-0 flex-1 items-center justify-end gap-1 text-copy-13 text-gray-1000", {
446
447
  variants: {
447
448
  variant: {
448
449
  default: "",
@@ -453,9 +454,9 @@ const rowCopyValueVariants = cva("flex min-w-0 max-w-[60%] items-center justify-
453
454
  variant: "default"
454
455
  }
455
456
  });
456
- function DetailKeyValueRowBase({ label, value, copyText, removed = false, variant }) {
457
+ function DetailKeyValueRowBase({ label, value, copyText, href, removed = false, variant }) {
457
458
  const stringValue = typeof value === "string" ? value : void 0;
458
- return jsxRuntimeExports.jsxs("div", { className: "px-1.5 hover:bg-gray-100 flex justify-between gap-3 -mx-1.5 py-0.5 rounded items-center", children: [jsxRuntimeExports.jsx("span", { className: "flex min-w-0 items-center gap-1.5 truncate text-label-13 text-gray-900", children: label }), removed ? jsxRuntimeExports.jsx("span", { className: "shrink-0 text-copy-13 italic text-gray-700", children: "removed" }) : copyText ? jsxRuntimeExports.jsxs("div", { className: cn(rowCopyValueVariants({ variant })), title: copyText, children: [jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: cn(rowValueVariants({ variant, className: "text-right" })), style: { gridTemplateColumns: "minmax(0, 1fr)" } }), jsxRuntimeExports.jsx(CopyButton, { copyText, ariaLabel: `Copy ${label}`, className: "shrink-0 -mr-1" })] }) : jsxRuntimeExports.jsx("span", { className: cn(rowValueVariants({ variant })), title: stringValue, children: value })] });
459
+ return jsxRuntimeExports.jsxs("div", { className: "px-1.5 hover:bg-gray-100 flex justify-between gap-3 -mx-1.5 py-0.5 rounded items-center", children: [jsxRuntimeExports.jsx("span", { className: "flex min-w-0 items-center gap-1.5 truncate text-label-13 text-gray-900", children: label }), removed ? jsxRuntimeExports.jsx("span", { className: "shrink-0 text-copy-13 italic text-gray-700", children: "removed" }) : copyText ? jsxRuntimeExports.jsxs("div", { className: cn(rowCopyValueVariants({ variant })), title: copyText, children: [href ? jsxRuntimeExports.jsxs("a", { href, target: "_blank", rel: "noreferrer", className: cn(rowValueVariants({ variant }), "flex min-w-0 items-center gap-0.5 hover:underline"), children: [jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: "min-w-0 text-right", style: { gridTemplateColumns: "minmax(0, 1fr)" } }), jsxRuntimeExports.jsx(ArrowUpRight, { "aria-hidden": true, className: "h-3 w-3 shrink-0" })] }) : jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: cn(rowValueVariants({ variant, className: "text-right" })), style: { gridTemplateColumns: "minmax(0, 1fr)" } }), jsxRuntimeExports.jsx(CopyButton, { copyText, ariaLabel: `Copy ${label}`, className: "shrink-0 -mr-1" })] }) : jsxRuntimeExports.jsx("span", { className: cn(rowValueVariants({ variant })), title: stringValue, children: href ? jsxRuntimeExports.jsx("a", { href, target: "_blank", rel: "noreferrer", className: "hover:underline", children: value }) : value })] });
459
460
  }
460
461
  function DetailKeyValueRow(props) {
461
462
  return jsxRuntimeExports.jsx(DetailKeyValueRowBase, { ...props });
@@ -912,6 +913,12 @@ function PayloadBlock({ data, eventType }) {
912
913
  if (eventType === "attr_set") {
913
914
  return jsxRuntimeExports.jsx(AttrSetEventBlock, { data: cleaned });
914
915
  }
916
+ if (eventType === "run_cancelled") {
917
+ const cancelReason = cleaned != null && typeof cleaned === "object" && typeof cleaned.cancelReason === "string" ? cleaned.cancelReason : null;
918
+ if (cancelReason) {
919
+ return jsxRuntimeExports.jsxs("div", { className: "p-2 text-xs", style: { color: "var(--ds-gray-1000)" }, children: [jsxRuntimeExports.jsx("span", { style: { color: "var(--ds-gray-900)" }, children: "Reason: " }), jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words", children: cancelReason })] });
920
+ }
921
+ }
915
922
  return jsxRuntimeExports.jsxs("div", { className: "relative group/payload", children: [jsxRuntimeExports.jsx("div", { className: "overflow-x-auto p-2 text-[11px]", style: { color: "var(--ds-gray-1000)" }, children: jsxRuntimeExports.jsx(DataInspector, { data: cleaned, expandLevel: 2 }) }), jsxRuntimeExports.jsx("button", { type: "button", onClick: handleCopy, className: "absolute bottom-2 right-2 opacity-0 group-hover/payload:opacity-100 transition-opacity flex items-center gap-1 px-2 py-1 rounded-md text-xs hover:bg-[var(--ds-gray-alpha-200)]", style: { ...BUTTON_RESET_STYLE, color: "var(--ds-gray-700)" }, "aria-label": "Copy payload", children: copied ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Check, { className: "h-3 w-3", style: { color: "var(--ds-green-700)" } }), jsxRuntimeExports.jsx("span", { style: { color: "var(--ds-green-700)" }, children: "Copied" })] }) : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Copy, { className: "h-3 w-3" }), jsxRuntimeExports.jsx("span", { children: "Copy" })] }) })] });
916
923
  }
917
924
  const SORT_OPTIONS = [
@@ -1935,9 +1942,9 @@ const conversationTabs = [
1935
1942
  { id: "conversation", label: "Conversation" },
1936
1943
  { id: "json", label: "Raw JSON" }
1937
1944
  ];
1938
- function ConversationWithTabs({ conversation, args }) {
1945
+ function ConversationWithTabs({ conversation, args, defaultOpen, onOpenChange }) {
1939
1946
  const [activeTab, setActiveTab] = reactExports.useState("conversation");
1940
- return jsxRuntimeExports.jsx(Collapsible, { label: "Input", children: jsxRuntimeExports.jsx(TabbedContainer, { tabs: conversationTabs, activeTab, onTabChange: setActiveTab, ariaLabel: "Conversation view", children: activeTab === "conversation" ? jsxRuntimeExports.jsx(ConversationView, { messages: conversation }) : jsxRuntimeExports.jsx("div", { className: "p-3", children: Array.isArray(args) ? args.map((v, i) => jsxRuntimeExports.jsx("div", { className: "mt-2 first:mt-0", children: JsonBlock(v) }, i)) : JsonBlock(args) }) }) });
1947
+ return jsxRuntimeExports.jsx(Collapsible, { label: "Input", defaultOpen, onOpenChange, children: jsxRuntimeExports.jsx(TabbedContainer, { tabs: conversationTabs, activeTab, onTabChange: setActiveTab, ariaLabel: "Conversation view", children: activeTab === "conversation" ? jsxRuntimeExports.jsx(ConversationView, { messages: conversation }) : jsxRuntimeExports.jsx("div", { className: "p-3", children: Array.isArray(args) ? args.map((v, i) => jsxRuntimeExports.jsx("div", { className: "mt-2 first:mt-0", children: JsonBlock(v) }, i)) : JsonBlock(args) }) }) });
1941
1948
  }
1942
1949
  function EncryptedFieldBlock() {
1943
1950
  return jsxRuntimeExports.jsx(EncryptedDataBlock, {});
@@ -2139,7 +2146,7 @@ const attributeToDisplayFn = {
2139
2146
  },
2140
2147
  input: (value, context) => {
2141
2148
  if (isEncryptedMarker(value)) {
2142
- return jsxRuntimeExports.jsx(Collapsible, { label: "Input", children: jsxRuntimeExports.jsx(EncryptedFieldBlock, {}) });
2149
+ return jsxRuntimeExports.jsx(Collapsible, { label: "Input", defaultOpen: context == null ? void 0 : context.sectionOpen, onOpenChange: context == null ? void 0 : context.onSectionOpenChange, children: jsxRuntimeExports.jsx(EncryptedFieldBlock, {}) });
2143
2150
  }
2144
2151
  if (isExpiredMarker(value))
2145
2152
  return jsxRuntimeExports.jsx(ExpiredFieldBlock, {});
@@ -2151,28 +2158,28 @@ const attributeToDisplayFn = {
2151
2158
  if ((context == null ? void 0 : context.stepName) && isDoStreamStep(context.stepName)) {
2152
2159
  const conversation = extractConversation(args);
2153
2160
  if (conversation && conversation.length > 0) {
2154
- return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(ConversationWithTabs, { conversation, args }), hasClosureVars && jsxRuntimeExports.jsx(Collapsible, { label: "Closure Variables", children: JsonBlock(closureVars) }), hasThisVal && jsxRuntimeExports.jsx(Collapsible, { label: "This Value", children: JsonBlock(thisVal) })] });
2161
+ return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(ConversationWithTabs, { conversation, args, defaultOpen: context == null ? void 0 : context.sectionOpen, onOpenChange: context == null ? void 0 : context.onSectionOpenChange }), hasClosureVars && jsxRuntimeExports.jsx(Collapsible, { label: "Closure Variables", children: JsonBlock(closureVars) }), hasThisVal && jsxRuntimeExports.jsx(Collapsible, { label: "This Value", children: JsonBlock(thisVal) })] });
2155
2162
  }
2156
2163
  }
2157
2164
  if (!hasArgs && !hasClosureVars && !hasThisVal) {
2158
2165
  return jsxRuntimeExports.jsx(Collapsible, { label: "Input (no data)", disabled: true });
2159
2166
  }
2160
- return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Collapsible, { label: "Input", children: Array.isArray(args) ? args.map((v, i) => jsxRuntimeExports.jsx("div", { className: "mt-2 first:mt-0", children: JsonBlock(v) }, i)) : JsonBlock(args) }), hasClosureVars && jsxRuntimeExports.jsx(Collapsible, { label: "Closure Variables", children: JsonBlock(closureVars) }), hasThisVal && jsxRuntimeExports.jsx(Collapsible, { label: "Context", children: JsonBlock(thisVal) })] });
2167
+ return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Collapsible, { label: "Input", defaultOpen: context == null ? void 0 : context.sectionOpen, onOpenChange: context == null ? void 0 : context.onSectionOpenChange, children: Array.isArray(args) ? args.map((v, i) => jsxRuntimeExports.jsx("div", { className: "mt-2 first:mt-0", children: JsonBlock(v) }, i)) : JsonBlock(args) }), hasClosureVars && jsxRuntimeExports.jsx(Collapsible, { label: "Closure Variables", children: JsonBlock(closureVars) }), hasThisVal && jsxRuntimeExports.jsx(Collapsible, { label: "Context", children: JsonBlock(thisVal) })] });
2161
2168
  }
2162
2169
  if (!hasDisplayContent(value)) {
2163
2170
  return jsxRuntimeExports.jsx(Collapsible, { label: "Input (no data)", disabled: true });
2164
2171
  }
2165
- return jsxRuntimeExports.jsx(Collapsible, { label: "Input", children: Array.isArray(value) ? value.map((v, i) => jsxRuntimeExports.jsx("div", { className: "mt-2 first:mt-0", children: JsonBlock(v) }, i)) : JsonBlock(value) });
2172
+ return jsxRuntimeExports.jsx(Collapsible, { label: "Input", defaultOpen: context == null ? void 0 : context.sectionOpen, onOpenChange: context == null ? void 0 : context.onSectionOpenChange, children: Array.isArray(value) ? value.map((v, i) => jsxRuntimeExports.jsx("div", { className: "mt-2 first:mt-0", children: JsonBlock(v) }, i)) : JsonBlock(value) });
2166
2173
  },
2167
- output: (value) => {
2174
+ output: (value, context) => {
2168
2175
  if (isEncryptedMarker(value)) {
2169
- return jsxRuntimeExports.jsx(Collapsible, { label: "Output", children: jsxRuntimeExports.jsx(EncryptedFieldBlock, {}) });
2176
+ return jsxRuntimeExports.jsx(Collapsible, { label: "Output", defaultOpen: context == null ? void 0 : context.sectionOpen, onOpenChange: context == null ? void 0 : context.onSectionOpenChange, children: jsxRuntimeExports.jsx(EncryptedFieldBlock, {}) });
2170
2177
  }
2171
2178
  if (!hasDisplayContent(value))
2172
2179
  return null;
2173
2180
  if (isExpiredMarker(value))
2174
2181
  return jsxRuntimeExports.jsx(ExpiredFieldBlock, {});
2175
- return jsxRuntimeExports.jsx(Collapsible, { label: "Output", children: JsonBlock(value) });
2182
+ return jsxRuntimeExports.jsx(Collapsible, { label: "Output", defaultOpen: context == null ? void 0 : context.sectionOpen, onOpenChange: context == null ? void 0 : context.onSectionOpenChange, children: JsonBlock(value) });
2176
2183
  },
2177
2184
  error: (value) => {
2178
2185
  if (isEncryptedMarker(value)) {
@@ -2231,13 +2238,21 @@ const copyableBasicAttributes = /* @__PURE__ */ new Set([
2231
2238
  "deploymentId",
2232
2239
  "moduleSpecifier"
2233
2240
  ]);
2241
+ const loadingSectionLabels = {
2242
+ input: "Input",
2243
+ output: "Output",
2244
+ eventData: "Event Data"
2245
+ };
2234
2246
  const AttributeBlock = ({ attribute, value, isLoading, inline = false, context }) => {
2235
2247
  const decryptCtx = reactExports.useContext(DecryptClickContext);
2236
- const isExpandableLoadingTarget = attribute === "input" || attribute === "output" || attribute === "eventData";
2237
- if (isLoading && isExpandableLoadingTarget && !hasDisplayContent(value)) {
2238
- const label = attribute === "eventData" ? "Event Data" : attribute === "output" ? "Output" : "Input";
2248
+ const sectionOpenRef = reactExports.useRef(false);
2249
+ const handleSectionOpenChange = reactExports.useCallback((open) => {
2250
+ sectionOpenRef.current = open;
2251
+ }, []);
2252
+ const label = loadingSectionLabels[attribute];
2253
+ if (isLoading && label && !hasDisplayContent(value)) {
2239
2254
  if (decryptCtx == null ? void 0 : decryptCtx.hasEncryptedData) {
2240
- return jsxRuntimeExports.jsx(Collapsible, { label, defaultOpen: attribute === "eventData", children: jsxRuntimeExports.jsx(EncryptedFieldBlock, {}) });
2255
+ return jsxRuntimeExports.jsx(Collapsible, { label, defaultOpen: attribute === "eventData" || sectionOpenRef.current, onOpenChange: handleSectionOpenChange, children: jsxRuntimeExports.jsx(EncryptedFieldBlock, {}) });
2241
2256
  }
2242
2257
  return jsxRuntimeExports.jsx(Collapsible, { label });
2243
2258
  }
@@ -2245,7 +2260,11 @@ const AttributeBlock = ({ attribute, value, isLoading, inline = false, context }
2245
2260
  if (!displayFn) {
2246
2261
  return null;
2247
2262
  }
2248
- const displayValue = displayFn(value, context);
2263
+ const displayValue = displayFn(value, {
2264
+ ...context,
2265
+ sectionOpen: sectionOpenRef.current,
2266
+ onSectionOpenChange: handleSectionOpenChange
2267
+ });
2249
2268
  if (!displayValue) {
2250
2269
  return null;
2251
2270
  }
@@ -2257,7 +2276,7 @@ const AttributeBlock = ({ attribute, value, isLoading, inline = false, context }
2257
2276
  }
2258
2277
  return jsxRuntimeExports.jsxs("div", { className: "relative", children: [typeof isLoading === "boolean" && isLoading && jsxRuntimeExports.jsx("div", { className: "absolute top-9 right-4", children: jsxRuntimeExports.jsx("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2", style: { borderColor: "var(--ds-gray-900)" } }) }), jsxRuntimeExports.jsxs("div", { className: "my-2 flex flex-col gap-0", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 text-gray-1000 font-medium first-letter:uppercase", children: attribute }), jsxRuntimeExports.jsx("span", { className: "text-xs", style: { color: "var(--ds-gray-1000)" }, children: displayValue })] }, attribute)] });
2259
2278
  };
2260
- const AttributePanel = ({ data, moduleSpecifier, isLoading, error, expiredAt, onStreamClick, onRunClick, onDecrypt, isDecrypting = false, resource }) => {
2279
+ const AttributePanel = ({ data, moduleSpecifier, moduleSourceUrl, isLoading, error, expiredAt, onStreamClick, onRunClick, onDecrypt, isDecrypting = false, resource }) => {
2261
2280
  const displayData = reactExports.useMemo(() => {
2262
2281
  const result = { ...data };
2263
2282
  const execCtx = data.executionContext;
@@ -2330,7 +2349,7 @@ const AttributePanel = ({ data, moduleSpecifier, isLoading, error, expiredAt, on
2330
2349
  const displayValue = (_a = attributeToDisplayFn[attribute]) == null ? void 0 : _a.call(attributeToDisplayFn, displayData[attribute]);
2331
2350
  const isCopyableBasicAttribute = copyableBasicAttributes.has(attribute) && typeof displayValue === "string";
2332
2351
  const label = getAttributeDisplayName(attribute);
2333
- return jsxRuntimeExports.jsx(DetailMonoKeyValueRow, { label, value: displayValue, copyText: isCopyableBasicAttribute ? displayValue : void 0 }, attribute);
2352
+ return jsxRuntimeExports.jsx(DetailMonoKeyValueRow, { label, value: displayValue, copyText: isCopyableBasicAttribute ? displayValue : void 0, href: attribute === "moduleSpecifier" ? moduleSourceUrl : void 0 }, attribute);
2334
2353
  }), isLoading && resource === "sleep" && !displayData.resumeAt && jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-3 py-0.5", children: [jsxRuntimeExports.jsx("span", { className: "text-label-13 text-gray-900", children: "Resume" }), jsxRuntimeExports.jsx(Skeleton, { className: "h-4 w-[55%]" })] })] }) })] }), error ? jsxRuntimeExports.jsx(ErrorCard, { title: "Failed to load resource details", details: error.message, className: "my-4" }) : hasExpired ? jsxRuntimeExports.jsx(ExpiredDataMessage, {}) : resolvedAttributes.length > 0 ? resolvedAttributes.map((attribute) => jsxRuntimeExports.jsx(AttributeBlock, { isLoading, attribute, value: displayData[attribute], context: displayContext }, attribute)) : null] }) }) }) });
2335
2354
  };
2336
2355
  const ERROR_EVENT_TYPES = /* @__PURE__ */ new Set(["step_failed", "step_retrying"]);
@@ -2611,7 +2630,7 @@ function useSelectedSpanDetail(selectedSpan, fetchSpanDetail) {
2611
2630
  function isHook(data) {
2612
2631
  return data !== null && typeof data === "object" && "hookId" in data;
2613
2632
  }
2614
- function EntityDetailPanel({ run, onStreamClick, onRunClick, fetchSpanDetail, onWakeUpSleep, onLoadEventData, onResolveHook, encryptionKey, onDecrypt, isDecrypting = false, selectedSpan, showSeparateEventOccurrenceTimestamps = false }) {
2633
+ function EntityDetailPanel({ run, onStreamClick, onRunClick, fetchSpanDetail, onWakeUpSleep, onLoadEventData, onResolveHook, encryptionKey, onDecrypt, isDecrypting = false, selectedSpan, showSeparateEventOccurrenceTimestamps = false, getModuleSourceUrl }) {
2615
2634
  const toast2 = useToast();
2616
2635
  const [stoppingSleep, setStoppingSleep] = reactExports.useState(false);
2617
2636
  const [showResolveHookModal, setShowResolveHookModal] = reactExports.useState(false);
@@ -2755,6 +2774,18 @@ function EntityDetailPanel({ run, onStreamClick, onRunClick, fetchSpanDetail, on
2755
2774
  }
2756
2775
  return void 0;
2757
2776
  }, [displayData, run.workflowName]);
2777
+ const moduleSourceUrl = reactExports.useMemo(() => {
2778
+ if (!getModuleSourceUrl || !moduleSpecifier)
2779
+ return void 0;
2780
+ const parsed = parseStepName(moduleSpecifier) ?? parseWorkflowName(moduleSpecifier);
2781
+ if (!parsed)
2782
+ return void 0;
2783
+ const dataDeploymentId = displayData.deploymentId;
2784
+ return getModuleSourceUrl({
2785
+ moduleSpecifier: parsed.moduleSpecifier,
2786
+ deploymentId: typeof dataDeploymentId === "string" ? dataDeploymentId : run.deploymentId
2787
+ });
2788
+ }, [getModuleSourceUrl, moduleSpecifier, displayData, run.deploymentId]);
2758
2789
  if (!selectedSpan || !resource || !resourceId) {
2759
2790
  return null;
2760
2791
  }
@@ -2768,7 +2799,7 @@ function EntityDetailPanel({ run, onStreamClick, onRunClick, fetchSpanDetail, on
2768
2799
  }, children: [jsxRuntimeExports.jsx(Zap, { className: "h-4 w-4" }), stoppingSleep ? "Waking up..." : "Wake Up Sleep"] }), resource === "hook" && canResolveHook && jsxRuntimeExports.jsxs("button", { type: "button", onClick: () => setShowResolveHookModal(true), disabled: resolvingHook, className: clsx("flex items-center justify-center gap-2 rounded-md px-3 py-2 text-sm font-medium", "disabled:opacity-50 disabled:cursor-not-allowed transition-colors", resolvingHook ? "opacity-50 cursor-not-allowed" : "cursor-pointer"), style: {
2769
2800
  background: "var(--ds-gray-1000)",
2770
2801
  color: "var(--ds-background-100)"
2771
- }, children: [jsxRuntimeExports.jsx(Send, { className: "h-4 w-4" }), "Resolve Hook"] })] })] }), jsxRuntimeExports.jsx(AttributePanel, { data: displayData, moduleSpecifier, expiredAt: run.expiredAt, isLoading: loading, error: error ?? void 0, onStreamClick, onRunClick, onDecrypt, isDecrypting, resource }), rawEvents && jsxRuntimeExports.jsx(EventsList, { events: rawEvents, onLoadEventData, onStreamClick, onRunClick, encryptionKey, showSeparateEventOccurrenceTimestamps })] }) }), jsxRuntimeExports.jsx(ResolveHookModal, { isOpen: showResolveHookModal, onClose: () => setShowResolveHookModal(false), onSubmit: handleResolveHook, isSubmitting: resolvingHook })] });
2802
+ }, children: [jsxRuntimeExports.jsx(Send, { className: "h-4 w-4" }), "Resolve Hook"] })] })] }), jsxRuntimeExports.jsx(AttributePanel, { data: displayData, moduleSpecifier, moduleSourceUrl, expiredAt: run.expiredAt, isLoading: loading, error: error ?? void 0, onStreamClick, onRunClick, onDecrypt, isDecrypting, resource }), rawEvents && jsxRuntimeExports.jsx(EventsList, { events: rawEvents, onLoadEventData, onStreamClick, onRunClick, encryptionKey, showSeparateEventOccurrenceTimestamps })] }) }), jsxRuntimeExports.jsx(ResolveHookModal, { isOpen: showResolveHookModal, onClose: () => setShowResolveHookModal(false), onSubmit: handleResolveHook, isSubmitting: resolvingHook })] });
2772
2803
  }
2773
2804
  function useIntersectionObserver(elementRef, { threshold = 0, rootRef, rootMargin = "0%", freezeOnceVisible = false } = {}) {
2774
2805
  const [entry, setEntry] = reactExports.useState();
@@ -3074,7 +3105,7 @@ function TraceDetailPanel({ containerRef, onNavigateToSpan, onClose }) {
3074
3105
  }, [selectedSpan == null ? void 0 : selectedSpan.data, selectedSpan == null ? void 0 : selectedSpan.resource]);
3075
3106
  if (!activeSpan)
3076
3107
  return null;
3077
- return jsxRuntimeExports.jsxs("aside", { ref: asideRef, id: DETAIL_PANEL_ID, className: "relative flex flex-col h-full max-h-full shrink-0 bg-background-100 border-l border-gray-alpha-400", style: { width: panelWidth }, children: [jsxRuntimeExports.jsx(DraggableBorder, { element: asideRef, position: "left", onWidthChange: handleResize, onReset: () => handleResize(PANEL_DEFAULT_WIDTH), "aria-label": "Resize span details panel", "aria-controls": DETAIL_PANEL_ID, "aria-valuemin": PANEL_MIN_WIDTH, "aria-valuemax": panelMaxWidth, "aria-valuenow": Math.min(Math.max(Math.round(panelWidth), PANEL_MIN_WIDTH), panelMaxWidth) }), jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 shrink-0 px-4 py-[7.5px]", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 font-medium text-gray-1000 truncate block", children: selectedSpanName }), jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [jsxRuntimeExports.jsxs(Tooltip, { children: [jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate up", "aria-keyshortcuts": "K", onClick: handleSelectPrev, disabled: !prevSpanId, children: jsxRuntimeExports.jsx(ChevronUp, { className: "w-4 h-4" }) }) }), prevSpanId ? jsxRuntimeExports.jsxs(TooltipContent, { children: ["Navigate up", jsxRuntimeExports.jsx(Kbd, { children: "K" })] }) : null] }), jsxRuntimeExports.jsxs(Tooltip, { children: [jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate down", "aria-keyshortcuts": "J", onClick: handleSelectNext, disabled: !nextSpanId, children: jsxRuntimeExports.jsx(ChevronDown, { className: "w-4 h-4" }) }) }), nextSpanId ? jsxRuntimeExports.jsxs(TooltipContent, { children: ["Navigate down", jsxRuntimeExports.jsx(Kbd, { children: "J" })] }) : null] }), jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "w-px h-4 bg-gray-alpha-400 mx-1" }), jsxRuntimeExports.jsx(IconButton, { "aria-label": "Close span details", "aria-keyshortcuts": "Escape", onClick: onClose, children: jsxRuntimeExports.jsx(X, { className: "w-4 h-4" }) })] })] }), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children: jsxRuntimeExports.jsx(ErrorBoundary, { children: jsxRuntimeExports.jsx(EntityDetailPanel, { run: sidebar.run, onStreamClick: sidebar.onStreamClick, onRunClick: sidebar.onRunClick, fetchSpanDetail: sidebar.fetchSpanDetail, onWakeUpSleep: sidebar.onWakeUpSleep, onLoadEventData: sidebar.onLoadEventData, onResolveHook: sidebar.onResolveHook, encryptionKey: sidebar.encryptionKey, onDecrypt: sidebar.onDecrypt, isDecrypting: sidebar.isDecrypting, selectedSpan, showSeparateEventOccurrenceTimestamps: sidebar.showSeparateEventOccurrenceTimestamps }) }) })] });
3108
+ return jsxRuntimeExports.jsxs("aside", { ref: asideRef, id: DETAIL_PANEL_ID, className: "relative flex flex-col h-full max-h-full shrink-0 bg-background-100 border-l border-gray-alpha-400", style: { width: panelWidth }, children: [jsxRuntimeExports.jsx(DraggableBorder, { element: asideRef, position: "left", onWidthChange: handleResize, onReset: () => handleResize(PANEL_DEFAULT_WIDTH), "aria-label": "Resize span details panel", "aria-controls": DETAIL_PANEL_ID, "aria-valuemin": PANEL_MIN_WIDTH, "aria-valuemax": panelMaxWidth, "aria-valuenow": Math.min(Math.max(Math.round(panelWidth), PANEL_MIN_WIDTH), panelMaxWidth) }), jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 shrink-0 px-4 py-[7.5px]", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 font-medium text-gray-1000 truncate block", children: selectedSpanName }), jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [jsxRuntimeExports.jsxs(Tooltip, { children: [jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate up", "aria-keyshortcuts": "K", onClick: handleSelectPrev, disabled: !prevSpanId, children: jsxRuntimeExports.jsx(ChevronUp, { className: "w-4 h-4" }) }) }), prevSpanId ? jsxRuntimeExports.jsxs(TooltipContent, { children: ["Navigate up", jsxRuntimeExports.jsx(Kbd, { children: "K" })] }) : null] }), jsxRuntimeExports.jsxs(Tooltip, { children: [jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate down", "aria-keyshortcuts": "J", onClick: handleSelectNext, disabled: !nextSpanId, children: jsxRuntimeExports.jsx(ChevronDown, { className: "w-4 h-4" }) }) }), nextSpanId ? jsxRuntimeExports.jsxs(TooltipContent, { children: ["Navigate down", jsxRuntimeExports.jsx(Kbd, { children: "J" })] }) : null] }), jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "w-px h-4 bg-gray-alpha-400 mx-1" }), jsxRuntimeExports.jsx(IconButton, { "aria-label": "Close span details", "aria-keyshortcuts": "Escape", onClick: onClose, children: jsxRuntimeExports.jsx(X, { className: "w-4 h-4" }) })] })] }), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children: jsxRuntimeExports.jsx(ErrorBoundary, { children: jsxRuntimeExports.jsx(EntityDetailPanel, { run: sidebar.run, onStreamClick: sidebar.onStreamClick, onRunClick: sidebar.onRunClick, fetchSpanDetail: sidebar.fetchSpanDetail, onWakeUpSleep: sidebar.onWakeUpSleep, onLoadEventData: sidebar.onLoadEventData, onResolveHook: sidebar.onResolveHook, encryptionKey: sidebar.encryptionKey, onDecrypt: sidebar.onDecrypt, isDecrypting: sidebar.isDecrypting, selectedSpan, showSeparateEventOccurrenceTimestamps: sidebar.showSeparateEventOccurrenceTimestamps, getModuleSourceUrl: sidebar.getModuleSourceUrl }) }) })] });
3078
3109
  }
3079
3110
  const WorkflowIcon = () => {
3080
3111
  return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", style: { color: "currentColor" }, viewBox: "0 0 16 16", width: "16", children: jsxRuntimeExports.jsx("path", { d: "M5.75 7L6.4209 7.33594L4.85254 10.4717C5.38789 10.771 5.75 11.3431 5.75 12V14C5.75 14.9665 4.96648 15.75 4 15.75H2C1.03352 15.75 0.25 14.9665 0.25 14V12C0.25 11.0335 1.03352 10.25 2 10.25H3.28711L5.0791 6.66504L5.75 7ZM14 10.25C14.9665 10.25 15.75 11.0335 15.75 12V14C15.75 14.9665 14.9665 15.75 14 15.75H12C11.1185 15.75 10.3909 15.098 10.2695 14.25H7V12.75H10.25V12C10.25 11.0335 11.0335 10.25 12 10.25H14ZM2 11.75C1.86192 11.75 1.75 11.8619 1.75 12V14C1.75 14.1381 1.86192 14.25 2 14.25H4C4.13808 14.25 4.25 14.1381 4.25 14V12C4.25 11.8619 4.13808 11.75 4 11.75H2ZM12 11.75C11.8619 11.75 11.75 11.8619 11.75 12V14C11.75 14.1381 11.8619 14.25 12 14.25H14C14.1381 14.25 14.25 14.1381 14.25 14V12C14.25 11.8619 14.1381 11.75 14 11.75H12ZM9 0.25C9.96649 0.25 10.75 1.03351 10.75 2V4C10.75 4.44642 10.5808 4.85197 10.3057 5.16113L12.2041 8.6416L10.8877 9.36035L8.91895 5.75H7C6.03351 5.75 5.25 4.96649 5.25 4V2C5.25 1.03351 6.03351 0.25 7 0.25H9ZM7 1.75C6.86193 1.75 6.75 1.86193 6.75 2V4C6.75 4.13807 6.86193 4.25 7 4.25H9C9.13807 4.25 9.25 4.13807 9.25 4V2C9.25 1.86193 9.13807 1.75 9 1.75H7Z", fill: "currentColor" }) });
@@ -3115,11 +3146,12 @@ const EventRow = ({ span, isSelected, isDimmed, onSelectSpan }) => {
3115
3146
  const EventList = ({ spans, activeSpanId, searchResult, onSelectSpan }) => {
3116
3147
  const listRef = reactExports.useRef(null);
3117
3148
  const { start, end } = useRowWindow(listRef, spans.length, ROW_HEIGHT_PX);
3118
- return jsxRuntimeExports.jsx("ul", { ref: listRef, id: "event-list", role: "tree", className: "block min-h-0 overflow-visible divide-y divide-gray-alpha-400 border-b border-gray-alpha-400", style: {
3149
+ return jsxRuntimeExports.jsx("ul", { ref: listRef, id: "event-list", role: "tree", className: "block min-h-0 overflow-visible divide-y divide-gray-400 border-b border-gray-400", style: {
3119
3150
  paddingTop: start * ROW_HEIGHT_PX,
3120
3151
  paddingBottom: (spans.length - end) * ROW_HEIGHT_PX
3121
3152
  }, children: spans.slice(start, end).map((span) => jsxRuntimeExports.jsx(EventRow, { span, isSelected: span.spanId === activeSpanId, isDimmed: isSpanDimmedBySearch(span.spanId, searchResult), onSelectSpan }, span.spanId)) });
3122
3153
  };
3154
+ const SPLIT_PANE_START_ID = "trace-split-start";
3123
3155
  function SplitPane({ children, className, startHeader, endHeader, scrollContainerRef }) {
3124
3156
  const parts = reactExports.Children.toArray(children);
3125
3157
  if (parts.length !== 2) {
@@ -3127,19 +3159,9 @@ function SplitPane({ children, className, startHeader, endHeader, scrollContaine
3127
3159
  }
3128
3160
  const [start, end] = parts;
3129
3161
  const [startPx, setStartPx] = reactExports.useState(DEFAULT_START_PX);
3130
- const [isDragging, setIsDragging] = reactExports.useState(false);
3131
3162
  const containerRef = reactExports.useRef(null);
3132
- const gutterRef = reactExports.useRef(null);
3133
- const rafRef = reactExports.useRef(null);
3134
- const pendingPx = reactExports.useRef(DEFAULT_START_PX);
3135
- const pointerIdRef = reactExports.useRef(null);
3163
+ const startRef = reactExports.useRef(null);
3136
3164
  const containerWidth = useElementWidth(containerRef);
3137
- reactExports.useEffect(() => {
3138
- return () => {
3139
- if (rafRef.current)
3140
- cancelAnimationFrame(rafRef.current);
3141
- };
3142
- }, []);
3143
3165
  const setContainerRef = reactExports.useCallback((node) => {
3144
3166
  containerRef.current = node;
3145
3167
  if (scrollContainerRef) {
@@ -3153,64 +3175,12 @@ function SplitPane({ children, className, startHeader, endHeader, scrollContaine
3153
3175
  const maxPx = el.getBoundingClientRect().width - MIN_PX - GUTTER_PX;
3154
3176
  return Math.min(maxPx, Math.max(MIN_PX, px));
3155
3177
  }, []);
3156
- reactExports.useEffect(() => {
3157
- if (!isDragging)
3158
- return;
3159
- const onPointerMove = (e) => {
3160
- if (e.pointerId !== pointerIdRef.current)
3161
- return;
3162
- const container = containerRef.current;
3163
- if (!container)
3164
- return;
3165
- const rect = container.getBoundingClientRect();
3166
- pendingPx.current = clampPx(e.clientX - rect.left);
3167
- if (!rafRef.current) {
3168
- rafRef.current = requestAnimationFrame(() => {
3169
- rafRef.current = null;
3170
- setStartPx(pendingPx.current);
3171
- });
3172
- }
3173
- };
3174
- const onPointerUp = (e) => {
3175
- if (e.pointerId !== pointerIdRef.current)
3176
- return;
3177
- const gutter2 = gutterRef.current;
3178
- if (gutter2 == null ? void 0 : gutter2.hasPointerCapture(e.pointerId)) {
3179
- gutter2.releasePointerCapture(e.pointerId);
3180
- }
3181
- if (rafRef.current) {
3182
- cancelAnimationFrame(rafRef.current);
3183
- rafRef.current = null;
3184
- }
3185
- pointerIdRef.current = null;
3186
- setIsDragging(false);
3187
- };
3188
- document.addEventListener("pointermove", onPointerMove);
3189
- document.addEventListener("pointerup", onPointerUp);
3190
- document.addEventListener("pointercancel", onPointerUp);
3191
- return () => {
3192
- document.removeEventListener("pointermove", onPointerMove);
3193
- document.removeEventListener("pointerup", onPointerUp);
3194
- document.removeEventListener("pointercancel", onPointerUp);
3195
- };
3196
- }, [isDragging, clampPx]);
3197
- const handlePointerDown = (e) => {
3198
- e.currentTarget.setPointerCapture(e.pointerId);
3199
- pointerIdRef.current = e.pointerId;
3200
- setIsDragging(true);
3201
- };
3202
- const handleLostPointerCapture = () => {
3203
- pointerIdRef.current = null;
3204
- setIsDragging(false);
3205
- if (rafRef.current) {
3206
- cancelAnimationFrame(rafRef.current);
3207
- rafRef.current = null;
3208
- }
3209
- };
3178
+ const handleWidthChange = reactExports.useCallback((next) => setStartPx(clampPx(next)), [clampPx]);
3179
+ const handleReset = reactExports.useCallback(() => setStartPx(clampPx(DEFAULT_START_PX)), [clampPx]);
3210
3180
  const effectiveStartPx = containerWidth > 0 ? Math.max(MIN_PX, Math.min(containerWidth - MIN_PX - GUTTER_PX, startPx)) : startPx;
3211
3181
  const colTemplate = paneColTemplate(effectiveStartPx);
3212
- const gutter = jsxRuntimeExports.jsx("div", { ref: gutterRef, className: "relative z-20 isolate flex shrink-0 cursor-col-resize justify-center", onPointerDown: handlePointerDown, onLostPointerCapture: handleLostPointerCapture, children: jsxRuntimeExports.jsx("span", { className: "pointer-events-none relative z-10 h-full w-px shrink-0 bg-gray-alpha-400", "aria-hidden": true }) });
3213
- return jsxRuntimeExports.jsxs("div", { className: cn("flex flex-col h-full min-h-0", className), children: [jsxRuntimeExports.jsxs("div", { className: "shrink-0 grid", style: { gridTemplateColumns: colTemplate }, children: [jsxRuntimeExports.jsx("div", { children: startHeader }), jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: jsxRuntimeExports.jsx("span", { className: "h-full w-px bg-gray-alpha-400", "aria-hidden": true }) }), jsxRuntimeExports.jsx("div", { children: endHeader })] }), jsxRuntimeExports.jsxs("div", { ref: setContainerRef, className: cn("grid flex-1 min-h-0 overflow-x-hidden overflow-y-auto", isDragging && "select-none"), style: { gridTemplateColumns: colTemplate }, children: [start, gutter, end] })] });
3182
+ const maxStartPx = Math.max(MIN_PX, containerWidth > 0 ? containerWidth - MIN_PX - GUTTER_PX : startPx);
3183
+ return jsxRuntimeExports.jsxs("div", { className: cn("flex flex-col h-full min-h-0", className), children: [jsxRuntimeExports.jsxs("div", { className: "shrink-0 grid", style: { gridTemplateColumns: colTemplate }, children: [jsxRuntimeExports.jsx("div", { children: startHeader }), jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: jsxRuntimeExports.jsx("span", { className: "h-full w-px bg-gray-alpha-400", "aria-hidden": true }) }), jsxRuntimeExports.jsx("div", { children: endHeader })] }), jsxRuntimeExports.jsxs("div", { ref: setContainerRef, className: "grid flex-1 min-h-0 overflow-x-hidden overflow-y-auto", style: { gridTemplateColumns: colTemplate }, children: [jsxRuntimeExports.jsx("div", { ref: startRef, id: SPLIT_PANE_START_ID, className: "min-w-0", children: start }), jsxRuntimeExports.jsxs("div", { className: "relative z-20 isolate flex shrink-0 justify-center", children: [jsxRuntimeExports.jsx("span", { className: "pointer-events-none relative z-10 h-full w-px shrink-0 bg-gray-alpha-400", "aria-hidden": true }), jsxRuntimeExports.jsx(DraggableBorder, { element: startRef, position: "right", onWidthChange: handleWidthChange, onReset: handleReset, "aria-label": "Resize event list", "aria-controls": SPLIT_PANE_START_ID, "aria-valuemin": MIN_PX, "aria-valuemax": maxStartPx, "aria-valuenow": Math.min(Math.max(Math.round(effectiveStartPx), MIN_PX), maxStartPx) })] }), end] })] });
3214
3184
  }
3215
3185
  const hint = "_hint_1dmsq_3";
3216
3186
  const styles = {
@@ -3287,8 +3257,8 @@ function useAnimatedViewport(initial) {
3287
3257
  const from = currentRef.current;
3288
3258
  const anim = { raf: 0, from, to: target, start: performance.now() };
3289
3259
  const tick = () => {
3290
- const t = Math.min((performance.now() - anim.start) / 150, 1);
3291
- const e = 1 - (1 - t) * (1 - t);
3260
+ const t = Math.min((performance.now() - anim.start) / 240, 1);
3261
+ const e = t < 0.5 ? 8 * t * t * t * t : 1 - (-2 * t + 2) ** 4 / 2;
3292
3262
  setViewportState({
3293
3263
  start: anim.from.start + (anim.to.start - anim.from.start) * e,
3294
3264
  end: anim.from.end + (anim.to.end - anim.from.end) * e