@plitzi/sdk-dev-tools 0.37.2 → 0.37.4

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.
@@ -9,6 +9,16 @@ export type DevToolsContainerProps = {
9
9
  devToolsStyle?: string;
10
10
  devToolsStyleLink?: string;
11
11
  renderMode?: 'default' | 'shadow';
12
+ /**
13
+ * What scrolls while the panel is folded away.
14
+ *
15
+ * `container` (the default) keeps the wrapped app in a box of its own, which is what an application shell that fills
16
+ * its window wants — the builder. `document` is for a PAGE: while the panel is collapsed the page lays out and
17
+ * scrolls exactly as it does without dev tools, so `position: sticky` and `fixed`, scroll restoration and a
18
+ * full-page screenshot mean in development what they mean in production. Opening the panel docks it beside the page
19
+ * either way; a docked panel needs the split.
20
+ */
21
+ scroll?: 'container' | 'document';
12
22
  };
13
- declare const DevToolsContainer: ({ children, className, innerClassName, enabled, instanceId, renderMode, devToolsStyle, devToolsStyleLink }: DevToolsContainerProps) => string | number | bigint | boolean | import('react').JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
23
+ declare const DevToolsContainer: ({ children, className, innerClassName, enabled, instanceId, renderMode, scroll, devToolsStyle, devToolsStyleLink }: DevToolsContainerProps) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
14
24
  export default DevToolsContainer;
@@ -1,61 +1,69 @@
1
- import { useIsSelectedInstance as e } from "./instanceRegistry.mjs";
2
- import t from "./components/DevToolsOverlay/index.mjs";
3
- import n from "./DevToolsContextProvider.mjs";
4
- import r from "./DevToolsRoot.mjs";
5
- import i from "./useHydrated.mjs";
6
- import a from "./useRegisterQueriesStore.mjs";
7
- import o from "./useRegisterRootStore.mjs";
8
- import s from "@plitzi/plitzi-ui/ContainerShadow";
9
- import c from "@plitzi/plitzi-ui/hooks/useStorage";
10
- import l from "clsx";
11
- import { useCallback as u, useRef as d, useState as f } from "react";
12
- import { DevStoreScopeContext as p } from "@plitzi/nexus/react";
13
- import m from "@plitzi/sdk-shared/theme/useTheme";
14
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
1
+ import e from "./DevToolsContextProvider.mjs";
2
+ import t from "./DevToolsRoot.mjs";
3
+ import { useIsSelectedInstance as n } from "./instanceRegistry.mjs";
4
+ import r from "./useHydrated.mjs";
5
+ import i from "./useRegisterQueriesStore.mjs";
6
+ import a from "./useRegisterRootStore.mjs";
7
+ import o from "@plitzi/plitzi-ui/ContainerShadow";
8
+ import s from "@plitzi/plitzi-ui/hooks/useStorage";
9
+ import c from "clsx";
10
+ import { Suspense as l, lazy as u, useCallback as d, useRef as f, useState as p } from "react";
11
+ import { DevStoreScopeContext as m } from "@plitzi/nexus/react";
12
+ import h from "@plitzi/sdk-shared/theme/useTheme";
13
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
15
14
  //#region src/DevToolsContainer.tsx
