@industry-theme/principal-view-panels 0.10.3 → 0.10.5
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":"panelContext.d.ts","sourceRoot":"","sources":["../../src/mocks/panelContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EAIlB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"panelContext.d.ts","sourceRoot":"","sources":["../../src/mocks/panelContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EAIlB,MAAM,UAAU,CAAC;AAkDlB;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,OAAO,CAAC,iBAAiB,CAAC,KACrC,iBAiHF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,OAAO,CAAC,YAAY,CAAC,GAAG;IAClC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,KAEA,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CA+BlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAO,iBAwCnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC;IACvC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,KAAK,CAAC,SAAS,CAAC;IAC1D,gBAAgB,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG;QACzC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;QAC7C,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;KAC9D,CAAC;IACF,cAAc,CAAC,EAAE,iBAAiB,CAAC;CACpC,CAMA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasEditorPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CanvasEditorPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAS/E,OAAO,KAAK,EAAY,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAmB/E;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE;;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;CAClC;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"CanvasEditorPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CanvasEditorPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAS/E,OAAO,KAAK,EAAY,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAmB/E;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE;;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;CAClC;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAu0B9D,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -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,6 +91706,36 @@ 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;
|
|
91712
|
+
useEffect(() => {
|
|
91713
|
+
if (!context || !canvasPath || !(fileTreeData == null ? void 0 : fileTreeData.allFiles)) return;
|
|
91714
|
+
if (skipNextFileChangeRef.current) {
|
|
91715
|
+
return;
|
|
91716
|
+
}
|
|
91717
|
+
const canvasFile = fileTreeData.allFiles.find(
|
|
91718
|
+
(f) => f.path === canvasPath || f.relativePath === canvasPath
|
|
91719
|
+
);
|
|
91720
|
+
if (canvasFile == null ? void 0 : canvasFile.lastModified) {
|
|
91721
|
+
const currentTimestamp = canvasFile.lastModified.getTime();
|
|
91722
|
+
console.log("[CanvasEditorPanel] FileTree updated, checking timestamp:", {
|
|
91723
|
+
stored: canvasFileTimestampRef.current,
|
|
91724
|
+
current: currentTimestamp,
|
|
91725
|
+
sha: fileTreeSha,
|
|
91726
|
+
changed: canvasFileTimestampRef.current !== currentTimestamp
|
|
91727
|
+
});
|
|
91728
|
+
if (canvasFileTimestampRef.current && currentTimestamp !== canvasFileTimestampRef.current) {
|
|
91729
|
+
console.log("[CanvasEditorPanel] FileTree update detected file modification, reloading...", {
|
|
91730
|
+
path: canvasPath,
|
|
91731
|
+
lastLoaded: new Date(canvasFileTimestampRef.current),
|
|
91732
|
+
current: new Date(currentTimestamp)
|
|
91733
|
+
});
|
|
91734
|
+
loadConfiguration();
|
|
91735
|
+
canvasFileTimestampRef.current = currentTimestamp;
|
|
91736
|
+
}
|
|
91737
|
+
}
|
|
91738
|
+
}, [context, canvasPath, loadConfiguration, fileTreeData, fileTreeSha]);
|
|
91709
91739
|
useEffect(() => {
|
|
91710
91740
|
const unsubscribe = eventsRef.current.on("data:refresh", () => {
|
|
91711
91741
|
loadConfiguration();
|