@industry-theme/principal-view-panels 0.10.4 → 0.10.6
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/dist/panels.bundle.js +18 -18
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
package/dist/panels.bundle.js
CHANGED
|
@@ -91441,7 +91441,7 @@ const CanvasEditorPanel = ({
|
|
|
91441
91441
|
canvasName,
|
|
91442
91442
|
canvasFileInfo
|
|
91443
91443
|
}) => {
|
|
91444
|
-
var _a, _b
|
|
91444
|
+
var _a, _b;
|
|
91445
91445
|
const { theme: theme2 } = useTheme();
|
|
91446
91446
|
const graphRef = useRef(null);
|
|
91447
91447
|
const [dimensions, setDimensions] = useState({ width: 800, height: 600 });
|
|
@@ -91518,10 +91518,10 @@ const CanvasEditorPanel = ({
|
|
|
91518
91518
|
const canvas = ConfigLoader.parseCanvas(configContent);
|
|
91519
91519
|
let library = null;
|
|
91520
91520
|
if (ctx.hasSlice("fileTree") && !ctx.isSliceLoading("fileTree")) {
|
|
91521
|
-
const
|
|
91522
|
-
const
|
|
91523
|
-
if (
|
|
91524
|
-
const libraryPath = ConfigLoader.findLibraryPath(
|
|
91521
|
+
const fileTreeSlice2 = ctx.getSlice("fileTree");
|
|
91522
|
+
const fileTreeData2 = fileTreeSlice2 == null ? void 0 : fileTreeSlice2.data;
|
|
91523
|
+
if (fileTreeData2 == null ? void 0 : fileTreeData2.allFiles) {
|
|
91524
|
+
const libraryPath = ConfigLoader.findLibraryPath(fileTreeData2.allFiles);
|
|
91525
91525
|
if (libraryPath) {
|
|
91526
91526
|
try {
|
|
91527
91527
|
const libraryFullPath = `${repositoryPath}/${libraryPath}`;
|
|
@@ -91670,14 +91670,14 @@ const CanvasEditorPanel = ({
|
|
|
91670
91670
|
console.log("[CanvasEditorPanel] No fileTree slice available");
|
|
91671
91671
|
return;
|
|
91672
91672
|
}
|
|
91673
|
-
const
|
|
91674
|
-
const
|
|
91675
|
-
if (!(
|
|
91673
|
+
const fileTreeSlice2 = ctx.getSlice("fileTree");
|
|
91674
|
+
const fileTreeData2 = fileTreeSlice2 == null ? void 0 : fileTreeSlice2.data;
|
|
91675
|
+
if (!(fileTreeData2 == null ? void 0 : fileTreeData2.allFiles)) {
|
|
91676
91676
|
console.log("[CanvasEditorPanel] No allFiles in fileTreeData");
|
|
91677
91677
|
return;
|
|
91678
91678
|
}
|
|
91679
|
-
console.log("[CanvasEditorPanel] FileTree has",
|
|
91680
|
-
const canvasFile =
|
|
91679
|
+
console.log("[CanvasEditorPanel] FileTree has", fileTreeData2.allFiles.length, "files, SHA:", fileTreeData2.sha);
|
|
91680
|
+
const canvasFile = fileTreeData2.allFiles.find(
|
|
91681
91681
|
(f) => f.path === canvasPath || f.relativePath === canvasPath
|
|
91682
91682
|
);
|
|
91683
91683
|
console.log("[CanvasEditorPanel] Looking for canvas file:", canvasPath, "Found:", !!canvasFile);
|
|
@@ -91706,11 +91706,11 @@ const CanvasEditorPanel = ({
|
|
|
91706
91706
|
events.off("workspace:changed", handleWorkspaceChange);
|
|
91707
91707
|
};
|
|
91708
91708
|
}, [events, canvasPath, loadConfiguration]);
|
|
91709
|
+
const fileTreeSlice = context == null ? void 0 : context.getSlice("fileTree");
|
|
91710
|
+
const fileTreeData = fileTreeSlice == null ? void 0 : fileTreeSlice.data;
|
|
91711
|
+
const fileTreeSha = fileTreeData == null ? void 0 : fileTreeData.sha;
|
|
91709
91712
|
useEffect(() => {
|
|
91710
|
-
if (!
|
|
91711
|
-
const fileTreeSlice = context.getSlice("fileTree");
|
|
91712
|
-
const fileTreeData = fileTreeSlice == null ? void 0 : fileTreeSlice.data;
|
|
91713
|
-
if (!(fileTreeData == null ? void 0 : fileTreeData.allFiles)) return;
|
|
91713
|
+
if (!canvasPath || !(fileTreeData == null ? void 0 : fileTreeData.allFiles)) return;
|
|
91714
91714
|
if (skipNextFileChangeRef.current) {
|
|
91715
91715
|
return;
|
|
91716
91716
|
}
|
|
@@ -91719,10 +91719,10 @@ const CanvasEditorPanel = ({
|
|
|
91719
91719
|
);
|
|
91720
91720
|
if (canvasFile == null ? void 0 : canvasFile.lastModified) {
|
|
91721
91721
|
const currentTimestamp = canvasFile.lastModified.getTime();
|
|
91722
|
-
console.log("[CanvasEditorPanel] FileTree
|
|
91722
|
+
console.log("[CanvasEditorPanel] FileTree SHA changed, checking timestamp:", {
|
|
91723
91723
|
stored: canvasFileTimestampRef.current,
|
|
91724
91724
|
current: currentTimestamp,
|
|
91725
|
-
sha:
|
|
91725
|
+
sha: fileTreeSha,
|
|
91726
91726
|
changed: canvasFileTimestampRef.current !== currentTimestamp
|
|
91727
91727
|
});
|
|
91728
91728
|
if (canvasFileTimestampRef.current && currentTimestamp !== canvasFileTimestampRef.current) {
|
|
@@ -91735,7 +91735,7 @@ const CanvasEditorPanel = ({
|
|
|
91735
91735
|
canvasFileTimestampRef.current = currentTimestamp;
|
|
91736
91736
|
}
|
|
91737
91737
|
}
|
|
91738
|
-
}, [
|
|
91738
|
+
}, [canvasPath, loadConfiguration, fileTreeSha]);
|
|
91739
91739
|
useEffect(() => {
|
|
91740
91740
|
const unsubscribe = eventsRef.current.on("data:refresh", () => {
|
|
91741
91741
|
loadConfiguration();
|
|
@@ -92049,7 +92049,7 @@ const CanvasEditorPanel = ({
|
|
|
92049
92049
|
color: theme2.colors.textMuted,
|
|
92050
92050
|
flexShrink: 0
|
|
92051
92051
|
}, children: "Edges:" }),
|
|
92052
|
-
((
|
|
92052
|
+
((_b = (_a = state.canvas) == null ? void 0 : _a.pv) == null ? void 0 : _b.edgeTypes) && Object.keys(state.canvas.pv.edgeTypes).length > 0 ? /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: theme2.space[4], flexWrap: "wrap" }, children: Object.entries(state.canvas.pv.edgeTypes).map(([typeName, edgeType]) => /* @__PURE__ */ jsxs(
|
|
92053
92053
|
"div",
|
|
92054
92054
|
{
|
|
92055
92055
|
style: {
|