@localstack/appinspector-ui 1.0.135 → 1.0.137

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -21,6 +21,10 @@ interface AppInspectorContextProviderProps {
21
21
  * when omitted. VS Code consumers pass `{ source: 'vscode', ideVersion, extensionVersion }`.
22
22
  */
23
23
  deploymentContainer?: DeploymentContainer;
24
+ /**
25
+ * Height of the host application's header in pixels. Defaults to 0.
26
+ */
27
+ headerHeight?: number;
24
28
  /**
25
29
  * A component that renders a link.
26
30
  */
package/dist/index.d.ts CHANGED
@@ -21,6 +21,10 @@ interface AppInspectorContextProviderProps {
21
21
  * when omitted. VS Code consumers pass `{ source: 'vscode', ideVersion, extensionVersion }`.
22
22
  */
23
23
  deploymentContainer?: DeploymentContainer;
24
+ /**
25
+ * Height of the host application's header in pixels. Defaults to 0.
26
+ */
27
+ headerHeight?: number;
24
28
  /**
25
29
  * A component that renders a link.
26
30
  */
package/dist/index.js CHANGED
@@ -18694,11 +18694,12 @@ var AppInspectorContextProvider = (props) => {
18694
18694
  const contextValue = useMemo5(
18695
18695
  () => ({
18696
18696
  deploymentContainer,
18697
+ headerHeight: props.headerHeight ?? 0,
18697
18698
  linkComponent: props.linkComponent,
18698
18699
  localstackEndpoint: props.localstackEndpoint,
18699
18700
  resolveLink
18700
18701
  }),
18701
- [deploymentContainer, props.linkComponent, props.localstackEndpoint, resolveLink]
18702
+ [deploymentContainer, props.headerHeight, props.linkComponent, props.localstackEndpoint, resolveLink]
18702
18703
  );
18703
18704
  return /* @__PURE__ */ jsx131(ApiProvider, { api, children: /* @__PURE__ */ jsx131(StatusProvider, { children: /* @__PURE__ */ jsx131(AppInspectorContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx131(AppInspectorAnalyticsBoundary, { children: props.children }) }) }) });
18704
18705
  };
@@ -31317,6 +31318,9 @@ var EventDetails = ({ onClose, selectedEvent }) => {
31317
31318
  const responsePayload = tryParseJson(selectedEvent.attributes?.["localstack.aws.service.response"]);
31318
31319
  if (parseNestedJson && isLambdaInvoke && responsePayload && typeof responsePayload === "object" && "Payload" in responsePayload) {
31319
31320
  responsePayload.Payload = tryParseJson(responsePayload.Payload);
31321
+ if (responsePayload.Payload && typeof responsePayload.Payload === "object" && "errorMessage" in responsePayload.Payload && typeof responsePayload.Payload.errorMessage === "string") {
31322
+ responsePayload.Payload.errorMessage = tryParseJson(responsePayload.Payload.errorMessage);
31323
+ }
31320
31324
  }
31321
31325
  const exceptionPayload = tryParseJson(selectedEvent.attributes?.["localstack.aws.service.exception"]);
31322
31326
  const hasPayloads = requestPayload !== void 0 || responsePayload !== void 0 || exceptionPayload !== void 0 || isResponseSuppressed;
@@ -31961,7 +31965,6 @@ var TraceGraph = ({
31961
31965
 
31962
31966
  // src/pages/trace-graph-page.tsx
31963
31967
  import { jsx as jsx145, jsxs as jsxs134 } from "react/jsx-runtime";
31964
- var HEADER_HEIGHT = 56;
31965
31968
  var DRAWER_WIDTH = "35%";
31966
31969
  var Main = styled("main", { shouldForwardProp: (property) => property !== "open" })(({ open, theme }) => ({
31967
31970
  flexGrow: 1,
@@ -31978,11 +31981,11 @@ var Main = styled("main", { shouldForwardProp: (property) => property !== "open"
31978
31981
  })
31979
31982
  }
31980
31983
  }));
31981
- var StyledDrawer = styled(Drawer)(() => ({
31984
+ var StyledDrawer = styled(Drawer)(({ headerHeight }) => ({
31982
31985
  "& .MuiDrawer-paper": {
31983
31986
  bottom: 0,
31984
31987
  boxSizing: "border-box",
31985
- height: `calc(100% - ${HEADER_HEIGHT.toString()}px)`,
31988
+ height: `calc(100% - ${headerHeight.toString()}px)`,
31986
31989
  overflowY: "auto",
31987
31990
  top: "auto",
31988
31991
  width: DRAWER_WIDTH
@@ -31996,6 +31999,7 @@ var TraceGraphView = ({
31996
31999
  fetchSpans,
31997
32000
  handleClose,
31998
32001
  handleEventSelect,
32002
+ headerHeight,
31999
32003
  loading,
32000
32004
  navigateToSpansList,
32001
32005
  open,
@@ -32057,7 +32061,7 @@ var TraceGraphView = ({
32057
32061
  ) })
32058
32062
  }
32059
32063
  ) }),
32060
- /* @__PURE__ */ jsx145(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ jsx145(EventDetails, { onClose: handleClose, selectedEvent }) })
32064
+ /* @__PURE__ */ jsx145(StyledDrawer, { anchor: "right", headerHeight, open, variant: "persistent", children: /* @__PURE__ */ jsx145(EventDetails, { onClose: handleClose, selectedEvent }) })
32061
32065
  ]
32062
32066
  }
32063
32067
  )
@@ -32100,6 +32104,7 @@ async function fetchConnectedTraces(api, traceIds, allSpans = /* @__PURE__ */ ne
32100
32104
  }
32101
32105
  var TraceGraphPage = ({ onClose, spanId, traceId }) => {
32102
32106
  const api = useAppInspectorApi();
32107
+ const { headerHeight } = useAppInspector();
32103
32108
  const [spans, setSpans] = useState17();
32104
32109
  const [loading, setLoading] = useState17(false);
32105
32110
  const [fetchError, setFetchError] = useState17();
@@ -32145,6 +32150,7 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
32145
32150
  setOpen(false);
32146
32151
  },
32147
32152
  handleEventSelect,
32153
+ headerHeight,
32148
32154
  loading,
32149
32155
  navigateToSpansList,
32150
32156
  open,