@plitzi/sdk-dev-tools 0.32.24 → 0.33.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 (52) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/DevToolsContainer.mjs +45 -29
  3. package/dist/DevToolsContextProvider.mjs +4 -4
  4. package/dist/components/DevToolsIndicator/DevToolsIndicator.d.ts +7 -0
  5. package/dist/components/DevToolsIndicator/DevToolsIndicator.mjs +50 -0
  6. package/dist/components/DevToolsIndicator/index.d.ts +3 -0
  7. package/dist/components/DevToolsIndicator/index.mjs +5 -0
  8. package/dist/components/DevToolsOverlay/DevToolsOverlay.d.ts +15 -0
  9. package/dist/components/DevToolsOverlay/DevToolsOverlay.mjs +18 -0
  10. package/dist/components/DevToolsOverlay/index.d.ts +3 -0
  11. package/dist/components/DevToolsOverlay/index.mjs +5 -0
  12. package/dist/components/DevToolsPanel/DevToolsBody.d.ts +3 -1
  13. package/dist/components/DevToolsPanel/DevToolsBody.mjs +8 -7
  14. package/dist/components/DevToolsPanel/DevToolsHeader.d.ts +2 -1
  15. package/dist/components/DevToolsPanel/DevToolsHeader.mjs +31 -22
  16. package/dist/components/DevToolsPanel/DevToolsPanel.d.ts +7 -1
  17. package/dist/components/DevToolsPanel/DevToolsPanel.mjs +36 -34
  18. package/dist/components/DevToolsPanel/DevToolsSubHeader.mjs +8 -8
  19. package/dist/components/DevToolsPanel/tabs/ElementsViewer/DetailsValue.mjs +9 -9
  20. package/dist/components/DevToolsPanel/tabs/ElementsViewer/ElementDetails.mjs +7 -7
  21. package/dist/components/DevToolsPanel/tabs/ElementsViewer/ElementsList.mjs +9 -9
  22. package/dist/components/DevToolsPanel/tabs/ElementsViewer/ElementsViewer.mjs +15 -16
  23. package/dist/components/DevToolsPanel/tabs/Logs/Log.mjs +23 -17
  24. package/dist/components/DevToolsPanel/tabs/Logs/Logs.d.ts +4 -2
  25. package/dist/components/DevToolsPanel/tabs/Logs/Logs.mjs +15 -15
  26. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyContent.mjs +8 -8
  27. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyHeader.d.ts +2 -1
  28. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyHeader.mjs +53 -43
  29. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/ExecutionTree/ExecutionTree.mjs +11 -11
  30. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteraction.d.ts +1 -1
  31. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteraction.mjs +22 -15
  32. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionBody.d.ts +2 -1
  33. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionBody.mjs +3 -2
  34. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionHeader.d.ts +2 -1
  35. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionHeader.mjs +4 -0
  36. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNavigation/LogNavigationBody.mjs +26 -26
  37. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNetwork/LogNetwork.d.ts +10 -0
  38. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNetwork/LogNetwork.mjs +52 -0
  39. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNetwork/index.d.ts +3 -0
  40. package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNetwork/index.mjs +5 -0
  41. package/dist/components/DevToolsPanel/tabs/StoreViewer/StoreViewer.mjs +31 -28
  42. package/dist/components/DevToolsPanel/tabs/StoreViewer/helpers/mapFunctionValues.d.ts +3 -0
  43. package/dist/components/DevToolsPanel/tabs/StoreViewer/helpers/mapFunctionValues.mjs +22 -0
  44. package/dist/components/DevToolsPanel/tabs/StoreViewer/helpers/renderFunctionValue.d.ts +3 -0
  45. package/dist/components/DevToolsPanel/tabs/StoreViewer/helpers/renderFunctionValue.mjs +13 -0
  46. package/dist/components/DevToolsPanel/tabs/TracingViewer/TracingViewer.mjs +98 -99
  47. package/dist/components/DevToolsPanel/tabs/TracingViewer/components/CommitStrip/CommitStrip.mjs +6 -4
  48. package/dist/components/DevToolsPanel/tabs/TracingViewer/components/HotspotsList/HotspotsList.mjs +32 -32
  49. package/dist/components/DevToolsPanel/tabs/TracingViewer/components/RankedList/RankedList.mjs +40 -40
  50. package/dist/components/DevToolsPanel/tabs/TracingViewer/components/SidebarShell/SidebarShell.mjs +7 -7
  51. package/dist/components/DevToolsPanel/tabs/VariablesViewer/VariablesViewer.mjs +12 -12
  52. package/package.json +52 -8
