@industry-theme/principal-view-panels 0.12.53 → 0.12.55
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasEditorPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CanvasEditorPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAI5D,OAAO,KAAK,EAAyE,gBAAgB,EAA+C,MAAM,mCAAmC,CAAC;AAC9L,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAKxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAiCrE;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,2BAA2B;IACzE;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEnC;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;QAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC,CAAC;IAEH;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEn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EH;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC;;;;OAIG;IACH,aAAa,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAEvC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAihD9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoryboardListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/StoryboardListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"StoryboardListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/StoryboardListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAsE9D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CA4yCvE,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -95899,13 +95899,15 @@ const CanvasEditorPanel = ({
|
|
|
95899
95899
|
}
|
|
95900
95900
|
) }) : /* @__PURE__ */ jsx("div", {}),
|
|
95901
95901
|
rightPanel: /* @__PURE__ */ jsxs("div", { style: { height: "100%", display: "flex", flexDirection: "column", background: theme2.colors.background, position: "relative" }, children: [
|
|
95902
|
-
/* @__PURE__ */ jsxs("div", { style: { flex: 1, position: "relative", minHeight: 0 }, children: [
|
|
95902
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, position: "relative", minHeight: 0, width: "100%", height: "100%" }, children: [
|
|
95903
95903
|
/* @__PURE__ */ jsx(
|
|
95904
95904
|
GraphRenderer,
|
|
95905
95905
|
{
|
|
95906
95906
|
ref: graphRef,
|
|
95907
95907
|
canvas: state.canvas,
|
|
95908
95908
|
library: state.library ?? void 0,
|
|
95909
|
+
width: "100%",
|
|
95910
|
+
height: "100%",
|
|
95909
95911
|
editable: state.isEditMode,
|
|
95910
95912
|
onPendingChangesChange: (hasChanges) => {
|
|
95911
95913
|
setState((prev) => ({ ...prev, hasUnsavedChanges: hasChanges }));
|
|
@@ -99690,6 +99692,9 @@ const StoryboardListPanel = ({
|
|
|
99690
99692
|
const [showHelp, setShowHelp] = useState(false);
|
|
99691
99693
|
const [cliCommandCopied, setCliCommandCopied] = useState(false);
|
|
99692
99694
|
const [canvasTypeFilter, setCanvasTypeFilter] = useState(null);
|
|
99695
|
+
const [contextMenu, setContextMenu] = useState(null);
|
|
99696
|
+
const [contextMenuCopied, setContextMenuCopied] = useState(false);
|
|
99697
|
+
const contextMenuRef = useRef(null);
|
|
99693
99698
|
const { storyboards, workflows, testTraces, isLoading, error, discovery } = useCanvasWorkflowData({ context: context2, actions });
|
|
99694
99699
|
useEffect(() => {
|
|
99695
99700
|
if (!events) return;
|
|
@@ -99858,7 +99863,8 @@ const StoryboardListPanel = ({
|
|
|
99858
99863
|
let draft = 0;
|
|
99859
99864
|
for (const node2 of canvas.nodes) {
|
|
99860
99865
|
const pv = node2.pv;
|
|
99861
|
-
|
|
99866
|
+
if (!pv) continue;
|
|
99867
|
+
const status = pv.status ?? "draft";
|
|
99862
99868
|
if (status === "implemented") {
|
|
99863
99869
|
implemented++;
|
|
99864
99870
|
} else if (status === "approved") {
|
|
@@ -99898,10 +99904,29 @@ const StoryboardListPanel = ({
|
|
|
99898
99904
|
const filteredCanvases = useMemo(() => {
|
|
99899
99905
|
return filteredStoryboards.map((storyboard) => storyboard.canvas);
|
|
99900
99906
|
}, [filteredStoryboards]);
|
|
99901
|
-
const handleTreeNodeClick = useCallback((node2) => {
|
|
99902
|
-
var _a, _b, _c, _d;
|
|
99907
|
+
const handleTreeNodeClick = useCallback((node2, event) => {
|
|
99908
|
+
var _a, _b, _c, _d, _e2, _f;
|
|
99909
|
+
if ((event == null ? void 0 : event.metaKey) || (event == null ? void 0 : event.ctrlKey)) {
|
|
99910
|
+
let filePath;
|
|
99911
|
+
if (node2.type === "canvas" && ((_a = node2.canvas) == null ? void 0 : _a.path)) {
|
|
99912
|
+
filePath = node2.canvas.path;
|
|
99913
|
+
} else if (node2.type === "workflow" && "workflow" in node2 && ((_b = node2.workflow) == null ? void 0 : _b.path)) {
|
|
99914
|
+
filePath = node2.workflow.path;
|
|
99915
|
+
} else if (node2.markdownPath) {
|
|
99916
|
+
filePath = node2.markdownPath;
|
|
99917
|
+
}
|
|
99918
|
+
if (filePath && events) {
|
|
99919
|
+
events.emit({
|
|
99920
|
+
type: "file:open",
|
|
99921
|
+
source: "storyboard-list-panel",
|
|
99922
|
+
timestamp: Date.now(),
|
|
99923
|
+
payload: { path: filePath }
|
|
99924
|
+
});
|
|
99925
|
+
return;
|
|
99926
|
+
}
|
|
99927
|
+
}
|
|
99903
99928
|
if (node2.type === "overview" && node2.markdownPath) {
|
|
99904
|
-
const canvasId = ((
|
|
99929
|
+
const canvasId = ((_c = node2.canvas) == null ? void 0 : _c.id) || "storyboard" in node2 && ((_e2 = (_d = node2.storyboard) == null ? void 0 : _d.canvas) == null ? void 0 : _e2.id) || "unknown";
|
|
99905
99930
|
setSelectedNodeId(`overview:${canvasId}`);
|
|
99906
99931
|
if (events) {
|
|
99907
99932
|
events.emit({
|
|
@@ -99939,7 +99964,7 @@ const StoryboardListPanel = ({
|
|
|
99939
99964
|
return wf.file.path === ((_a2 = node2.workflow) == null ? void 0 : _a2.path);
|
|
99940
99965
|
});
|
|
99941
99966
|
if (!fullWorkflow) {
|
|
99942
|
-
console.warn("[StoryboardListPanel] Workflow template not loaded for:", (
|
|
99967
|
+
console.warn("[StoryboardListPanel] Workflow template not loaded for:", (_f = node2.workflow) == null ? void 0 : _f.path);
|
|
99943
99968
|
return;
|
|
99944
99969
|
}
|
|
99945
99970
|
events.emit({
|
|
@@ -99961,6 +99986,63 @@ const StoryboardListPanel = ({
|
|
|
99961
99986
|
}
|
|
99962
99987
|
}
|
|
99963
99988
|
}, [events, getCanvasFileInfo, workflows]);
|
|
99989
|
+
const getNodeFilePath = useCallback((node2) => {
|
|
99990
|
+
var _a, _b, _c, _d, _e2;
|
|
99991
|
+
if (node2.type === "canvas" && ((_a = node2.canvas) == null ? void 0 : _a.path)) {
|
|
99992
|
+
return node2.canvas.path;
|
|
99993
|
+
} else if (node2.type === "workflow" && "workflow" in node2 && ((_b = node2.workflow) == null ? void 0 : _b.path)) {
|
|
99994
|
+
return node2.workflow.path;
|
|
99995
|
+
} else if (node2.type === "overview" && node2.markdownPath) {
|
|
99996
|
+
return node2.markdownPath;
|
|
99997
|
+
} else if (node2.type === "storyboard" && "storyboard" in node2 && ((_d = (_c = node2.storyboard) == null ? void 0 : _c.canvas) == null ? void 0 : _d.path)) {
|
|
99998
|
+
return node2.storyboard.canvas.path;
|
|
99999
|
+
} else if (node2.type === "canvas-folder" && ((_e2 = node2.canvas) == null ? void 0 : _e2.path)) {
|
|
100000
|
+
return node2.canvas.path;
|
|
100001
|
+
}
|
|
100002
|
+
return void 0;
|
|
100003
|
+
}, []);
|
|
100004
|
+
const handleContextMenu = useCallback((event, node2) => {
|
|
100005
|
+
event.preventDefault();
|
|
100006
|
+
const path2 = getNodeFilePath(node2);
|
|
100007
|
+
if (path2) {
|
|
100008
|
+
setContextMenu({ x: event.clientX, y: event.clientY, node: node2 });
|
|
100009
|
+
setContextMenuCopied(false);
|
|
100010
|
+
}
|
|
100011
|
+
}, [getNodeFilePath]);
|
|
100012
|
+
const handleCopyPath = useCallback(async () => {
|
|
100013
|
+
if (!contextMenu) return;
|
|
100014
|
+
const path2 = getNodeFilePath(contextMenu.node);
|
|
100015
|
+
if (path2) {
|
|
100016
|
+
try {
|
|
100017
|
+
await navigator.clipboard.writeText(path2);
|
|
100018
|
+
setContextMenuCopied(true);
|
|
100019
|
+
setTimeout(() => {
|
|
100020
|
+
setContextMenu(null);
|
|
100021
|
+
setContextMenuCopied(false);
|
|
100022
|
+
}, 800);
|
|
100023
|
+
} catch {
|
|
100024
|
+
console.error("Failed to copy path to clipboard");
|
|
100025
|
+
setContextMenu(null);
|
|
100026
|
+
}
|
|
100027
|
+
}
|
|
100028
|
+
}, [contextMenu, getNodeFilePath]);
|
|
100029
|
+
useEffect(() => {
|
|
100030
|
+
if (!contextMenu) return;
|
|
100031
|
+
const handleClickOutside = (e) => {
|
|
100032
|
+
if (contextMenuRef.current && !contextMenuRef.current.contains(e.target)) {
|
|
100033
|
+
setContextMenu(null);
|
|
100034
|
+
}
|
|
100035
|
+
};
|
|
100036
|
+
const handleKeyDown = (e) => {
|
|
100037
|
+
if (e.key === "Escape") setContextMenu(null);
|
|
100038
|
+
};
|
|
100039
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
100040
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
100041
|
+
return () => {
|
|
100042
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
100043
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
100044
|
+
};
|
|
100045
|
+
}, [contextMenu]);
|
|
99964
100046
|
useEffect(() => {
|
|
99965
100047
|
handleTreeNodeClickRef.current = handleTreeNodeClick;
|
|
99966
100048
|
}, [handleTreeNodeClick]);
|
|
@@ -100459,6 +100541,7 @@ const StoryboardListPanel = ({
|
|
|
100459
100541
|
storyboards: filteredStoryboards,
|
|
100460
100542
|
theme: theme2,
|
|
100461
100543
|
onClick: handleTreeNodeClick,
|
|
100544
|
+
onContextMenu: handleContextMenu,
|
|
100462
100545
|
selectedNodeId: selectedNodeId ?? void 0,
|
|
100463
100546
|
defaultOpen: filteredStoryboards.length <= 2,
|
|
100464
100547
|
openState,
|
|
@@ -100476,6 +100559,7 @@ const StoryboardListPanel = ({
|
|
|
100476
100559
|
canvases: filteredCanvases,
|
|
100477
100560
|
theme: theme2,
|
|
100478
100561
|
onClick: handleTreeNodeClick,
|
|
100562
|
+
onContextMenu: handleContextMenu,
|
|
100479
100563
|
selectedNodeId: selectedNodeId ?? void 0,
|
|
100480
100564
|
defaultOpen: filteredCanvases.length <= 2,
|
|
100481
100565
|
openState,
|
|
@@ -100631,7 +100715,66 @@ const StoryboardListPanel = ({
|
|
|
100631
100715
|
@keyframes spin {
|
|
100632
100716
|
to { transform: rotate(360deg); }
|
|
100633
100717
|
}
|
|
100634
|
-
` })
|
|
100718
|
+
` }),
|
|
100719
|
+
contextMenu && createPortal(
|
|
100720
|
+
/* @__PURE__ */ jsxs(
|
|
100721
|
+
"div",
|
|
100722
|
+
{
|
|
100723
|
+
ref: contextMenuRef,
|
|
100724
|
+
style: {
|
|
100725
|
+
position: "fixed",
|
|
100726
|
+
top: contextMenu.y,
|
|
100727
|
+
left: contextMenu.x,
|
|
100728
|
+
backgroundColor: theme2.colors.background,
|
|
100729
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
100730
|
+
borderRadius: "6px",
|
|
100731
|
+
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
|
|
100732
|
+
zIndex: 1e3,
|
|
100733
|
+
minWidth: "180px",
|
|
100734
|
+
padding: "4px 0",
|
|
100735
|
+
fontFamily: theme2.fonts.body
|
|
100736
|
+
},
|
|
100737
|
+
children: [
|
|
100738
|
+
/* @__PURE__ */ jsx("style", { children: `
|
|
100739
|
+
.storyboard-context-menu-item {
|
|
100740
|
+
transition: background-color 0.15s ease;
|
|
100741
|
+
}
|
|
100742
|
+
.storyboard-context-menu-item:hover {
|
|
100743
|
+
background-color: ${theme2.colors.backgroundTertiary} !important;
|
|
100744
|
+
}
|
|
100745
|
+
` }),
|
|
100746
|
+
/* @__PURE__ */ jsx(
|
|
100747
|
+
"button",
|
|
100748
|
+
{
|
|
100749
|
+
onClick: handleCopyPath,
|
|
100750
|
+
className: "storyboard-context-menu-item",
|
|
100751
|
+
style: {
|
|
100752
|
+
display: "flex",
|
|
100753
|
+
alignItems: "center",
|
|
100754
|
+
gap: "8px",
|
|
100755
|
+
width: "100%",
|
|
100756
|
+
padding: "8px 12px",
|
|
100757
|
+
border: "none",
|
|
100758
|
+
background: "none",
|
|
100759
|
+
cursor: "pointer",
|
|
100760
|
+
fontSize: theme2.fontSizes[1],
|
|
100761
|
+
color: theme2.colors.text,
|
|
100762
|
+
textAlign: "left"
|
|
100763
|
+
},
|
|
100764
|
+
children: contextMenuCopied ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
100765
|
+
/* @__PURE__ */ jsx(Check, { size: 14, style: { color: theme2.colors.success || "#22c55e" } }),
|
|
100766
|
+
/* @__PURE__ */ jsx("span", { children: "Copied!" })
|
|
100767
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
100768
|
+
/* @__PURE__ */ jsx(Copy, { size: 14 }),
|
|
100769
|
+
/* @__PURE__ */ jsx("span", { children: "Copy Path" })
|
|
100770
|
+
] })
|
|
100771
|
+
}
|
|
100772
|
+
)
|
|
100773
|
+
]
|
|
100774
|
+
}
|
|
100775
|
+
),
|
|
100776
|
+
document.body
|
|
100777
|
+
)
|
|
100635
100778
|
]
|
|
100636
100779
|
}
|
|
100637
100780
|
);
|