@plitzi/sdk-dev-tools 0.32.25 → 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.
- package/CHANGELOG.md +14 -0
- package/dist/DevToolsContainer.mjs +45 -29
- package/dist/DevToolsContextProvider.mjs +4 -4
- package/dist/components/DevToolsIndicator/DevToolsIndicator.d.ts +7 -0
- package/dist/components/DevToolsIndicator/DevToolsIndicator.mjs +50 -0
- package/dist/components/DevToolsIndicator/index.d.ts +3 -0
- package/dist/components/DevToolsIndicator/index.mjs +5 -0
- package/dist/components/DevToolsOverlay/DevToolsOverlay.d.ts +15 -0
- package/dist/components/DevToolsOverlay/DevToolsOverlay.mjs +18 -0
- package/dist/components/DevToolsOverlay/index.d.ts +3 -0
- package/dist/components/DevToolsOverlay/index.mjs +5 -0
- package/dist/components/DevToolsPanel/DevToolsBody.d.ts +3 -1
- package/dist/components/DevToolsPanel/DevToolsBody.mjs +8 -7
- package/dist/components/DevToolsPanel/DevToolsHeader.d.ts +2 -1
- package/dist/components/DevToolsPanel/DevToolsHeader.mjs +31 -22
- package/dist/components/DevToolsPanel/DevToolsPanel.d.ts +7 -1
- package/dist/components/DevToolsPanel/DevToolsPanel.mjs +36 -34
- package/dist/components/DevToolsPanel/DevToolsSubHeader.mjs +8 -8
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/DetailsValue.mjs +9 -9
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/ElementDetails.mjs +7 -7
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/ElementsList.mjs +9 -9
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/ElementsViewer.mjs +15 -16
- package/dist/components/DevToolsPanel/tabs/Logs/Log.mjs +23 -17
- package/dist/components/DevToolsPanel/tabs/Logs/Logs.d.ts +4 -2
- package/dist/components/DevToolsPanel/tabs/Logs/Logs.mjs +15 -15
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyContent.mjs +8 -8
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyHeader.d.ts +2 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyHeader.mjs +53 -43
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/ExecutionTree/ExecutionTree.mjs +11 -11
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteraction.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteraction.mjs +22 -15
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionBody.d.ts +2 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionBody.mjs +3 -2
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionHeader.d.ts +2 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionHeader.mjs +4 -0
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNavigation/LogNavigationBody.mjs +26 -26
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNetwork/LogNetwork.d.ts +10 -0
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNetwork/LogNetwork.mjs +52 -0
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNetwork/index.d.ts +3 -0
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNetwork/index.mjs +5 -0
- package/dist/components/DevToolsPanel/tabs/StoreViewer/StoreViewer.mjs +31 -28
- package/dist/components/DevToolsPanel/tabs/StoreViewer/helpers/mapFunctionValues.d.ts +3 -0
- package/dist/components/DevToolsPanel/tabs/StoreViewer/helpers/mapFunctionValues.mjs +22 -0
- package/dist/components/DevToolsPanel/tabs/StoreViewer/helpers/renderFunctionValue.d.ts +3 -0
- package/dist/components/DevToolsPanel/tabs/StoreViewer/helpers/renderFunctionValue.mjs +13 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/TracingViewer.mjs +98 -99
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/CommitStrip/CommitStrip.mjs +6 -4
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/HotspotsList/HotspotsList.mjs +32 -32
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/RankedList/RankedList.mjs +40 -40
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/SidebarShell/SidebarShell.mjs +7 -7
- package/dist/components/DevToolsPanel/tabs/VariablesViewer/VariablesViewer.mjs +12 -12
- 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 {
|
|
4
|
-
import {
|
|
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__ */
|
|
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__ */
|
|
11
|
+
children: [/* @__PURE__ */ i("div", {
|
|
12
12
|
className: "px-2 pt-2",
|
|
13
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
24
|
+
}) : p.map((t, n) => /* @__PURE__ */ i(e, {
|
|
25
25
|
name: t.definition.label,
|
|
26
26
|
isSelected: l === t.id,
|
|
27
|
-
isVisible:
|
|
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 {
|
|
5
|
-
import o from "
|
|
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
|
|
10
|
-
let
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
className: n("flex h-full w-full",
|
|
13
|
-
children: [/* @__PURE__ */
|
|
14
|
-
elements:
|
|
15
|
-
elementSelected:
|
|
16
|
-
onSelect:
|
|
17
|
-
}),
|
|
18
|
-
definition:
|
|
19
|
-
attributes:
|
|
20
|
-
onSelectElement:
|
|
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 {
|
|
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/
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
13
|
-
message:
|
|
14
|
-
params:
|
|
15
|
-
time:
|
|
13
|
+
i === "navigation" && /* @__PURE__ */ o(t, {
|
|
14
|
+
message: c,
|
|
15
|
+
params: u,
|
|
16
|
+
time: l
|
|
16
17
|
}),
|
|
17
|
-
|
|
18
|
-
message:
|
|
19
|
-
params:
|
|
20
|
-
time:
|
|
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 {
|
|
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",
|
|
8
|
-
let [
|
|
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 =
|
|
11
|
-
e &&
|
|
10
|
+
let e = g.current;
|
|
11
|
+
e && _.current && (e.scrollTop = 0);
|
|
12
12
|
}, [l]);
|
|
13
|
-
let
|
|
14
|
-
let e =
|
|
15
|
-
e && (
|
|
16
|
-
}, [u]),
|
|
17
|
-
|
|
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:
|
|
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:
|
|
39
|
+
logTypeSelected: m,
|
|
40
40
|
items: l,
|
|
41
41
|
orientation: d,
|
|
42
|
-
onClick:
|
|
42
|
+
onClick: y
|
|
43
43
|
}), /* @__PURE__ */ s("div", {
|
|
44
|
-
ref:
|
|
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 }) => !
|
|
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 {
|
|
6
|
-
import {
|
|
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(() =>
|
|
10
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
21
|
-
f && /* @__PURE__ */
|
|
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__ */
|
|
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 {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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 [
|
|
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]),
|
|
11
|
-
|
|
10
|
+
}, [d]), v = e(() => {
|
|
11
|
+
_?.scrollIntoView({
|
|
12
12
|
behavior: "smooth",
|
|
13
13
|
block: "nearest",
|
|
14
14
|
inline: "nearest"
|
|
15
15
|
});
|
|
16
|
-
}, [
|
|
17
|
-
|
|
18
|
-
}, [
|
|
19
|
-
|
|
20
|
-
}, [
|
|
21
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
24
|
+
/* @__PURE__ */ r("div", {
|
|
25
25
|
className: "flex min-w-0 grow basis-0 flex-col",
|
|
26
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
29
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
32
|
+
/* @__PURE__ */ r("div", {
|
|
33
33
|
className: "flex gap-1",
|
|
34
|
-
children: [/* @__PURE__ */
|
|
34
|
+
children: [/* @__PURE__ */ n("span", {
|
|
35
35
|
className: "text-zinc-400 dark:text-zinc-500",
|
|
36
36
|
children: "Start"
|
|
37
|
-
}),
|
|
37
|
+
}), h]
|
|
38
38
|
}),
|
|
39
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ r("div", {
|
|
40
40
|
className: "flex gap-1",
|
|
41
|
-
children: [/* @__PURE__ */
|
|
41
|
+
children: [/* @__PURE__ */ n("span", {
|
|
42
42
|
className: "text-zinc-400 dark:text-zinc-500",
|
|
43
43
|
children: "End"
|
|
44
|
-
}),
|
|
44
|
+
}), g]
|
|
45
45
|
}),
|
|
46
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ r("div", {
|
|
47
47
|
className: "flex gap-1",
|
|
48
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
57
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
62
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
65
|
+
/* @__PURE__ */ r("div", {
|
|
66
66
|
className: "flex gap-1",
|
|
67
|
-
children: [/* @__PURE__ */
|
|
67
|
+
children: [/* @__PURE__ */ n("span", {
|
|
68
68
|
className: "text-zinc-400 dark:text-zinc-500",
|
|
69
69
|
children: "Type"
|
|
70
|
-
}), /* @__PURE__ */
|
|
70
|
+
}), /* @__PURE__ */ n("span", { children: "Interaction" })]
|
|
71
71
|
}),
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ r("div", {
|
|
73
73
|
className: "flex min-w-0 gap-1",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ n("span", {
|
|
75
75
|
className: "shrink-0 text-zinc-400 dark:text-zinc-500",
|
|
76
76
|
children: "Trigger"
|
|
77
|
-
}), /* @__PURE__ */
|
|
77
|
+
}), /* @__PURE__ */ n("span", {
|
|
78
78
|
className: "truncate",
|
|
79
79
|
children: s
|
|
80
80
|
})]
|
|
81
81
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
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__ */
|
|
94
|
+
children: [/* @__PURE__ */ n("span", {
|
|
85
95
|
className: "shrink-0 text-zinc-400 dark:text-zinc-500",
|
|
86
96
|
children: "Element"
|
|
87
|
-
}), /* @__PURE__ */
|
|
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:
|
|
91
|
-
onMouseLeave:
|
|
92
|
-
children: [
|
|
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 {
|
|
5
|
-
import {
|
|
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 =
|
|
10
|
+
let e = o(u, l), t = [];
|
|
11
11
|
for (; e;) {
|
|
12
|
-
let { node: n, startTime: r, endTime:
|
|
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:
|
|
20
|
-
}), e =
|
|
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__ */
|
|
24
|
+
return /* @__PURE__ */ a("div", {
|
|
25
25
|
className: t("flex flex-col gap-1.5", c),
|
|
26
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
29
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
31
|
+
children: p.map((t, n) => /* @__PURE__ */ i(e, {
|
|
32
32
|
id: t.id,
|
|
33
33
|
action: t.action,
|
|
34
34
|
title: t.title,
|
package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteraction.d.ts
CHANGED
|
@@ -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;
|
package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteraction.mjs
CHANGED
|
@@ -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,
|
|
11
|
-
let
|
|
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":
|
|
15
|
-
"border-l-red-500":
|
|
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:
|
|
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
|
-
|
|
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:
|
|
40
|
+
children: S
|
|
35
41
|
}),
|
|
36
|
-
|
|
42
|
+
h !== "skipped" && !!C && /* @__PURE__ */ a(n, {
|
|
37
43
|
logType: "custom",
|
|
38
44
|
iconClassName: "fa-solid fa-ban",
|
|
39
45
|
title: "Disabled",
|
|
40
|
-
children:
|
|
46
|
+
children: C
|
|
41
47
|
}),
|
|
42
|
-
|
|
48
|
+
b
|
|
43
49
|
]
|
|
44
50
|
})
|
|
45
51
|
}), /* @__PURE__ */ a(s.Content, { children: /* @__PURE__ */ a(e, {
|
|
46
52
|
elementId: p,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
elementRef: m,
|
|
54
|
+
node: g,
|
|
55
|
+
nodes: _,
|
|
56
|
+
startTime: v,
|
|
57
|
+
endTime: y,
|
|
58
|
+
duration: b
|
|
52
59
|
}) })]
|
|
53
60
|
});
|
|
54
61
|
};
|
package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionBody.d.ts
CHANGED
|
@@ -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;
|
package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionBody.mjs
CHANGED
|
@@ -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",
|
package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionHeader.mjs
CHANGED
|
@@ -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",
|