@industry-theme/principal-view-panels 0.10.7 → 0.10.9

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,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,CAk1B9D,CAAC"}
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,CAiyB9D,CAAC"}
@@ -91659,46 +91659,24 @@ const CanvasEditorPanel = ({
91659
91659
  useEffect(() => {
91660
91660
  if (!events || !canvasPath) return;
91661
91661
  const handleWorkspaceChange = () => {
91662
- console.log("[CanvasEditorPanel] workspace:changed event received", { canvasPath });
91663
91662
  if (skipNextFileChangeRef.current) {
91664
- console.log("[CanvasEditorPanel] Skipping - we caused this change");
91665
91663
  skipNextFileChangeRef.current = false;
91666
91664
  return;
91667
91665
  }
91668
91666
  const ctx = contextRef.current;
91669
- if (!ctx.hasSlice("fileTree")) {
91670
- console.log("[CanvasEditorPanel] No fileTree slice available");
91671
- return;
91672
- }
91667
+ if (!ctx.hasSlice("fileTree")) return;
91673
91668
  const fileTreeSlice = ctx.getSlice("fileTree");
91674
91669
  const fileTreeData = fileTreeSlice == null ? void 0 : fileTreeSlice.data;
91675
- if (!(fileTreeData == null ? void 0 : fileTreeData.allFiles)) {
91676
- console.log("[CanvasEditorPanel] No allFiles in fileTreeData");
91677
- return;
91678
- }
91679
- console.log("[CanvasEditorPanel] FileTree has", fileTreeData.allFiles.length, "files, SHA:", fileTreeData.sha);
91670
+ if (!(fileTreeData == null ? void 0 : fileTreeData.allFiles)) return;
91680
91671
  const canvasFile = fileTreeData.allFiles.find(
91681
91672
  (f) => f.path === canvasPath || f.relativePath === canvasPath
91682
91673
  );
91683
- console.log("[CanvasEditorPanel] Looking for canvas file:", canvasPath, "Found:", !!canvasFile);
91684
91674
  if (canvasFile == null ? void 0 : canvasFile.lastModified) {
91685
91675
  const currentTimestamp = canvasFile.lastModified.getTime();
91686
- console.log("[CanvasEditorPanel] Timestamp comparison:", {
91687
- stored: canvasFileTimestampRef.current,
91688
- current: currentTimestamp,
91689
- changed: canvasFileTimestampRef.current !== currentTimestamp
91690
- });
91691
91676
  if (canvasFileTimestampRef.current && currentTimestamp !== canvasFileTimestampRef.current) {
91692
- console.log("[CanvasEditorPanel] Canvas file modified, reloading...", {
91693
- path: canvasPath,
91694
- lastLoaded: new Date(canvasFileTimestampRef.current),
91695
- current: new Date(currentTimestamp)
91696
- });
91697
91677
  loadConfiguration();
91698
91678
  canvasFileTimestampRef.current = currentTimestamp;
91699
91679
  }
91700
- } else {
91701
- console.log("[CanvasEditorPanel] Canvas file has no lastModified timestamp");
91702
91680
  }
91703
91681
  };
91704
91682
  events.on("workspace:changed", handleWorkspaceChange);
@@ -91706,18 +91684,11 @@ const CanvasEditorPanel = ({
91706
91684
  events.off("workspace:changed", handleWorkspaceChange);
91707
91685
  };
91708
91686
  }, [events, canvasPath, loadConfiguration]);
91709
- const fileTreeSliceRef = useRef(context == null ? void 0 : context.getSlice("fileTree"));
91710
- fileTreeSliceRef.current = context == null ? void 0 : context.getSlice("fileTree");
91711
91687
  useEffect(() => {
91712
- console.log("[CanvasEditorPanel] 🎯 useEffect TRIGGERED", {
91713
- hasContext: !!context,
91714
- canvasPath
91715
- });
91716
91688
  if (!context || !canvasPath) return;
91717
91689
  const slice = context.getSlice("fileTree");
91718
91690
  const data = slice == null ? void 0 : slice.data;
91719
91691
  if (!(data == null ? void 0 : data.allFiles)) return;
91720
- const sha = data.sha;
91721
91692
  if (skipNextFileChangeRef.current) {
91722
91693
  return;
91723
91694
  }
@@ -91726,18 +91697,7 @@ const CanvasEditorPanel = ({
91726
91697
  );
91727
91698
  if (canvasFile == null ? void 0 : canvasFile.lastModified) {
91728
91699
  const currentTimestamp = canvasFile.lastModified.getTime();
91729
- console.log("[CanvasEditorPanel] FileTree slice changed, checking timestamp:", {
91730
- stored: canvasFileTimestampRef.current,
91731
- current: currentTimestamp,
91732
- sha,
91733
- changed: canvasFileTimestampRef.current !== currentTimestamp
91734
- });
91735
91700
  if (canvasFileTimestampRef.current && currentTimestamp !== canvasFileTimestampRef.current) {
91736
- console.log("[CanvasEditorPanel] FileTree update detected file modification, reloading...", {
91737
- path: canvasPath,
91738
- lastLoaded: new Date(canvasFileTimestampRef.current),
91739
- current: new Date(currentTimestamp)
91740
- });
91741
91701
  loadConfiguration();
91742
91702
  canvasFileTimestampRef.current = currentTimestamp;
91743
91703
  }