16
- var _ = "horizontal", v = 0, y = ({ children: y, className: b, innerClassName: x, enabled: S = !1, instanceId: C, renderMode: w = "default", devToolsStyle: T = "", devToolsStyleLink: E = "" }) => {
17
- let { resolvedTheme: D } = m(), [O, k] = c("plitzi-sdk.dev-tools.orientation", _), [A, j] = c("plitzi-sdk.dev-tools.collapsed", !0), [M, N] = c("plitzi-sdk.dev-tools.tab", "logs"), [P, F] = f(), I = d(void 0);
18
- I.current ||= `sdk-instance-${++v}`;
19
- let L = C || I.current, R = i(), z = R ? O : _, B = e(L, S);
20
- o(S), a(B, L);
21
- let V = u((e) => k(e), [k]), H = u((e) => {
22
- e && N("logs"), F(e), j(!1);
23
- }, [j, N]), U = u(() => j(!0), [j]), W = u((e) => {
24
- F(void 0), N(e);
25
- }, [N]);
26
- return S ? /* @__PURE__ */ g("div", {
27
- className: l("relative flex grow overflow-auto", {
28
- "flex-col": z === "horizontal",
29
- "h-screen": z === "vertical"
30
- }, b),
31
- children: [/* @__PURE__ */ h(p, {
32
- value: L,
33
- children: /* @__PURE__ */ h("div", {
34
- className: l("grow basis-0 flex-col overflow-auto", x),
35
- children: y
15
+ var v = u(() => import("./components/DevToolsOverlay/index.mjs")), y = "horizontal", b = 0, x = ({ children: u, className: x, innerClassName: S, enabled: C = !1, instanceId: w, renderMode: T = "default", scroll: E = "container", devToolsStyle: D = "", devToolsStyleLink: O = "" }) => {
16
+ let { resolvedTheme: k } = h(), [A, j] = s("plitzi-sdk.dev-tools.orientation", y), [M, N] = s("plitzi-sdk.dev-tools.collapsed", !0), [P, F] = s("plitzi-sdk.dev-tools.tab", "logs"), [I, L] = p(), R = f(void 0);
17
+ R.current ||= `sdk-instance-${++b}`;
18
+ let z = w || R.current, B = r(), V = B ? A : y, H = n(z, C);
19
+ a(C), i(H, z);
20
+ let U = d((e) => j(e), [j]), W = d((e) => {
21
+ e && F("logs"), L(e), N(!1);
22
+ }, [N, F]), G = d(() => N(!0), [N]), K = d((e) => {
23
+ L(void 0), F(e);
24
+ }, [F]);
25
+ if (!C) return u;
26
+ let q = E === "document" && (!B || M), J = H && B && /* @__PURE__ */ g(t, { children: /* @__PURE__ */ g(e, { children: /* @__PURE__ */ _(l, {
27
+ fallback: null,
28
+ children: [T === "default" && /* @__PURE__ */ g(v, {
29
+ className: c({ dark: k === "dark" }),
30
+ collapsed: M,
31
+ orientation: V,
32
+ tabSelected: P,
33
+ logTypeFilter: I,
34
+ onOpen: W,
35
+ onCollapse: G,
36
+ onTabSelect: K,
37
+ onChangeOrientation: U
38
+ }), T === "shadow" && /* @__PURE__ */ _(o, { children: [O && /* @__PURE__ */ g(o.Link, { href: O }), /* @__PURE__ */ _(o.Content, { children: [/* @__PURE__ */ g("style", { dangerouslySetInnerHTML: { __html: D } }), /* @__PURE__ */ g(v, {
39
+ className: c({ dark: k === "dark" }),
40
+ collapsed: M,
41
+ orientation: V,
42
+ tabSelected: P,
43
+ logTypeFilter: I,
44
+ onOpen: W,
45
+ onCollapse: G,
46
+ onTabSelect: K,
47
+ onChangeOrientation: U
48
+ })] })] })]
49
+ }) }) });
50
+ return /* @__PURE__ */ _("div", {
51
+ className: c("relative flex min-w-0 grow", {
52
+ "overflow-auto": !q,
53
+ "flex-col": q || V === "horizontal",
54
+ "h-screen": !q && V === "vertical"
55
+ }, x),
56
+ children: [/* @__PURE__ */ g(m, {
57
+ value: z,
58
+ children: /* @__PURE__ */ g("div", {
59
+ className: c("grow", { "basis-0 flex-col overflow-auto": !q }, S),
60
+ children: u
36
61
  })
37
- }), B && R && /* @__PURE__ */ h(r, { children: /* @__PURE__ */ g(n, { children: [w === "default" && /* @__PURE__ */ h(t, {
38
- className: l({ dark: D === "dark" }),
39
- collapsed: A,
40
- orientation: z,
41
- tabSelected: M,
42
- logTypeFilter: P,
43
- onOpen: H,
44
- onCollapse: U,
45
- onTabSelect: W,
46
- onChangeOrientation: V
47
- }), w === "shadow" && /* @__PURE__ */ g(s, { children: [E && /* @__PURE__ */ h(s.Link, { href: E }), /* @__PURE__ */ g(s.Content, { children: [/* @__PURE__ */ h("style", { dangerouslySetInnerHTML: { __html: T } }), /* @__PURE__ */ h(t, {
48
- className: l({ dark: D === "dark" }),
49
- collapsed: A,
50
- orientation: z,
51
- tabSelected: M,
52
- logTypeFilter: P,
53
- onOpen: H,
54
- onCollapse: U,
55
- onTabSelect: W,
56
- onChangeOrientation: V
57
- })] })] })] }) })]
58
- }) : y;
62
+ }), q ? /* @__PURE__ */ g("div", {
63
+ className: "sticky bottom-0 h-0",
64
+ children: J
65
+ }) : J]
66
+ });
59
67
  };
60
68
  //#endregion
61
- export { y as default };
69
+ export { x as default };
@@ -1,8 +1,8 @@
1
1
  import { useCallback as e, useEffect as t, useMemo as n, useRef as r, useState as i } from "react";
2
- import a from "@plitzi/sdk-shared/devTools/DevToolsContext";
3
- import { jsx as o } from "react/jsx-runtime";
4
- import { omit as s } from "@plitzi/plitzi-ui/helpers";
5
- import { pConsole as c } from "@plitzi/sdk-shared/devTools/utils/PlitziConsole";
2
+ import { omit as a } from "@plitzi/plitzi-ui/helpers";
3
+ import o from "@plitzi/sdk-shared/devTools/DevToolsContext";
4
+ import { pConsole as s } from "@plitzi/sdk-shared/devTools/utils/PlitziConsole";
5
+ import { jsx as c } from "react/jsx-runtime";
6
6
  //#region src/DevToolsContextProvider.tsx
7
7
  var l = ({ children: l }) => {
8
8
  let [u, d] = i([]), [f, p] = i({}), m = r(!1), h = e((e, t, n, r, i) => {
@@ -16,11 +16,11 @@ var l = ({ children: l }) => {
16
16
  }, [d]), g = e((e, t) => p((n) => ({
17
17
  ...n,
18
18
  [e]: t
19
- })), []), _ = e((e) => p((t) => s(t, [e])), []), v = e((e, ...t) => {
19
+ })), []), _ = e((e) => p((t) => a(t, [e])), []), v = e((e, ...t) => {
20
20
  if (e && typeof f[e] == "function") return f[e](...t);
21
21
  }, [f]), y = e(() => d([]), []);
22
- m.current ||= (c.setCallback(h), c.setCallbackAddProvider(g), c.setCallbackRemoveProvider(_), !0), t(() => (c.setCallback(h), c.setCallbackAddProvider(g), c.setCallbackRemoveProvider(_), c.processPendingLogs(), () => {
23
- c.setCallback(void 0), c.setCallbackAddProvider(void 0), c.setCallbackRemoveProvider(void 0), c.flush();
22
+ m.current ||= (s.setCallback(h), s.setCallbackAddProvider(g), s.setCallbackRemoveProvider(_), !0), t(() => (s.setCallback(h), s.setCallbackAddProvider(g), s.setCallbackRemoveProvider(_), s.processPendingLogs(), () => {
23
+ s.setCallback(void 0), s.setCallbackAddProvider(void 0), s.setCallbackRemoveProvider(void 0), s.flush();
24
24
  }), [
25
25
  h,
26
26
  g,
@@ -39,7 +39,7 @@ var l = ({ children: l }) => {
39
39
  y,
40
40
  v
41
41
  ]);
42
- return /* @__PURE__ */ o(a, {
42
+ return /* @__PURE__ */ c(o, {
43
43
  value: b,
44
44
  children: l
45
45
  });
@@ -1,17 +1,17 @@
1
1
  import { use as e, useContext as t, useLayoutEffect as n, useRef as r } from "react";
2
2
  import { StoreContext as i } from "@plitzi/nexus/react";
3
3
  import { jsx as a } from "react/jsx-runtime";
4
- import o from "@plitzi/sdk-plugins/PluginsContext";
5
- import s from "@plitzi/sdk-shared/elements/ComponentContext";
6
- import { ThemeContext as c } from "@plitzi/plitzi-ui/Provider";
7
- import { createRoot as l } from "react-dom/client";
4
+ import { ThemeContext as o } from "@plitzi/plitzi-ui/Provider";
5
+ import { createRoot as s } from "react-dom/client";
6
+ import c from "@plitzi/sdk-plugins/PluginsContext";
7
+ import l from "@plitzi/sdk-shared/elements/ComponentContext";
8
8
  import u from "@plitzi/sdk-shared/theme/ThemeScope";
9
9
  //#region src/DevToolsRoot.tsx
10
10
  var d = { display: "contents" }, f = ({ children: f }) => {
11
- let p = r(null), m = r(void 0), h = r(void 0), g = t(i), _ = e(u), v = e(o), y = e(s), b = e(c);
11
+ let p = r(null), m = r(void 0), h = r(void 0), g = t(i), _ = e(u), v = e(c), y = e(l), b = e(o);
12
12
  return n(() => {
13
13
  let e = p.current;
14
- if (e) return clearTimeout(h.current), m.current ??= l(e), () => {
14
+ if (e) return clearTimeout(h.current), m.current ??= s(e), () => {
15
15
  let e = m.current;
16
16
  h.current = setTimeout(() => {
17
17
  e?.unmount(), m.current === e && (m.current = void 0);
@@ -20,13 +20,13 @@ var d = { display: "contents" }, f = ({ children: f }) => {
20
20
  }, []), n(() => {
21
21
  m.current?.render(/* @__PURE__ */ a(i, {
22
22
  value: g,
23
- children: /* @__PURE__ */ a(c, {
23
+ children: /* @__PURE__ */ a(o, {
24
24
  value: b,
25
25
  children: /* @__PURE__ */ a(u, {
26
26
  value: _,
27
- children: /* @__PURE__ */ a(o, {
27
+ children: /* @__PURE__ */ a(c, {
28
28
  value: v,
29
- children: /* @__PURE__ */ a(s, {
29
+ children: /* @__PURE__ */ a(l, {
30
30
  value: y,
31
31
  children: f
32
32
  })
@@ -1,14 +1,14 @@
1
1
  import e from "./DevToolsButton.mjs";
2
2
  import t from "clsx";
3
3
  import { useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
4
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
- import { throttle as c } from "@plitzi/plitzi-ui/helpers";
4
+ import { throttle as o } from "@plitzi/plitzi-ui/helpers";
5
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
6
  //#region src/components/DevToolsPanel/DevToolsSubHeader.tsx
7
7
  var l = ({ className: l, elementSelected: u, currentPageId: d, onSelectElement: f }) => {
8
8
  let [p, m] = a(!1), h = n((e) => {
9
9
  let { id: t } = e?.dataset ?? {};
10
10
  f(t);
11
- }, [f]), g = i(() => c(h, 100), [h]), _ = n((e) => {
11
+ }, [f]), g = i(() => o(h, 100), [h]), _ = n((e) => {
12
12
  e.target.closest(".plitzi-sdk") && g(e.target.closest("[data-id]"));
13
13
  }, [g]), v = n((e) => {
14
14
  e.target.closest(".plitzi-sdk") && (e.stopPropagation(), e.preventDefault(), m(!1));
@@ -35,22 +35,22 @@ var l = ({ className: l, elementSelected: u, currentPageId: d, onSelectElement:
35
35
  v,
36
36
  _,
37
37
  p
38
- ]), /* @__PURE__ */ s("div", {
38
+ ]), /* @__PURE__ */ c("div", {
39
39
  className: t("flex shrink-0 items-center justify-between gap-2 border-b border-zinc-200 bg-zinc-50 px-2 py-1 dark:border-zinc-700 dark:bg-zinc-800", l),
40
- children: [/* @__PURE__ */ s("div", {
40
+ children: [/* @__PURE__ */ c("div", {
41
41
  className: "flex gap-1",
42
- children: [/* @__PURE__ */ o(e, {
42
+ children: [/* @__PURE__ */ s(e, {
43
43
  iconClassName: "fa-regular fa-hand-pointer",
44
44
  title: "Select an element in the page to inspect it",
45
45
  onClick: y,
46
46
  isSelected: p
47
- }), /* @__PURE__ */ o(e, {
47
+ }), /* @__PURE__ */ s(e, {
48
48
  iconClassName: "fa-regular fa-file",
49
49
  title: "Current Page",
50
50
  onClick: b,
51
51
  isSelected: u === d
52
52
  })]
53
- }), /* @__PURE__ */ o(e, {
53
+ }), /* @__PURE__ */ s(e, {
54
54
  iconClassName: "fa-solid fa-ban",
55
55
  onClick: x,
56
56
  title: "Clear",
@@ -1,20 +1,20 @@
1
1
  import { useCallback as e, useMemo as t } from "react";
2
- import { jsx as n } from "react/jsx-runtime";
3
- import { useCommonStore as r } from "@plitzi/sdk-shared/store";
4
- import { get as i } from "@plitzi/plitzi-ui/helpers";
2
+ import { get as n } from "@plitzi/plitzi-ui/helpers";
3
+ import { jsx as r } from "react/jsx-runtime";
4
+ import { useCommonStore as i } from "@plitzi/sdk-shared/store";
5
5
  //#region src/components/DevToolsPanel/tabs/ElementsViewer/DetailsValue.tsx
6
6
  var a = ({ attribute: a, value: o, isDefinition: s = !1, onSelectElement: c }) => {
7
- let [l] = r("schema.flat"), u = e((e) => () => c?.(e), [c]), d = t(() => a === "items" && s && Array.isArray(o) ? /* @__PURE__ */ n("div", {
7
+ let [l] = i("schema.flat"), u = e((e) => () => c?.(e), [c]), d = t(() => a === "items" && s && Array.isArray(o) ? /* @__PURE__ */ r("div", {
8
8
  className: "flex flex-col",
9
- children: o.map((e, t) => /* @__PURE__ */ n("div", {
9
+ children: o.map((e, t) => /* @__PURE__ */ r("div", {
10
10
  className: "cursor-pointer text-purple-400",
11
11
  onClick: u(e),
12
- children: i(l, `${e}.definition.label`, e)
12
+ children: n(l, `${e}.definition.label`, e)
13
13
  }, t))
14
- }) : a && ["rootId", "parentId"].includes(a) && s ? /* @__PURE__ */ n("div", {
14
+ }) : a && ["rootId", "parentId"].includes(a) && s ? /* @__PURE__ */ r("div", {
15
15
  className: "cursor-pointer text-purple-400",
16
16
  onClick: u(o),
17
- children: i(l, `${o}.definition.label`, o)
17
+ children: n(l, `${o}.definition.label`, o)
18
18
  }) : a === "styleSelectors" && s && o && typeof o == "object" ? Object.values(o).join(", ") : typeof o == "object" && o ? JSON.stringify(o) : typeof o == "boolean" ? o ? "True" : "False" : o, [
19
19
  a,
20
20
  s,
@@ -22,7 +22,7 @@ var a = ({ attribute: a, value: o, isDefinition: s = !1, onSelectElement: c }) =
22
22
  u,
23
23
  l
24
24
  ]);
25
- return /* @__PURE__ */ n("div", {
25
+ return /* @__PURE__ */ r("div", {
26
26
  className: "grow basis-0 truncate",
27
27
  children: d
28
28
  });
@@ -1,36 +1,36 @@
1
1
  import e from "./ElementsListItem.mjs";
2
2
  import { useCallback as t, useMemo as n, useState as r } from "react";
3
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
- import { get as o } from "@plitzi/plitzi-ui/helpers";
3
+ import { get as i } from "@plitzi/plitzi-ui/helpers";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
5
  import s from "@plitzi/plitzi-ui/Input";
6
6
  //#region src/components/DevToolsPanel/tabs/ElementsViewer/ElementsList.tsx
7
7
  var c = 200, l = ({ elements: l, elementSelected: u, onSelect: d }) => {
8
8
  let [f, p] = r(""), m = n(() => (l ?? []).filter((e) => e.definition.label.toLowerCase().includes(f.toLowerCase())), [l, f]), h = n(() => m.slice(0, c), [m]), g = m.length - h.length, _ = t((e) => p(e), []);
9
- return /* @__PURE__ */ a("div", {
9
+ return /* @__PURE__ */ o("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__ */ i("div", {
11
+ children: [/* @__PURE__ */ a("div", {
12
12
  className: "px-2 pt-2",
13
- children: /* @__PURE__ */ i(s, {
13
+ children: /* @__PURE__ */ a(s, {
14
14
  value: f,
15
15
  onChange: _,
16
16
  placeholder: "Search elements...",
17
17
  size: "sm"
18
18
  })
19
- }), /* @__PURE__ */ a("div", {
19
+ }), /* @__PURE__ */ o("div", {
20
20
  className: "flex flex-col overflow-y-auto text-xs text-zinc-700 dark:text-zinc-300",
21
21
  children: [
22
- h.length === 0 && /* @__PURE__ */ i("div", {
22
+ h.length === 0 && /* @__PURE__ */ a("div", {
23
23
  className: "p-4 text-center text-zinc-400 dark:text-zinc-600",
24
24
  children: "No elements"
25
25
  }),
26
- h.map((t) => /* @__PURE__ */ i(e, {
26
+ h.map((t) => /* @__PURE__ */ a(e, {
27
27
  name: t.definition.label,
28
28
  isSelected: u === t.id,
29
- isVisible: o(t, "definition.initialState.visibility", !0),
29
+ isVisible: i(t, "definition.initialState.visibility", !0),
30
30
  id: t.id,
31
31
  onSelect: d
32
32
  }, t.id)),
33
- g > 0 && /* @__PURE__ */ a("div", {
33
+ g > 0 && /* @__PURE__ */ o("div", {
34
34
  className: "p-3 text-center text-[11px] text-zinc-400 dark:text-zinc-600",
35
35
  children: [g, " more — narrow the search to reach them"]
36
36
  })
@@ -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 { jsx as o, jsxs as s } from "react/jsx-runtime";
6
- import { get as c } from "@plitzi/plitzi-ui/helpers";
5
+ import { get as o } from "@plitzi/plitzi-ui/helpers";
6
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
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(() => c(d, `${f}`), [f, d]), h = r((e) => p(e), []);
10
- return /* @__PURE__ */ s("div", {
9
+ let [f, p] = a(u.id), m = i(() => o(d, `${f}`), [f, d]), h = r((e) => p(e), []);
10
+ return /* @__PURE__ */ c("div", {
11
11
  className: n("flex", l),
12
12
  children: [
13
- /* @__PURE__ */ o(e, {
13
+ /* @__PURE__ */ s(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__ */ o("div", { className: "mx-1 w-px shrink-0 bg-zinc-200 dark:bg-zinc-800" }),
21
- f && /* @__PURE__ */ o("div", {
20
+ /* @__PURE__ */ s("div", { className: "mx-1 w-px shrink-0 bg-zinc-200 dark:bg-zinc-800" }),
21
+ f && /* @__PURE__ */ s("div", {
22
22
  className: "flex min-w-0 grow basis-0",
23
- children: /* @__PURE__ */ o(t, {
23
+ children: /* @__PURE__ */ s(t, {
24
24
  whenParams: m.whenParams,
25
25
  status: m.status,
26
26
  name: m.node.title,
@@ -1,11 +1,11 @@
1
1
  import { useCallback as e, useMemo as t } from "react";
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";
2
+ import { get as n } from "@plitzi/plitzi-ui/helpers";
3
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import { useCommonStore as a } from "@plitzi/sdk-shared/store";
5
5
  import { formatDate as o } from "@plitzi/sdk-shared/helpers";
6
6
  //#region src/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyHeader.tsx
7
7
  var s = ({ triggerName: s, startTime: c, endTime: l, duration: u, elementId: d, hostElementId: 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(() => {
8
+ let [p] = a("schema.flat"), m = t(() => d ? n(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
10
  }, [d]), v = e(() => {
11
11
  _?.scrollIntoView({
@@ -18,34 +18,34 @@ var s = ({ triggerName: s, startTime: c, endTime: l, duration: u, elementId: d,
18
18
  }, [_]), b = e(() => {
19
19
  _?.classList.remove("devtools-element-hovered");
20
20
  }, [_]);
21
- return /* @__PURE__ */ r("div", {
21
+ return /* @__PURE__ */ i("div", {
22
22
  className: "flex justify-around gap-3",
23
23
  children: [
24
- /* @__PURE__ */ r("div", {
24
+ /* @__PURE__ */ i("div", {
25
25
  className: "flex min-w-0 grow basis-0 flex-col",
26
- children: [/* @__PURE__ */ r("div", {
26
+ children: [/* @__PURE__ */ i("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__ */ n("i", { className: "fa-regular fa-clock" }), "Times"]
29
- }), /* @__PURE__ */ r("div", {
28
+ children: [/* @__PURE__ */ r("i", { className: "fa-regular fa-clock" }), "Times"]
29
+ }), /* @__PURE__ */ i("div", {
30
30
  className: "flex flex-col gap-0.5 font-mono text-zinc-700 dark:text-zinc-300",
31
31
  children: [
32
- /* @__PURE__ */ r("div", {
32
+ /* @__PURE__ */ i("div", {
33
33
  className: "flex gap-1",
34
- children: [/* @__PURE__ */ n("span", {
34
+ children: [/* @__PURE__ */ r("span", {
35
35
  className: "text-zinc-400 dark:text-zinc-500",
36
36
  children: "Start"
37
37
  }), h]
38
38
  }),
39
- /* @__PURE__ */ r("div", {
39
+ /* @__PURE__ */ i("div", {
40
40
  className: "flex gap-1",
41
- children: [/* @__PURE__ */ n("span", {
41
+ children: [/* @__PURE__ */ r("span", {
42
42
  className: "text-zinc-400 dark:text-zinc-500",
43
43
  children: "End"
44
44
  }), g]
45
45
  }),
46
- /* @__PURE__ */ r("div", {
46
+ /* @__PURE__ */ i("div", {
47
47
  className: "flex gap-1",
48
- children: [/* @__PURE__ */ n("span", {
48
+ children: [/* @__PURE__ */ r("span", {
49
49
  className: "text-zinc-400 dark:text-zinc-500",
50
50
  children: "Duration"
51
51
  }), u]
@@ -53,53 +53,53 @@ var s = ({ triggerName: s, startTime: c, endTime: l, duration: u, elementId: d,
53
53
  ]
54
54
  })]
55
55
  }),
56
- /* @__PURE__ */ n("div", { className: "w-px shrink-0 bg-zinc-200 dark:bg-zinc-800" }),
57
- /* @__PURE__ */ r("div", {
56
+ /* @__PURE__ */ r("div", { className: "w-px shrink-0 bg-zinc-200 dark:bg-zinc-800" }),
57
+ /* @__PURE__ */ i("div", {
58
58
  className: "flex min-w-0 grow basis-0 flex-col",
59
- children: [/* @__PURE__ */ r("div", {
59
+ children: [/* @__PURE__ */ i("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__ */ n("i", { className: "fa-solid fa-circle-info" }), "Details"]
62
- }), /* @__PURE__ */ r("div", {
61
+ children: [/* @__PURE__ */ r("i", { className: "fa-solid fa-circle-info" }), "Details"]
62
+ }), /* @__PURE__ */ i("div", {
63
63
  className: "flex flex-col gap-0.5 text-zinc-700 dark:text-zinc-300",
64
64
  children: [
65
- /* @__PURE__ */ r("div", {
65
+ /* @__PURE__ */ i("div", {
66
66
  className: "flex gap-1",
67
- children: [/* @__PURE__ */ n("span", {
67
+ children: [/* @__PURE__ */ r("span", {
68
68
  className: "text-zinc-400 dark:text-zinc-500",
69
69
  children: "Type"
70
- }), /* @__PURE__ */ n("span", { children: "Interaction" })]
70
+ }), /* @__PURE__ */ r("span", { children: "Interaction" })]
71
71
  }),
72
- /* @__PURE__ */ r("div", {
72
+ /* @__PURE__ */ i("div", {
73
73
  className: "flex min-w-0 gap-1",
74
- children: [/* @__PURE__ */ n("span", {
74
+ children: [/* @__PURE__ */ r("span", {
75
75
  className: "shrink-0 text-zinc-400 dark:text-zinc-500",
76
76
  children: "Trigger"
77
- }), /* @__PURE__ */ n("span", {
77
+ }), /* @__PURE__ */ r("span", {
78
78
  className: "truncate",
79
79
  children: s
80
80
  })]
81
81
  }),
82
- f && /* @__PURE__ */ r("div", {
82
+ f && /* @__PURE__ */ i("div", {
83
83
  className: "flex min-w-0 gap-1",
84
- children: [/* @__PURE__ */ n("span", {
84
+ children: [/* @__PURE__ */ r("span", {
85
85
  className: "shrink-0 text-zinc-400 dark:text-zinc-500",
86
86
  children: "Fired on"
87
- }), /* @__PURE__ */ n("span", {
87
+ }), /* @__PURE__ */ r("span", {
88
88
  className: "truncate font-mono",
89
89
  children: f
90
90
  })]
91
91
  }),
92
- /* @__PURE__ */ r("div", {
92
+ /* @__PURE__ */ i("div", {
93
93
  className: "flex min-w-0 gap-1",
94
- children: [/* @__PURE__ */ n("span", {
94
+ children: [/* @__PURE__ */ r("span", {
95
95
  className: "shrink-0 text-zinc-400 dark:text-zinc-500",
96
96
  children: "Element"
97
- }), /* @__PURE__ */ r("span", {
97
+ }), /* @__PURE__ */ i("span", {
98
98
  className: "cursor-pointer truncate text-violet-600 hover:text-violet-500 dark:text-violet-400 dark:hover:text-violet-300",
99
99
  onClick: v,
100
100
  onMouseEnter: y,
101
101
  onMouseLeave: b,
102
- children: [m?.definition.label, d && /* @__PURE__ */ r("span", {
102
+ children: [m?.definition.label, d && /* @__PURE__ */ i("span", {
103
103
  className: "ml-1 font-mono text-[10px] text-zinc-400 dark:text-zinc-500",
104
104
  children: [
105
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 { jsx as i, jsxs as a } from "react/jsx-runtime";
5
- import { get as o } from "@plitzi/plitzi-ui/helpers";
4
+ import { get as i } from "@plitzi/plitzi-ui/helpers";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
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 = o(u, l), t = [];
10
+ let e = i(u, l), t = [];
11
11
  for (; e;) {
12
- let { node: n, startTime: r, endTime: i } = e, a = `${s(r, i)}ms`, c = n.id === l ? 0 : 1;
12
+ let { node: n, startTime: r, endTime: a } = e, o = `${s(r, a)}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: a
20
- }), e = o(u, n.afterNode);
19
+ duration: o
20
+ }), e = i(u, n.afterNode);
21
21
  }
22
22
  return t;
23
23
  }, [l, u]), m = n((e) => f?.(e), [f]);
24
- return /* @__PURE__ */ a("div", {
24
+ return /* @__PURE__ */ o("div", {
25
25
  className: t("flex flex-col gap-1.5", c),
26
- children: [/* @__PURE__ */ a("div", {
26
+ children: [/* @__PURE__ */ o("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__ */ i("i", { className: "fa-solid fa-code-merge" }), "Execution Tree"]
29
- }), /* @__PURE__ */ i("div", {
28
+ children: [/* @__PURE__ */ a("i", { className: "fa-solid fa-code-merge" }), "Execution Tree"]
29
+ }), /* @__PURE__ */ a("div", {
30
30
  className: "flex flex-col",
31
- children: p.map((t, n) => /* @__PURE__ */ i(e, {
31
+ children: p.map((t, n) => /* @__PURE__ */ a(e, {
32
32
  id: t.id,
33
33
  action: t.action,
34
34
  title: t.title,