@@ -1,30 +1,30 @@
1
1
  import e from "./ElementsListItem.mjs";
2
2
  import { useCallback as t, useMemo as n, useState as r } from "react";
3
- import { get as i } from "@plitzi/plitzi-ui/helpers";
4
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
3
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
+ import { get as o } from "@plitzi/plitzi-ui/helpers";
5
5
  import s from "@plitzi/plitzi-ui/Input";
6
6
  //#region src/components/DevToolsPanel/tabs/ElementsViewer/ElementsList.tsx
7
7
  var c = ({ elements: c, elementSelected: l, onSelect: u }) => {
8
8
  let [d, f] = r(""), p = n(() => (c ?? []).filter((e) => e.definition.label.toLowerCase().includes(d.toLowerCase())), [c, d]), m = t((e) => f(e), []);
9
- return /* @__PURE__ */ o("div", {
9
+ return /* @__PURE__ */ a("div", {
10
10
  className: "flex h-full w-[280px] shrink-0 flex-col gap-2 border-r border-zinc-200 dark:border-zinc-700",
11
- children: [/* @__PURE__ */ a("div", {
11
+ children: [/* @__PURE__ */ i("div", {
12
12
  className: "px-2 pt-2",
13
- children: /* @__PURE__ */ a(s, {
13
+ children: /* @__PURE__ */ i(s, {
14
14
  value: d,
15
15
  onChange: m,
16
16
  placeholder: "Search elements...",
17
17
  size: "sm"
18
18
  })
19
- }), /* @__PURE__ */ a("div", {
19
+ }), /* @__PURE__ */ i("div", {
20
20
  className: "flex flex-col overflow-y-auto text-xs text-zinc-700 dark:text-zinc-300",
21
- children: p.length === 0 ? /* @__PURE__ */ a("div", {
21
+ children: p.length === 0 ? /* @__PURE__ */ i("div", {
22
22
  className: "p-4 text-center text-zinc-400 dark:text-zinc-600",
23
23
  children: "No elements"
24
- }) : p.map((t, n) => /* @__PURE__ */ a(e, {
24
+ }) : p.map((t, n) => /* @__PURE__ */ i(e, {
25
25
  name: t.definition.label,
26
26
  isSelected: l === t.id,
27
- isVisible: i(t, "definition.initialState.visibility", !0),
27
+ isVisible: o(t, "definition.initialState.visibility", !0),
28
28
  id: t.id,
29
29
  onSelect: u
30
30
  }, n))
@@ -1,25 +1,24 @@
1
1
  import e from "./ElementDetails.mjs";
2
2
  import t from "./ElementsList.mjs";
3
3
  import n from "clsx";
4
- import { use as r, useCallback as i, useMemo as a } from "react";
5
- import o from "@plitzi/sdk-navigation/NavigationContext";
4
+ import { useCallback as r, useMemo as i } from "react";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
6
  import { useCommonStore as s } from "@plitzi/sdk-shared/store";
7
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
7
  //#region src/components/DevToolsPanel/tabs/ElementsViewer/ElementsViewer.tsx
9
- var u = ({ className: u, elementSelected: d, onSelectElement: f }) => {
10
- let { currentPageId: p } = r(o), [m] = s("schema.flat"), h = a(() => Object.values(m).filter((e) => e.definition.rootId === p), [m, p]), g = a(() => h.find((e) => e.id === d), [h, d]), _ = i((e) => f(e), [f]);
11
- return /* @__PURE__ */ l("div", {
12
- className: n("flex h-full w-full", u),
13
- children: [/* @__PURE__ */ c(t, {
14
- elements: h,
15
- elementSelected: d,
16
- onSelect: _
17
- }), d && /* @__PURE__ */ c(e, {
18
- definition: g?.definition,
19
- attributes: g?.attributes,
20
- onSelectElement: f
8
+ var c = ({ className: c, elementSelected: l, onSelectElement: u }) => {
9
+ let [[d, f]] = s(["schema.flat", "navigation.currentPageId"]), p = i(() => Object.values(d).filter((e) => e.definition.rootId === f), [d, f]), m = i(() => p.find((e) => e.id === l), [p, l]), h = r((e) => u(e), [u]);
10
+ return /* @__PURE__ */ o("div", {
11
+ className: n("flex h-full w-full", c),
12
+ children: [/* @__PURE__ */ a(t, {
13
+ elements: p,
14
+ elementSelected: l,
15
+ onSelect: h
16
+ }), l && /* @__PURE__ */ a(e, {
17
+ definition: m?.definition,
18
+ attributes: m?.attributes,
19
+ onSelectElement: u
21
20
  })]
22
21
  });
23
22
  };
24
23
  //#endregion
25
- export { u as default };
24
+ export { c as default };
@@ -1,24 +1,30 @@
1
1
  import e from "./categories/LogInteraction/index.mjs";
2
2
  import t from "./categories/LogNavigation/index.mjs";
3
- import n from "./categories/LogStore/LogStore.mjs";
4
- import { memo as r } from "react";
5
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
- var s = r(({ category: r, message: s, time: c, params: l }) => /* @__PURE__ */ o(i, { children: [
7
- r === "interactions" && /* @__PURE__ */ a(e, {
8
- message: s,
9
- params: l,
10
- time: c
3
+ import n from "./categories/LogNetwork/index.mjs";
4
+ import r from "./categories/LogStore/LogStore.mjs";
5
+ import { memo as i } from "react";
6
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
7
+ var c = i(({ category: i, message: c, time: l, params: u }) => /* @__PURE__ */ s(a, { children: [
8
+ i === "interactions" && /* @__PURE__ */ o(e, {
9
+ message: c,
10
+ params: u,
11
+ time: l
11
12
  }),
12
- r === "navigation" && /* @__PURE__ */ a(t, {
13
- message: s,
14
- params: l,
15
- time: c
13
+ i === "navigation" && /* @__PURE__ */ o(t, {
14
+ message: c,
15
+ params: u,
16
+ time: l
16
17
  }),
17
- r === "store" && /* @__PURE__ */ a(n, {
18
- message: s,
19
- params: l,
20
- time: c
18
+ i === "store" && /* @__PURE__ */ o(r, {
19
+ message: c,
20
+ params: u,
21
+ time: l
22
+ }),
23
+ i === "network" && /* @__PURE__ */ o(n, {
24
+ message: c,
25
+ params: u,
26
+ time: l
21
27
  })
22
28
  ] }));
23
29
  //#endregion
24
- export { s as default };
30
+ export { c as default };
@@ -1,10 +1,12 @@
1
1
  import { Orientation } from '../../../../DevToolsContainer';
2
- import { Log as TLog } from '@plitzi/sdk-shared';
2
+ import { LogType, Log as TLog } from '@plitzi/sdk-shared';
3
3
  export type LogsProps = {
4
4
  items: TLog[];
5
5
  autoScrollOffset?: number;
6
6
  orientation: Orientation;
7
+ /** Filter the tab opens on. Read once, on mount: from there the summary owns the filter. */
8
+ logTypeFilter?: LogType;
7
9
  onClear?: () => void;
8
10
  };
9
- declare const Logs: ({ items, autoScrollOffset, orientation, onClear }: LogsProps) => import("react").JSX.Element;
11
+ declare const Logs: ({ items, autoScrollOffset, orientation, logTypeFilter, onClear }: LogsProps) => import("react").JSX.Element;
10
12
  export default Logs;
@@ -4,17 +4,17 @@ import n from "clsx";
4
4
  import { useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
5
5
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
6
  //#region src/components/DevToolsPanel/tabs/Logs/Logs.tsx
7
- var l = ({ items: l = [], autoScrollOffset: u = 40, orientation: d = "horizontal", onClear: f }) => {
8
- let [p, m] = o(), h = a(null), g = a(!0);
7
+ var l = ({ items: l = [], autoScrollOffset: u = 40, orientation: d = "horizontal", logTypeFilter: f, onClear: p }) => {
8
+ let [m, h] = o(f), g = a(null), _ = a(!0);
9
9
  i(() => {
10
- let e = h.current;
11
- e && g.current && (e.scrollTop = 0);
10
+ let e = g.current;
11
+ e && _.current && (e.scrollTop = 0);
12
12
  }, [l]);
13
- let _ = r(() => {
14
- let e = h.current;
15
- e && (g.current = e.scrollTop <= u);
16
- }, [u]), v = r((e) => {
17
- m(e);
13
+ let v = r(() => {
14
+ let e = g.current;
15
+ e && (_.current = e.scrollTop <= u);
16
+ }, [u]), y = r((e) => {
17
+ h(e);
18
18
  }, []);
19
19
  return /* @__PURE__ */ c("div", {
20
20
  className: "flex h-full w-full flex-col",
@@ -29,20 +29,20 @@ var l = ({ items: l = [], autoScrollOffset: u = 40, orientation: d = "horizontal
29
29
  ]
30
30
  }), /* @__PURE__ */ c("button", {
31
31
  className: "rounded px-2 py-0.5 text-xs text-zinc-500 transition-colors hover:bg-zinc-200 hover:text-zinc-800 dark:text-zinc-400 dark:hover:bg-zinc-700 dark:hover:text-zinc-200",
32
- onClick: f,
32
+ onClick: p,
33
33
  children: [/* @__PURE__ */ s("i", { className: "fa-solid fa-trash-can mr-1" }), "Clear"]
34
34
  })]
35
35
  }), /* @__PURE__ */ c("div", {
36
36
  className: n("flex h-full w-full overflow-hidden", { "grow basis-0 flex-col": d === "vertical" }),
37
37
  children: [/* @__PURE__ */ s(t, {
38
38
  className: n({ "h-full": d === "horizontal" }),
39
- logTypeSelected: p,
39
+ logTypeSelected: m,
40
40
  items: l,
41
41
  orientation: d,
42
- onClick: v
42
+ onClick: y
43
43
  }), /* @__PURE__ */ s("div", {
44
- ref: h,
45
- onScroll: _,
44
+ ref: g,
45
+ onScroll: v,
46
46
  className: "flex grow basis-0 flex-col overflow-y-auto",
47
47
  children: l.length === 0 ? /* @__PURE__ */ c("div", {
48
48
  className: "flex grow flex-col items-center justify-center gap-2 text-zinc-400 dark:text-zinc-500",
@@ -50,7 +50,7 @@ var l = ({ items: l = [], autoScrollOffset: u = 40, orientation: d = "horizontal
50
50
  }) : l.map((e, t) => ({
51
51
  item: e,
52
52
  key: t
53
- })).filter(({ item: e }) => !p || e.logType === p).reverse().map(({ item: t, key: n }) => /* @__PURE__ */ s(e, {
53
+ })).filter(({ item: e }) => !m || e.logType === m).reverse().map(({ item: t, key: n }) => /* @__PURE__ */ s(e, {
54
54
  category: t.category,
55
55
  time: t.time,
56
56
  params: t.params,
@@ -2,25 +2,25 @@ import e from "./ExecutionTree/index.mjs";
2
2
  import t from "./InteractionNode/index.mjs";
3
3
  import n from "clsx";
4
4
  import { useCallback as r, useMemo as i, useState as a } from "react";
5
- import { get as o } from "@plitzi/plitzi-ui/helpers";
6
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
5
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
+ import { get as c } from "@plitzi/plitzi-ui/helpers";
7
7
  //#region src/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyContent.tsx
8
8
  var l = ({ className: l, node: u, nodes: d }) => {
9
- let [f, p] = a(u.id), m = i(() => o(d, `${f}`), [f, d]), h = r((e) => p(e), []);
10
- return /* @__PURE__ */ c("div", {
9
+ let [f, p] = a(u.id), m = i(() => c(d, `${f}`), [f, d]), h = r((e) => p(e), []);
10
+ return /* @__PURE__ */ s("div", {
11
11
  className: n("flex", l),
12
12
  children: [
13
- /* @__PURE__ */ s(e, {
13
+ /* @__PURE__ */ o(e, {
14
14
  className: "grow basis-0",
15
15
  nodeId: u.id,
16
16
  nodes: d,
17
17
  selected: f,
18
18
  onSelect: h
19
19
  }),
20
- /* @__PURE__ */ s("div", { className: "mx-1 w-px shrink-0 bg-zinc-200 dark:bg-zinc-800" }),
21
- f && /* @__PURE__ */ s("div", {
20
+ /* @__PURE__ */ o("div", { className: "mx-1 w-px shrink-0 bg-zinc-200 dark:bg-zinc-800" }),
21
+ f && /* @__PURE__ */ o("div", {
22
22
  className: "flex min-w-0 grow basis-0",
23
- children: /* @__PURE__ */ s(t, {
23
+ children: /* @__PURE__ */ o(t, {
24
24
  whenParams: m.whenParams,
25
25
  status: m.status,
26
26
  name: m.node.title,
@@ -6,6 +6,7 @@ export type BodyHeaderProps = {
6
6
  endTime: number;
7
7
  duration?: string;
8
8
  elementId?: string;
9
+ elementRef?: string;
9
10
  };
10
- declare const BodyHeader: ({ triggerName, startTime, endTime, duration, elementId }: BodyHeaderProps) => import("react").JSX.Element;
11
+ declare const BodyHeader: ({ triggerName, startTime, endTime, duration, elementId, elementRef }: BodyHeaderProps) => import("react").JSX.Element;
11
12
  export default BodyHeader;
@@ -1,51 +1,51 @@
1
1
  import { useCallback as e, useMemo as t } from "react";
2
- import { useCommonStore as n } from "@plitzi/sdk-shared/store";
3
- import { get as r } from "@plitzi/plitzi-ui/helpers";
4
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
3
+ import { useCommonStore as i } from "@plitzi/sdk-shared/store";
4
+ import { get as a } from "@plitzi/plitzi-ui/helpers";
5
5
  import { formatDate as o } from "@plitzi/sdk-shared/helpers";
6
6
  //#region src/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyHeader.tsx
7
- var s = ({ triggerName: s, startTime: c, endTime: l, duration: u, elementId: d }) => {
8
- let [f] = n("schema.flat"), p = t(() => d ? r(f, d) : void 0, [d, f]), m = t(() => o(c, "HH:mm:ss.SSS"), [c]), h = t(() => o(l, "HH:mm:ss.SSS"), [l]), g = t(() => {
7
+ var s = ({ triggerName: s, startTime: c, endTime: l, duration: u, elementId: d, elementRef: f }) => {
8
+ let [p] = i("schema.flat"), m = t(() => d ? a(p, d) : void 0, [d, p]), h = t(() => o(c, "HH:mm:ss.SSS"), [c]), g = t(() => o(l, "HH:mm:ss.SSS"), [l]), _ = t(() => {
9
9
  if (!(typeof document > "u")) return document.querySelector(`[data-id="${d}"]`);
10
- }, [d]), _ = e(() => {
11
- g?.scrollIntoView({
10
+ }, [d]), v = e(() => {
11
+ _?.scrollIntoView({
12
12
  behavior: "smooth",
13
13
  block: "nearest",
14
14
  inline: "nearest"
15
15
  });
16
- }, [g]), v = e(() => {
17
- g?.classList.add("devtools-element-hovered");
18
- }, [g]), y = e(() => {
19
- g?.classList.remove("devtools-element-hovered");
20
- }, [g]);
21
- return /* @__PURE__ */ a("div", {
16
+ }, [_]), y = e(() => {
17
+ _?.classList.add("devtools-element-hovered");
18
+ }, [_]), b = e(() => {
19
+ _?.classList.remove("devtools-element-hovered");
20
+ }, [_]);
21
+ return /* @__PURE__ */ r("div", {
22
22
  className: "flex justify-around gap-3",
23
23
  children: [
24
- /* @__PURE__ */ a("div", {
24
+ /* @__PURE__ */ r("div", {
25
25
  className: "flex min-w-0 grow basis-0 flex-col",
26
- children: [/* @__PURE__ */ a("div", {
26
+ children: [/* @__PURE__ */ r("div", {
27
27
  className: "mb-1 flex items-center gap-1.5 text-[10px] font-semibold tracking-wider text-zinc-400 uppercase dark:text-zinc-500",
28
- children: [/* @__PURE__ */ i("i", { className: "fa-regular fa-clock" }), "Times"]
29
- }), /* @__PURE__ */ a("div", {
28
+ children: [/* @__PURE__ */ n("i", { className: "fa-regular fa-clock" }), "Times"]
29
+ }), /* @__PURE__ */ r("div", {
30
30
  className: "flex flex-col gap-0.5 font-mono text-zinc-700 dark:text-zinc-300",
31
31
  children: [
32
- /* @__PURE__ */ a("div", {
32
+ /* @__PURE__ */ r("div", {
33
33
  className: "flex gap-1",
34
- children: [/* @__PURE__ */ i("span", {
34
+ children: [/* @__PURE__ */ n("span", {
35
35
  className: "text-zinc-400 dark:text-zinc-500",
36
36
  children: "Start"
37
- }), m]
37
+ }), h]
38
38
  }),
39
- /* @__PURE__ */ a("div", {
39
+ /* @__PURE__ */ r("div", {
40
40
  className: "flex gap-1",
41
- children: [/* @__PURE__ */ i("span", {
41
+ children: [/* @__PURE__ */ n("span", {
42
42
  className: "text-zinc-400 dark:text-zinc-500",
43
43
  children: "End"
44
- }), h]
44
+ }), g]
45
45
  }),
46
- /* @__PURE__ */ a("div", {
46
+ /* @__PURE__ */ r("div", {
47
47
  className: "flex gap-1",
48
- children: [/* @__PURE__ */ i("span", {
48
+ children: [/* @__PURE__ */ n("span", {
49
49
  className: "text-zinc-400 dark:text-zinc-500",
50
50
  children: "Duration"
51
51
  }), u]
@@ -53,43 +53,53 @@ var s = ({ triggerName: s, startTime: c, endTime: l, duration: u, elementId: d }
53
53
  ]
54
54
  })]
55
55
  }),
56
- /* @__PURE__ */ i("div", { className: "w-px shrink-0 bg-zinc-200 dark:bg-zinc-800" }),
57
- /* @__PURE__ */ a("div", {
56
+ /* @__PURE__ */ n("div", { className: "w-px shrink-0 bg-zinc-200 dark:bg-zinc-800" }),
57
+ /* @__PURE__ */ r("div", {
58
58
  className: "flex min-w-0 grow basis-0 flex-col",
59
- children: [/* @__PURE__ */ a("div", {
59
+ children: [/* @__PURE__ */ r("div", {
60
60
  className: "mb-1 flex items-center gap-1.5 text-[10px] font-semibold tracking-wider text-zinc-400 uppercase dark:text-zinc-500",
61
- children: [/* @__PURE__ */ i("i", { className: "fa-solid fa-circle-info" }), "Details"]
62
- }), /* @__PURE__ */ a("div", {
61
+ children: [/* @__PURE__ */ n("i", { className: "fa-solid fa-circle-info" }), "Details"]
62
+ }), /* @__PURE__ */ r("div", {
63
63
  className: "flex flex-col gap-0.5 text-zinc-700 dark:text-zinc-300",
64
64
  children: [
65
- /* @__PURE__ */ a("div", {
65
+ /* @__PURE__ */ r("div", {
66
66
  className: "flex gap-1",
67
- children: [/* @__PURE__ */ i("span", {
67
+ children: [/* @__PURE__ */ n("span", {
68
68
  className: "text-zinc-400 dark:text-zinc-500",
69
69
  children: "Type"
70
- }), /* @__PURE__ */ i("span", { children: "Interaction" })]
70
+ }), /* @__PURE__ */ n("span", { children: "Interaction" })]
71
71
  }),
72
- /* @__PURE__ */ a("div", {
72
+ /* @__PURE__ */ r("div", {
73
73
  className: "flex min-w-0 gap-1",
74
- children: [/* @__PURE__ */ i("span", {
74
+ children: [/* @__PURE__ */ n("span", {
75
75
  className: "shrink-0 text-zinc-400 dark:text-zinc-500",
76
76
  children: "Trigger"
77
- }), /* @__PURE__ */ i("span", {
77
+ }), /* @__PURE__ */ n("span", {
78
78
  className: "truncate",
79
79
  children: s
80
80
  })]
81
81
  }),
82
- /* @__PURE__ */ a("div", {
82
+ f && /* @__PURE__ */ r("div", {
83
+ className: "flex min-w-0 gap-1",
84
+ children: [/* @__PURE__ */ n("span", {
85
+ className: "shrink-0 text-zinc-400 dark:text-zinc-500",
86
+ children: "Fired on"
87
+ }), /* @__PURE__ */ n("span", {
88
+ className: "truncate font-mono",
89
+ children: f
90
+ })]
91
+ }),
92
+ /* @__PURE__ */ r("div", {
83
93
  className: "flex min-w-0 gap-1",
84
- children: [/* @__PURE__ */ i("span", {
94
+ children: [/* @__PURE__ */ n("span", {
85
95
  className: "shrink-0 text-zinc-400 dark:text-zinc-500",
86
96
  children: "Element"
87
- }), /* @__PURE__ */ a("span", {
97
+ }), /* @__PURE__ */ r("span", {
88
98
  className: "cursor-pointer truncate text-violet-600 hover:text-violet-500 dark:text-violet-400 dark:hover:text-violet-300",
89
- onClick: _,
90
- onMouseEnter: v,
91
- onMouseLeave: y,
92
- children: [p?.definition.label, d && /* @__PURE__ */ a("span", {
99
+ onClick: v,
100
+ onMouseEnter: y,
101
+ onMouseLeave: b,
102
+ children: [m?.definition.label, d && /* @__PURE__ */ r("span", {
93
103
  className: "ml-1 font-mono text-[10px] text-zinc-400 dark:text-zinc-500",
94
104
  children: [
95
105
  "[",
@@ -1,34 +1,34 @@
1
1
  import e from "./ExecutionTreeNode.mjs";
2
2
  import t from "clsx";
3
3
  import { useCallback as n, useMemo as r } from "react";
4
- import { get as i } from "@plitzi/plitzi-ui/helpers";
5
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
4
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
+ import { get as o } from "@plitzi/plitzi-ui/helpers";
6
6
  import { getDurationMs as s } from "@plitzi/sdk-shared";
7
7
  //#region src/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/ExecutionTree/ExecutionTree.tsx
8
8
  var c = ({ className: c, nodeId: l, nodes: u, selected: d, onSelect: f }) => {
9
9
  let p = r(() => {
10
- let e = i(u, l), t = [];
10
+ let e = o(u, l), t = [];
11
11
  for (; e;) {
12
- let { node: n, startTime: r, endTime: a } = e, o = `${s(r, a)}ms`, c = n.id === l ? 0 : 1;
12
+ let { node: n, startTime: r, endTime: i } = e, a = `${s(r, i)}ms`, c = n.id === l ? 0 : 1;
13
13
  t.push({
14
14
  id: n.id,
15
15
  action: n.action,
16
16
  title: n.title,
17
17
  status: e.status,
18
18
  level: c,
19
- duration: o
20
- }), e = i(u, n.afterNode);
19
+ duration: a
20
+ }), e = o(u, n.afterNode);
21
21
  }
22
22
  return t;
23
23
  }, [l, u]), m = n((e) => f?.(e), [f]);
24
- return /* @__PURE__ */ o("div", {
24
+ return /* @__PURE__ */ a("div", {
25
25
  className: t("flex flex-col gap-1.5", c),
26
- children: [/* @__PURE__ */ o("div", {
26
+ children: [/* @__PURE__ */ a("div", {
27
27
  className: "flex items-center gap-1.5 px-2 text-[10px] font-semibold tracking-wider text-zinc-400 uppercase dark:text-zinc-500",
28
- children: [/* @__PURE__ */ a("i", { className: "fa-solid fa-code-merge" }), "Execution Tree"]
29
- }), /* @__PURE__ */ a("div", {
28
+ children: [/* @__PURE__ */ i("i", { className: "fa-solid fa-code-merge" }), "Execution Tree"]
29
+ }), /* @__PURE__ */ i("div", {
30
30
  className: "flex flex-col",
31
- children: p.map((t, n) => /* @__PURE__ */ a(e, {
31
+ children: p.map((t, n) => /* @__PURE__ */ i(e, {
32
32
  id: t.id,
33
33
  action: t.action,
34
34
  title: t.title,
@@ -6,5 +6,5 @@ export type LogInteractionProps = {
6
6
  params: TLogInteraction['params'];
7
7
  time?: string;
8
8
  };
9
- declare const LogInteraction: ({ time, message, params: { elementId, status, node, nodes, startTime, endTime } }: LogInteractionProps) => import("react").JSX.Element;
9
+ declare const LogInteraction: ({ time, message, params: { elementId, elementRef, status, node, nodes, startTime, endTime } }: LogInteractionProps) => import("react").JSX.Element;
10
10
  export default LogInteraction;
@@ -7,17 +7,18 @@ import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
7
  import s from "@plitzi/plitzi-ui/ContainerCollapsable";
8
8
  import { getDurationMs as c } from "@plitzi/sdk-shared";
9
9
  //#region src/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteraction.tsx
10
- var l = /* @__PURE__ */ a("i", { className: "fa-solid fa-angle-right text-[10px]" }), u = /* @__PURE__ */ a("i", { className: "fa-solid fa-angle-down text-[10px]" }), d = ({ time: d, message: f, params: { elementId: p, status: m, node: h, nodes: g, startTime: _ = 0, endTime: v = 0 } }) => {
11
- let y = i(() => `${c(_, v)}ms`, [_, v]), b = Object.values(g).filter((e) => e.status === "skipped").length, x = Object.values(g).filter((e) => e.status === "disabled").length;
10
+ var l = /* @__PURE__ */ a("i", { className: "fa-solid fa-angle-right text-[10px]" }), u = /* @__PURE__ */ a("i", { className: "fa-solid fa-angle-down text-[10px]" }), d = ({ time: d, message: f, params: { elementId: p, elementRef: m, status: h, node: g, nodes: _, startTime: v = 0, endTime: y = 0 } }) => {
11
+ let b = i(() => `${c(v, y)}ms`, [v, y]), x = Object.values(_).filter((e) => e.status === "failed").length, S = Object.values(_).filter((e) => e.status === "skipped").length, C = Object.values(_).filter((e) => e.status === "disabled").length;
12
12
  return /* @__PURE__ */ o(s, {
13
13
  className: r("last:border-b-none w-full border-b border-l-2 border-b-zinc-200 px-2 py-1 transition-colors hover:bg-zinc-50 dark:border-b-zinc-700 dark:hover:bg-zinc-800/50", {
14
- "border-l-emerald-500": m === "completed",
15
- "border-l-red-500": m === "skipped"
14
+ "border-l-emerald-500": h === "completed",
15
+ "border-l-red-500": h === "failed",
16
+ "border-l-zinc-300 dark:border-l-zinc-600": h === "skipped"
16
17
  }),
17
18
  collapsed: !0,
18
19
  children: [/* @__PURE__ */ a(s.Header, {
19
20
  title: /* @__PURE__ */ a(t, {
20
- status: m,
21
+ status: h,
21
22
  message: f,
22
23
  time: d
23
24
  }),
@@ -28,27 +29,33 @@ var l = /* @__PURE__ */ a("i", { className: "fa-solid fa-angle-right text-[10px]
28
29
  children: /* @__PURE__ */ o("div", {
29
30
  className: "flex gap-3 text-zinc-400 dark:text-zinc-500",
30
31
  children: [
31
- m === "completed" && !!b && /* @__PURE__ */ a(n, {
32
+ !!x && /* @__PURE__ */ a(n, {
33
+ logType: "danger",
34
+ title: "Failed",
35
+ children: x
36
+ }),
37
+ h !== "skipped" && !!S && /* @__PURE__ */ a(n, {
32
38
  logType: "warning",
33
39
  title: "Skipped",
34
- children: b
40
+ children: S
35
41
  }),
36
- m === "completed" && !!x && /* @__PURE__ */ a(n, {
42
+ h !== "skipped" && !!C && /* @__PURE__ */ a(n, {
37
43
  logType: "custom",
38
44
  iconClassName: "fa-solid fa-ban",
39
45
  title: "Disabled",
40
- children: x
46
+ children: C
41
47
  }),
42
- y
48
+ b
43
49
  ]
44
50
  })
45
51
  }), /* @__PURE__ */ a(s.Content, { children: /* @__PURE__ */ a(e, {
46
52
  elementId: p,
47
- node: h,
48
- nodes: g,
49
- startTime: _,
50
- endTime: v,
51
- duration: y
53
+ elementRef: m,
54
+ node: g,
55
+ nodes: _,
56
+ startTime: v,
57
+ endTime: y,
58
+ duration: b
52
59
  }) })]
53
60
  });
54
61
  };
@@ -7,6 +7,7 @@ export type LogInteractionBodyProps = {
7
7
  endTime: number;
8
8
  duration?: string;
9
9
  elementId?: string;
10
+ elementRef?: string;
10
11
  };
11
- declare const LogInteractionBody: ({ node, nodes, startTime, endTime, duration, elementId }: LogInteractionBodyProps) => import("react").JSX.Element;
12
+ declare const LogInteractionBody: ({ node, nodes, startTime, endTime, duration, elementId, elementRef }: LogInteractionBodyProps) => import("react").JSX.Element;
12
13
  export default LogInteractionBody;
@@ -2,7 +2,7 @@ import e from "./BodyContent.mjs";
2
2
  import t from "./BodyHeader.mjs";
3
3
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
4
  //#region src/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionBody.tsx
5
- var i = ({ node: i, nodes: a, startTime: o, endTime: s, duration: c, elementId: l }) => /* @__PURE__ */ r("div", {
5
+ var i = ({ node: i, nodes: a, startTime: o, endTime: s, duration: c, elementId: l, elementRef: u }) => /* @__PURE__ */ r("div", {
6
6
  className: "mx-2 my-1.5 flex flex-col gap-2 overflow-hidden rounded border border-zinc-200 text-xs dark:border-zinc-800",
7
7
  children: [/* @__PURE__ */ n("div", {
8
8
  className: "bg-zinc-50 px-3 py-2 dark:bg-zinc-800/60",
@@ -11,7 +11,8 @@ var i = ({ node: i, nodes: a, startTime: o, endTime: s, duration: c, elementId:
11
11
  startTime: o,
12
12
  endTime: s,
13
13
  duration: c,
14
- elementId: l
14
+ elementId: l,
15
+ elementRef: u
15
16
  })
16
17
  }), /* @__PURE__ */ n("div", {
17
18
  className: "border-t border-zinc-200 dark:border-zinc-800",
@@ -1,7 +1,8 @@
1
+ import { InteractionStatus } from '@plitzi/sdk-shared';
1
2
  import { ReactNode } from 'react';
2
3
  export type LogInteractionHeaderProps = {
3
4
  className?: string;
4
- status: string;
5
+ status: InteractionStatus;
5
6
  message?: ReactNode;
6
7
  time?: string;
7
8
  };
@@ -12,6 +12,10 @@ var r = ({ status: r, message: i, time: a }) => /* @__PURE__ */ n("div", {
12
12
  logType: "success",
13
13
  children: "Completed"
14
14
  }),
15
+ r === "failed" && /* @__PURE__ */ t(e, {
16
+ logType: "danger",
17
+ children: "Failed"
18
+ }),
15
19
  r === "skipped" && /* @__PURE__ */ t(e, {
16
20
  logType: "custom",
17
21
  iconClassName: "fa-solid fa-forward-step",