@plitzi/sdk-dev-tools 0.33.2 → 0.34.1
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 +27 -0
- package/dist/DevToolsContainer.mjs +50 -45
- package/dist/DevToolsContextProvider.mjs +1 -1
- package/dist/components/DevToolsIndicator/DevToolsIndicator.mjs +1 -1
- package/dist/components/DevToolsPanel/DevToolsBody.mjs +32 -30
- package/dist/components/DevToolsPanel/DevToolsHeader.mjs +40 -34
- package/dist/components/DevToolsPanel/DevToolsPanel.mjs +13 -13
- package/dist/components/DevToolsPanel/ThemeControl.d.ts +2 -0
- package/dist/components/DevToolsPanel/ThemeControl.mjs +27 -0
- package/dist/components/DevToolsPanel/tabs/ActionsViewer/ActionsViewer.d.ts +3 -0
- package/dist/components/DevToolsPanel/tabs/ActionsViewer/ActionsViewer.mjs +147 -0
- package/dist/components/DevToolsPanel/tabs/ActionsViewer/index.d.ts +3 -0
- package/dist/components/DevToolsPanel/tabs/ActionsViewer/index.mjs +5 -0
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/ElementsList.mjs +23 -16
- package/dist/components/DevToolsPanel/tabs/HistoryViewer/HistoryViewer.mjs +9 -9
- package/dist/components/DevToolsPanel/tabs/Logs/Log.mjs +30 -24
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogAction/LogAction.d.ts +11 -0
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogAction/LogAction.mjs +42 -0
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogAction/index.d.ts +3 -0
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogAction/index.mjs +5 -0
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyContent.d.ts +3 -3
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyHeader.d.ts +2 -2
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyHeader.mjs +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/ExecutionTree/ExecutionTree.d.ts +2 -2
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteraction.d.ts +7 -2
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteraction.mjs +41 -24
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionBody.d.ts +5 -5
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionBody.mjs +2 -2
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionNote.d.ts +17 -0
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionNote.mjs +72 -0
- package/dist/components/DevToolsPanel/tabs/PluginsViewer/PluginDetails.d.ts +10 -3
- package/dist/components/DevToolsPanel/tabs/PluginsViewer/PluginDetails.mjs +27 -8
- package/dist/components/DevToolsPanel/tabs/PluginsViewer/PluginsViewer.d.ts +1 -0
- package/dist/components/DevToolsPanel/tabs/PluginsViewer/PluginsViewer.mjs +37 -22
- package/dist/components/DevToolsPanel/tabs/StoreViewer/StoreViewer.mjs +27 -26
- package/dist/components/DevToolsPanel/tabs/TracingViewer/TracingViewer.mjs +34 -34
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/Flamegraph/FlameFrame.mjs +3 -2
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/Flamegraph/Flamegraph.mjs +48 -35
- 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/TracingViewer/helpers.d.ts +26 -1
- package/dist/components/DevToolsPanel/tabs/TracingViewer/helpers.mjs +106 -84
- package/dist/components/List/List.mjs +1 -1
- package/dist/useHydrated.d.ts +2 -0
- package/dist/useHydrated.mjs +5 -0
- package/dist/useRegisterRootStore.d.ts +11 -0
- package/dist/useRegisterRootStore.mjs +13 -0
- package/package.json +57 -11
|
@@ -4,32 +4,39 @@ import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
|
4
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
|
-
var c = ({ elements:
|
|
8
|
-
let [
|
|
7
|
+
var c = 200, l = ({ elements: l, elementSelected: u, onSelect: d }) => {
|
|
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
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
11
|
children: [/* @__PURE__ */ i("div", {
|
|
12
12
|
className: "px-2 pt-2",
|
|
13
13
|
children: /* @__PURE__ */ i(s, {
|
|
14
|
-
value:
|
|
15
|
-
onChange:
|
|
14
|
+
value: f,
|
|
15
|
+
onChange: _,
|
|
16
16
|
placeholder: "Search elements...",
|
|
17
17
|
size: "sm"
|
|
18
18
|
})
|
|
19
|
-
}), /* @__PURE__ */
|
|
19
|
+
}), /* @__PURE__ */ a("div", {
|
|
20
20
|
className: "flex flex-col overflow-y-auto text-xs text-zinc-700 dark:text-zinc-300",
|
|
21
|
-
children:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
children: [
|
|
22
|
+
h.length === 0 && /* @__PURE__ */ i("div", {
|
|
23
|
+
className: "p-4 text-center text-zinc-400 dark:text-zinc-600",
|
|
24
|
+
children: "No elements"
|
|
25
|
+
}),
|
|
26
|
+
h.map((t) => /* @__PURE__ */ i(e, {
|
|
27
|
+
name: t.definition.label,
|
|
28
|
+
isSelected: u === t.id,
|
|
29
|
+
isVisible: o(t, "definition.initialState.visibility", !0),
|
|
30
|
+
id: t.id,
|
|
31
|
+
onSelect: d
|
|
32
|
+
}, t.id)),
|
|
33
|
+
g > 0 && /* @__PURE__ */ a("div", {
|
|
34
|
+
className: "p-3 text-center text-[11px] text-zinc-400 dark:text-zinc-600",
|
|
35
|
+
children: [g, " more — narrow the search to reach them"]
|
|
36
|
+
})
|
|
37
|
+
]
|
|
31
38
|
})]
|
|
32
39
|
});
|
|
33
40
|
};
|
|
34
41
|
//#endregion
|
|
35
|
-
export {
|
|
42
|
+
export { l as default };
|
|
@@ -2,11 +2,11 @@ import { matchesFilter as e } from "./helpers.mjs";
|
|
|
2
2
|
import t from "./components/HistoryEntryItem/HistoryEntryItem.mjs";
|
|
3
3
|
import n from "./components/HistoryToolbar/HistoryToolbar.mjs";
|
|
4
4
|
import { useCallback as r, useMemo as i, useState as a } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useStoreHistory as o } from "@plitzi/nexus/react";
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/DevToolsPanel/tabs/HistoryViewer/HistoryViewer.tsx
|
|
8
8
|
var l = () => {
|
|
9
|
-
let { entries: l, index: u, canUndo: d, canRedo: f, undo: p, redo: m, travelTo: h, clear: g } =
|
|
9
|
+
let { entries: l, index: u, canUndo: d, canRedo: f, undo: p, redo: m, travelTo: h, clear: g } = o(), [_, v] = a(""), y = i(() => l.map((e, t) => ({
|
|
10
10
|
entry: e,
|
|
11
11
|
originalIndex: t
|
|
12
12
|
})).filter(({ entry: t }) => e(t, _)).reverse(), [l, _]), b = r((e) => {
|
|
@@ -19,9 +19,9 @@ var l = () => {
|
|
|
19
19
|
u,
|
|
20
20
|
h
|
|
21
21
|
]);
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ c("div", {
|
|
23
23
|
className: "flex h-full w-full flex-col",
|
|
24
|
-
children: [/* @__PURE__ */
|
|
24
|
+
children: [/* @__PURE__ */ s(n, {
|
|
25
25
|
index: u,
|
|
26
26
|
total: l.length,
|
|
27
27
|
canUndo: d,
|
|
@@ -31,17 +31,17 @@ var l = () => {
|
|
|
31
31
|
onRedo: m,
|
|
32
32
|
onClear: g,
|
|
33
33
|
onFilterChange: v
|
|
34
|
-
}), /* @__PURE__ */
|
|
34
|
+
}), /* @__PURE__ */ c("div", {
|
|
35
35
|
tabIndex: 0,
|
|
36
36
|
onKeyDown: b,
|
|
37
37
|
className: "flex flex-1 flex-col overflow-y-auto outline-none",
|
|
38
|
-
children: [y.length === 0 && /* @__PURE__ */
|
|
38
|
+
children: [y.length === 0 && /* @__PURE__ */ c("div", {
|
|
39
39
|
className: "flex grow flex-col items-center justify-center gap-2 text-zinc-400 dark:text-zinc-500",
|
|
40
|
-
children: [/* @__PURE__ */
|
|
40
|
+
children: [/* @__PURE__ */ s("i", { className: "fa-solid fa-clock-rotate-left text-3xl opacity-20" }), /* @__PURE__ */ s("span", {
|
|
41
41
|
className: "text-xs",
|
|
42
42
|
children: _ ? "No entries match the filter" : "No history yet"
|
|
43
43
|
})]
|
|
44
|
-
}), y.map(({ entry: e, originalIndex: n }) => /* @__PURE__ */
|
|
44
|
+
}), y.map(({ entry: e, originalIndex: n }) => /* @__PURE__ */ s(t, {
|
|
45
45
|
index: n,
|
|
46
46
|
path: e.path,
|
|
47
47
|
value: e.value,
|
|
@@ -1,30 +1,36 @@
|
|
|
1
|
-
import e from "./categories/
|
|
2
|
-
import t from "./categories/
|
|
3
|
-
import n from "./categories/
|
|
4
|
-
import r from "./categories/
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import e from "./categories/LogAction/index.mjs";
|
|
2
|
+
import t from "./categories/LogInteraction/index.mjs";
|
|
3
|
+
import n from "./categories/LogNavigation/index.mjs";
|
|
4
|
+
import r from "./categories/LogNetwork/index.mjs";
|
|
5
|
+
import i from "./categories/LogStore/LogStore.mjs";
|
|
6
|
+
import { memo as a } from "react";
|
|
7
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
var l = a(({ category: a, message: l, time: u, params: d }) => /* @__PURE__ */ c(o, { children: [
|
|
9
|
+
a === "interactions" && /* @__PURE__ */ s(t, {
|
|
10
|
+
message: l,
|
|
11
|
+
params: d,
|
|
12
|
+
time: u
|
|
12
13
|
}),
|
|
13
|
-
|
|
14
|
-
message:
|
|
15
|
-
params:
|
|
16
|
-
time:
|
|
14
|
+
a === "navigation" && /* @__PURE__ */ s(n, {
|
|
15
|
+
message: l,
|
|
16
|
+
params: d,
|
|
17
|
+
time: u
|
|
17
18
|
}),
|
|
18
|
-
|
|
19
|
-
message:
|
|
20
|
-
params:
|
|
21
|
-
time:
|
|
19
|
+
a === "store" && /* @__PURE__ */ s(i, {
|
|
20
|
+
message: l,
|
|
21
|
+
params: d,
|
|
22
|
+
time: u
|
|
22
23
|
}),
|
|
23
|
-
|
|
24
|
-
message:
|
|
25
|
-
params:
|
|
26
|
-
time:
|
|
24
|
+
a === "network" && /* @__PURE__ */ s(r, {
|
|
25
|
+
message: l,
|
|
26
|
+
params: d,
|
|
27
|
+
time: u
|
|
28
|
+
}),
|
|
29
|
+
a === "actions" && /* @__PURE__ */ s(e, {
|
|
30
|
+
message: l,
|
|
31
|
+
params: d,
|
|
32
|
+
time: u
|
|
27
33
|
})
|
|
28
34
|
] }));
|
|
29
35
|
//#endregion
|
|
30
|
-
export {
|
|
36
|
+
export { l as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LogAction as TLogAction } from '@plitzi/sdk-shared';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type LogActionProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
time?: string;
|
|
6
|
+
message?: ReactNode;
|
|
7
|
+
params: TLogAction['params'];
|
|
8
|
+
};
|
|
9
|
+
/** Adds mode, server run id and refusal reason to the message line. */
|
|
10
|
+
declare const LogAction: ({ className, time, message, params }: LogActionProps) => import("react").JSX.Element;
|
|
11
|
+
export default LogAction;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import e from "clsx";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/DevToolsPanel/tabs/Logs/categories/LogAction/LogAction.tsx
|
|
4
|
+
var r = ({ className: r = "", time: i, message: a, params: o }) => {
|
|
5
|
+
let { actionId: s, mode: c, runId: l, status: u, reason: d, error: f } = o, p = !!(d ?? f);
|
|
6
|
+
return /* @__PURE__ */ n("div", {
|
|
7
|
+
className: e("flex flex-col border-b border-gray-100 px-2 py-1 dark:border-zinc-800", r),
|
|
8
|
+
children: [
|
|
9
|
+
/* @__PURE__ */ n("div", {
|
|
10
|
+
className: "flex items-center gap-2",
|
|
11
|
+
children: [
|
|
12
|
+
i && /* @__PURE__ */ t("span", {
|
|
13
|
+
className: "text-gray-400",
|
|
14
|
+
children: i
|
|
15
|
+
}),
|
|
16
|
+
/* @__PURE__ */ t("span", {
|
|
17
|
+
className: "grow",
|
|
18
|
+
children: a ?? s
|
|
19
|
+
}),
|
|
20
|
+
c && /* @__PURE__ */ t("span", {
|
|
21
|
+
className: "rounded-sm bg-gray-100 px-1 text-[10px] uppercase dark:bg-zinc-800",
|
|
22
|
+
children: c
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ t("span", {
|
|
25
|
+
className: e(p ? "text-red-600 dark:text-red-400" : "text-gray-500 dark:text-zinc-400"),
|
|
26
|
+
children: d ?? u ?? ""
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
}),
|
|
30
|
+
l && /* @__PURE__ */ n("span", {
|
|
31
|
+
className: "font-mono text-[10px] text-gray-400",
|
|
32
|
+
children: ["run ", l]
|
|
33
|
+
}),
|
|
34
|
+
f && /* @__PURE__ */ t("span", {
|
|
35
|
+
className: "break-words text-red-600 dark:text-red-400",
|
|
36
|
+
children: f
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { r as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InteractionFlowParams } from '@plitzi/sdk-shared';
|
|
2
2
|
export type BodyContentProps = {
|
|
3
3
|
className?: string;
|
|
4
|
-
node:
|
|
5
|
-
nodes:
|
|
4
|
+
node: InteractionFlowParams['node'];
|
|
5
|
+
nodes: InteractionFlowParams['nodes'];
|
|
6
6
|
};
|
|
7
7
|
declare const BodyContent: ({ className, node, nodes }: BodyContentProps) => import("react").JSX.Element;
|
|
8
8
|
export default BodyContent;
|
|
@@ -6,7 +6,7 @@ export type BodyHeaderProps = {
|
|
|
6
6
|
endTime: number;
|
|
7
7
|
duration?: string;
|
|
8
8
|
elementId?: string;
|
|
9
|
-
|
|
9
|
+
hostElementId?: string;
|
|
10
10
|
};
|
|
11
|
-
declare const BodyHeader: ({ triggerName, startTime, endTime, duration, elementId,
|
|
11
|
+
declare const BodyHeader: ({ triggerName, startTime, endTime, duration, elementId, hostElementId }: BodyHeaderProps) => import("react").JSX.Element;
|
|
12
12
|
export default BodyHeader;
|
|
@@ -4,7 +4,7 @@ import { useCommonStore as i } from "@plitzi/sdk-shared/store";
|
|
|
4
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,
|
|
7
|
+
var s = ({ triggerName: s, startTime: c, endTime: l, duration: u, elementId: d, hostElementId: f }) => {
|
|
8
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
10
|
}, [d]), v = e(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type Nodes =
|
|
1
|
+
import { InteractionFlowParams } from '@plitzi/sdk-shared';
|
|
2
|
+
type Nodes = InteractionFlowParams['nodes'];
|
|
3
3
|
export type ExecutionTreeProps = {
|
|
4
4
|
className?: string;
|
|
5
5
|
nodeId: string;
|
package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteraction.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { LogInteraction as TLogInteraction } from '@plitzi/sdk-shared';
|
|
1
|
+
import { InteractionFlowParams, LogInteraction as TLogInteraction } from '@plitzi/sdk-shared';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
export type LogInteractionFlowProps = {
|
|
4
|
+
message?: ReactNode;
|
|
5
|
+
params: InteractionFlowParams;
|
|
6
|
+
time?: string;
|
|
7
|
+
};
|
|
3
8
|
export type LogInteractionProps = {
|
|
4
9
|
className?: string;
|
|
5
10
|
message?: ReactNode;
|
|
6
11
|
params: TLogInteraction['params'];
|
|
7
12
|
time?: string;
|
|
8
13
|
};
|
|
9
|
-
declare const LogInteraction: ({ time, message, params
|
|
14
|
+
declare const LogInteraction: ({ time, message, params }: LogInteractionProps) => import("react").JSX.Element;
|
|
10
15
|
export default LogInteraction;
|
package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteraction.mjs
CHANGED
|
@@ -1,45 +1,54 @@
|
|
|
1
1
|
import e from "./LogInteractionBody.mjs";
|
|
2
2
|
import t from "./LogInteractionHeader.mjs";
|
|
3
|
-
import n from "
|
|
4
|
-
import r from "
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import s from "
|
|
8
|
-
import
|
|
3
|
+
import n from "./LogInteractionNote.mjs";
|
|
4
|
+
import r from "../../LogStatusIcon.mjs";
|
|
5
|
+
import i from "clsx";
|
|
6
|
+
import { useMemo as a } from "react";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
import c from "@plitzi/plitzi-ui/ContainerCollapsable";
|
|
9
|
+
import { getDurationMs as l } from "@plitzi/sdk-shared";
|
|
10
|
+
import { isInteractionFlow as u } from "@plitzi/sdk-shared/devTools";
|
|
9
11
|
//#region src/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteraction.tsx
|
|
10
|
-
var
|
|
11
|
-
let b =
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var d = /* @__PURE__ */ o("i", { className: "fa-solid fa-angle-right text-[10px]" }), f = /* @__PURE__ */ o("i", { className: "fa-solid fa-angle-down text-[10px]" }), p = ({ time: n, message: u, params: { elementId: p, hostElementId: m, status: h, node: g, nodes: _, startTime: v = 0, endTime: y = 0 } }) => {
|
|
13
|
+
let b = a(() => `${l(v, y)}ms`, [v, y]), { failed: x, skipped: S, disabled: C } = a(() => {
|
|
14
|
+
let e = Object.values(_).map(({ status: e }) => e);
|
|
15
|
+
return {
|
|
16
|
+
failed: e.filter((e) => e === "failed").length,
|
|
17
|
+
skipped: e.filter((e) => e === "skipped").length,
|
|
18
|
+
disabled: e.filter((e) => e === "disabled").length
|
|
19
|
+
};
|
|
20
|
+
}, [_]);
|
|
21
|
+
return /* @__PURE__ */ s(c, {
|
|
22
|
+
className: i("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
23
|
"border-l-emerald-500": h === "completed",
|
|
15
24
|
"border-l-red-500": h === "failed",
|
|
16
25
|
"border-l-zinc-300 dark:border-l-zinc-600": h === "skipped"
|
|
17
26
|
}),
|
|
18
27
|
collapsed: !0,
|
|
19
|
-
children: [/* @__PURE__ */
|
|
20
|
-
title: /* @__PURE__ */
|
|
28
|
+
children: [/* @__PURE__ */ o(c.Header, {
|
|
29
|
+
title: /* @__PURE__ */ o(t, {
|
|
21
30
|
status: h,
|
|
22
|
-
message:
|
|
23
|
-
time:
|
|
31
|
+
message: u,
|
|
32
|
+
time: n
|
|
24
33
|
}),
|
|
25
34
|
placement: "left",
|
|
26
35
|
className: { headerTitle: "overflow-hidden" },
|
|
27
|
-
iconCollapsed:
|
|
28
|
-
iconExpanded:
|
|
29
|
-
children: /* @__PURE__ */
|
|
36
|
+
iconCollapsed: d,
|
|
37
|
+
iconExpanded: f,
|
|
38
|
+
children: /* @__PURE__ */ s("div", {
|
|
30
39
|
className: "flex gap-3 text-zinc-400 dark:text-zinc-500",
|
|
31
40
|
children: [
|
|
32
|
-
!!x && /* @__PURE__ */
|
|
41
|
+
!!x && /* @__PURE__ */ o(r, {
|
|
33
42
|
logType: "danger",
|
|
34
43
|
title: "Failed",
|
|
35
44
|
children: x
|
|
36
45
|
}),
|
|
37
|
-
h !== "skipped" && !!S && /* @__PURE__ */
|
|
46
|
+
h !== "skipped" && !!S && /* @__PURE__ */ o(r, {
|
|
38
47
|
logType: "warning",
|
|
39
48
|
title: "Skipped",
|
|
40
49
|
children: S
|
|
41
50
|
}),
|
|
42
|
-
h !== "skipped" && !!C && /* @__PURE__ */
|
|
51
|
+
h !== "skipped" && !!C && /* @__PURE__ */ o(r, {
|
|
43
52
|
logType: "custom",
|
|
44
53
|
iconClassName: "fa-solid fa-ban",
|
|
45
54
|
title: "Disabled",
|
|
@@ -48,9 +57,9 @@ var l = /* @__PURE__ */ a("i", { className: "fa-solid fa-angle-right text-[10px]
|
|
|
48
57
|
b
|
|
49
58
|
]
|
|
50
59
|
})
|
|
51
|
-
}), /* @__PURE__ */
|
|
60
|
+
}), /* @__PURE__ */ o(c.Content, { children: /* @__PURE__ */ o(e, {
|
|
52
61
|
elementId: p,
|
|
53
|
-
|
|
62
|
+
hostElementId: m,
|
|
54
63
|
node: g,
|
|
55
64
|
nodes: _,
|
|
56
65
|
startTime: v,
|
|
@@ -58,6 +67,14 @@ var l = /* @__PURE__ */ a("i", { className: "fa-solid fa-angle-right text-[10px]
|
|
|
58
67
|
duration: b
|
|
59
68
|
}) })]
|
|
60
69
|
});
|
|
61
|
-
}
|
|
70
|
+
}, m = ({ time: e, message: t, params: r }) => u(r) ? /* @__PURE__ */ o(p, {
|
|
71
|
+
time: e,
|
|
72
|
+
message: t,
|
|
73
|
+
params: r
|
|
74
|
+
}) : /* @__PURE__ */ o(n, {
|
|
75
|
+
time: e,
|
|
76
|
+
message: t,
|
|
77
|
+
params: r
|
|
78
|
+
});
|
|
62
79
|
//#endregion
|
|
63
|
-
export {
|
|
80
|
+
export { m as default };
|
package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionBody.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InteractionFlowParams } from '@plitzi/sdk-shared';
|
|
2
2
|
export type LogInteractionBodyProps = {
|
|
3
3
|
className?: string;
|
|
4
|
-
node:
|
|
5
|
-
nodes:
|
|
4
|
+
node: InteractionFlowParams['node'];
|
|
5
|
+
nodes: InteractionFlowParams['nodes'];
|
|
6
6
|
startTime: number;
|
|
7
7
|
endTime: number;
|
|
8
8
|
duration?: string;
|
|
9
9
|
elementId?: string;
|
|
10
|
-
|
|
10
|
+
hostElementId?: string;
|
|
11
11
|
};
|
|
12
|
-
declare const LogInteractionBody: ({ node, nodes, startTime, endTime, duration, elementId,
|
|
12
|
+
declare const LogInteractionBody: ({ node, nodes, startTime, endTime, duration, elementId, hostElementId }: LogInteractionBodyProps) => import("react").JSX.Element;
|
|
13
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,
|
|
5
|
+
var i = ({ node: i, nodes: a, startTime: o, endTime: s, duration: c, elementId: l, hostElementId: 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",
|
|
@@ -12,7 +12,7 @@ var i = ({ node: i, nodes: a, startTime: o, endTime: s, duration: c, elementId:
|
|
|
12
12
|
endTime: s,
|
|
13
13
|
duration: c,
|
|
14
14
|
elementId: l,
|
|
15
|
-
|
|
15
|
+
hostElementId: u
|
|
16
16
|
})
|
|
17
17
|
}), /* @__PURE__ */ n("div", {
|
|
18
18
|
className: "border-t border-zinc-200 dark:border-zinc-800",
|
package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionNote.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { InteractionNoteParams } from '@plitzi/sdk-shared';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type LogInteractionNoteProps = {
|
|
4
|
+
message?: ReactNode;
|
|
5
|
+
params: InteractionNoteParams;
|
|
6
|
+
time?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Something a single step reported, on its way through a flow.
|
|
10
|
+
*
|
|
11
|
+
* A step wired to a name nobody registered, a token that would not resolve, a step that threw. None of these has
|
|
12
|
+
* the flow's summary — the flow has not finished — so none of them can be drawn as one. What they do have is the
|
|
13
|
+
* step itself and, usually, the one fact that explains it: what was thrown, or what names WERE registered where
|
|
14
|
+
* this one looked.
|
|
15
|
+
*/
|
|
16
|
+
declare const LogInteractionNote: ({ time, message, params }: LogInteractionNoteProps) => import("react").JSX.Element;
|
|
17
|
+
export default LogInteractionNote;
|
package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionNote.mjs
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import n from "@plitzi/plitzi-ui/ContainerCollapsable";
|
|
3
|
+
//#region src/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionNote.tsx
|
|
4
|
+
var r = /* @__PURE__ */ e("i", { className: "fa-solid fa-angle-right text-[10px]" }), i = /* @__PURE__ */ e("i", { className: "fa-solid fa-angle-down text-[10px]" }), a = (e) => typeof e == "string" ? e : JSON.stringify(e), o = ({ label: n, children: r }) => /* @__PURE__ */ t("div", {
|
|
5
|
+
className: "flex gap-2",
|
|
6
|
+
children: [/* @__PURE__ */ e("span", {
|
|
7
|
+
className: "w-24 shrink-0 text-zinc-400 dark:text-zinc-500",
|
|
8
|
+
children: n
|
|
9
|
+
}), /* @__PURE__ */ e("span", {
|
|
10
|
+
className: "min-w-0 grow break-words text-zinc-700 dark:text-zinc-300",
|
|
11
|
+
children: r
|
|
12
|
+
})]
|
|
13
|
+
}), s = ({ time: s, message: c, params: l }) => {
|
|
14
|
+
let { node: u, error: d, available: f, param: p, value: m } = l;
|
|
15
|
+
return /* @__PURE__ */ t(n, {
|
|
16
|
+
className: "last:border-b-none w-full border-b border-l-2 border-b-zinc-200 border-l-amber-500 px-2 py-1 transition-colors hover:bg-zinc-50 dark:border-b-zinc-700 dark:hover:bg-zinc-800/50",
|
|
17
|
+
collapsed: !0,
|
|
18
|
+
children: [/* @__PURE__ */ e(n.Header, {
|
|
19
|
+
title: /* @__PURE__ */ t("div", {
|
|
20
|
+
className: "flex w-full items-center gap-2 overflow-hidden",
|
|
21
|
+
children: [/* @__PURE__ */ e("span", {
|
|
22
|
+
className: "shrink-0 font-mono text-zinc-400 tabular-nums dark:text-zinc-500",
|
|
23
|
+
children: s
|
|
24
|
+
}), /* @__PURE__ */ e("div", {
|
|
25
|
+
className: "grow basis-0 truncate text-zinc-700 dark:text-zinc-300",
|
|
26
|
+
children: c
|
|
27
|
+
})]
|
|
28
|
+
}),
|
|
29
|
+
placement: "left",
|
|
30
|
+
className: {
|
|
31
|
+
headerTitle: "overflow-hidden",
|
|
32
|
+
header: "hover:bg-transparent dark:hover:bg-transparent"
|
|
33
|
+
},
|
|
34
|
+
iconCollapsed: r,
|
|
35
|
+
iconExpanded: i
|
|
36
|
+
}), /* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ t("div", {
|
|
37
|
+
className: "mx-2 my-1.5 flex flex-col gap-1 rounded border border-zinc-200 px-3 py-2 text-xs dark:border-zinc-800",
|
|
38
|
+
children: [
|
|
39
|
+
u?.title && /* @__PURE__ */ e(o, {
|
|
40
|
+
label: "Step",
|
|
41
|
+
children: u.title
|
|
42
|
+
}),
|
|
43
|
+
u?.action && /* @__PURE__ */ e(o, {
|
|
44
|
+
label: "Action",
|
|
45
|
+
children: u.action
|
|
46
|
+
}),
|
|
47
|
+
u?.elementId && /* @__PURE__ */ e(o, {
|
|
48
|
+
label: "Element",
|
|
49
|
+
children: u.elementId
|
|
50
|
+
}),
|
|
51
|
+
p && /* @__PURE__ */ e(o, {
|
|
52
|
+
label: "Param",
|
|
53
|
+
children: p
|
|
54
|
+
}),
|
|
55
|
+
m !== void 0 && /* @__PURE__ */ e(o, {
|
|
56
|
+
label: "Value",
|
|
57
|
+
children: a(m)
|
|
58
|
+
}),
|
|
59
|
+
d && /* @__PURE__ */ e(o, {
|
|
60
|
+
label: "Error",
|
|
61
|
+
children: d
|
|
62
|
+
}),
|
|
63
|
+
f && /* @__PURE__ */ e(o, {
|
|
64
|
+
label: "Registered",
|
|
65
|
+
children: f.length > 0 ? f.join(", ") : "nothing on that element"
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
}) })]
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
export { s as default };
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ComponentOrigin } from '@plitzi/sdk-shared';
|
|
2
|
+
/** One element this page has that the SDK did not bring, however it got here. */
|
|
3
|
+
export type PluginEntry = {
|
|
4
|
+
type: string;
|
|
5
|
+
origin: Exclude<ComponentOrigin, 'local'>;
|
|
6
|
+
/** Absent for a plugin nobody published: a file a deployment ships has no manifest to read a version off. */
|
|
3
7
|
version?: string;
|
|
4
8
|
author?: string;
|
|
5
9
|
settings?: Record<string, unknown>;
|
|
6
10
|
};
|
|
7
|
-
|
|
11
|
+
export type PluginDetailsProps = {
|
|
12
|
+
entry: PluginEntry;
|
|
13
|
+
};
|
|
14
|
+
declare const PluginDetails: ({ entry }: PluginDetailsProps) => import("react").JSX.Element;
|
|
8
15
|
export default PluginDetails;
|
|
@@ -2,8 +2,17 @@ import { useMemo as e } from "react";
|
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
import r from "@plitzi/sdk-shared/helpers/syntaxHighlight";
|
|
4
4
|
//#region src/components/DevToolsPanel/tabs/PluginsViewer/PluginDetails.tsx
|
|
5
|
-
var i =
|
|
6
|
-
|
|
5
|
+
var i = {
|
|
6
|
+
"local-custom": {
|
|
7
|
+
label: "Shipped with this space",
|
|
8
|
+
hint: "A file this deployment hands the server, compiled and rendered with everything else."
|
|
9
|
+
},
|
|
10
|
+
remote: {
|
|
11
|
+
label: "Installed",
|
|
12
|
+
hint: "A published bundle, described by the manifest it was published with."
|
|
13
|
+
}
|
|
14
|
+
}, a = ({ entry: a }) => {
|
|
15
|
+
let { type: o, origin: s, version: c, author: l, settings: u } = a, d = e(() => !u || Object.keys(u).length === 0 ? null : r(JSON.stringify(u, null, 2)), [u]);
|
|
7
16
|
return /* @__PURE__ */ n("div", {
|
|
8
17
|
className: "flex h-full grow basis-0 flex-col overflow-y-auto p-4",
|
|
9
18
|
children: [/* @__PURE__ */ n("div", {
|
|
@@ -13,11 +22,21 @@ var i = ({ author: i, settings: a, label: o, version: s }) => {
|
|
|
13
22
|
children: o
|
|
14
23
|
}), /* @__PURE__ */ t("div", {
|
|
15
24
|
className: "text-xs text-zinc-400 dark:text-zinc-500",
|
|
16
|
-
children:
|
|
25
|
+
children: i[s].label
|
|
17
26
|
})]
|
|
18
27
|
}), /* @__PURE__ */ n("div", {
|
|
19
28
|
className: "flex flex-col gap-3",
|
|
20
29
|
children: [
|
|
30
|
+
/* @__PURE__ */ n("div", {
|
|
31
|
+
className: "flex flex-col gap-0.5",
|
|
32
|
+
children: [/* @__PURE__ */ t("span", {
|
|
33
|
+
className: "text-xs font-medium tracking-wider text-zinc-400 uppercase dark:text-zinc-500",
|
|
34
|
+
children: "Where it comes from"
|
|
35
|
+
}), /* @__PURE__ */ t("span", {
|
|
36
|
+
className: "text-xs text-zinc-800 dark:text-zinc-200",
|
|
37
|
+
children: i[s].hint
|
|
38
|
+
})]
|
|
39
|
+
}),
|
|
21
40
|
/* @__PURE__ */ n("div", {
|
|
22
41
|
className: "flex flex-col gap-0.5",
|
|
23
42
|
children: [/* @__PURE__ */ t("span", {
|
|
@@ -25,7 +44,7 @@ var i = ({ author: i, settings: a, label: o, version: s }) => {
|
|
|
25
44
|
children: "Version"
|
|
26
45
|
}), /* @__PURE__ */ t("span", {
|
|
27
46
|
className: "font-mono text-xs text-zinc-800 dark:text-zinc-200",
|
|
28
|
-
children:
|
|
47
|
+
children: c ?? "—"
|
|
29
48
|
})]
|
|
30
49
|
}),
|
|
31
50
|
/* @__PURE__ */ n("div", {
|
|
@@ -35,7 +54,7 @@ var i = ({ author: i, settings: a, label: o, version: s }) => {
|
|
|
35
54
|
children: "Author"
|
|
36
55
|
}), /* @__PURE__ */ t("span", {
|
|
37
56
|
className: "text-xs text-zinc-800 dark:text-zinc-200",
|
|
38
|
-
children:
|
|
57
|
+
children: l ?? "—"
|
|
39
58
|
})]
|
|
40
59
|
}),
|
|
41
60
|
/* @__PURE__ */ n("div", {
|
|
@@ -43,9 +62,9 @@ var i = ({ author: i, settings: a, label: o, version: s }) => {
|
|
|
43
62
|
children: [/* @__PURE__ */ t("span", {
|
|
44
63
|
className: "text-xs font-medium tracking-wider text-zinc-400 uppercase dark:text-zinc-500",
|
|
45
64
|
children: "Settings"
|
|
46
|
-
}),
|
|
65
|
+
}), d ? /* @__PURE__ */ t("pre", {
|
|
47
66
|
className: "overflow-auto rounded bg-zinc-50 p-2 font-mono text-xs leading-5 dark:bg-zinc-800",
|
|
48
|
-
dangerouslySetInnerHTML: { __html:
|
|
67
|
+
dangerouslySetInnerHTML: { __html: d }
|
|
49
68
|
}) : /* @__PURE__ */ t("span", {
|
|
50
69
|
className: "text-xs text-zinc-400 italic dark:text-zinc-500",
|
|
51
70
|
children: "No settings"
|
|
@@ -56,4 +75,4 @@ var i = ({ author: i, settings: a, label: o, version: s }) => {
|
|
|
56
75
|
});
|
|
57
76
|
};
|
|
58
77
|
//#endregion
|
|
59
|
-
export {
|
|
78
|
+
export { a as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type PluginsViewerProps = {
|
|
2
2
|
className?: string;
|
|
3
3
|
};
|
|
4
|
+
/** Plugins from both registers: installed bundles (PluginsContext) and space-shipped ones (component registry). */
|
|
4
5
|
declare const PluginsViewer: ({ className }: PluginsViewerProps) => import("react").JSX.Element;
|
|
5
6
|
export default PluginsViewer;
|