@industry-theme/file-city-panel 0.5.67 → 0.5.68

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":"FileCityTrailExplorerPanel.d.ts","sourceRoot":"","sources":["../../../src/panels/FileCityTrailExplorerPanel/FileCityTrailExplorerPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,8BAA8B,CAAC;AAiBtC,OAAO,KAAK,EAEV,oCAAoC,EAErC,MAAM,wCAAwC,CAAC;AA2BhD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAC/C,oCAAoC,CA+ErC,CAAC"}
1
+ {"version":3,"file":"FileCityTrailExplorerPanel.d.ts","sourceRoot":"","sources":["../../../src/panels/FileCityTrailExplorerPanel/FileCityTrailExplorerPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,8BAA8B,CAAC;AAiBtC,OAAO,KAAK,EAEV,oCAAoC,EAErC,MAAM,wCAAwC,CAAC;AA8EhD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAC/C,oCAAoC,CAwFrC,CAAC"}
@@ -258686,6 +258686,43 @@ const pierreOptionsBase = {
258686
258686
  const pierreStyle = {
258687
258687
  display: "block"
258688
258688
  };
258689
+ function useRenderTracer(name2, watch) {
258690
+ const renderCount = React.useRef(0);
258691
+ renderCount.current += 1;
258692
+ const prevWatch = React.useRef(
258693
+ void 0
258694
+ );
258695
+ const changed = [];
258696
+ if (watch && prevWatch.current) {
258697
+ for (const k of Object.keys(watch)) {
258698
+ if (watch[k] !== prevWatch.current[k]) changed.push(k);
258699
+ }
258700
+ }
258701
+ prevWatch.current = watch;
258702
+ console.log(
258703
+ `[trail-trace] render ${name2} #${renderCount.current}` + (changed.length ? ` changed=[${changed.join(",")}]` : "")
258704
+ );
258705
+ React.useEffect(() => {
258706
+ console.log(`[trail-trace] mount ${name2}`);
258707
+ return () => {
258708
+ console.log(`[trail-trace] unmount ${name2}`);
258709
+ };
258710
+ }, [name2]);
258711
+ }
258712
+ let __fc3dInstanceCounter = 0;
258713
+ function FileCity3DLifecycleTracer({ tag }) {
258714
+ const id2 = React.useRef(null);
258715
+ if (id2.current === null) {
258716
+ id2.current = ++__fc3dInstanceCounter;
258717
+ }
258718
+ React.useEffect(() => {
258719
+ console.log(`[trail-trace] FC3D mount id=${id2.current} site=${tag}`);
258720
+ return () => {
258721
+ console.log(`[trail-trace] FC3D unmount id=${id2.current} site=${tag}`);
258722
+ };
258723
+ }, [tag]);
258724
+ return null;
258725
+ }
258689
258726
  const SEQUENCE_DRAWER_HEIGHT_PCT = 45;
258690
258727
  const SNIPPET_PANE_WIDTH_PX = 460;
258691
258728
  const PANEL_TRANSITION_MS = 280;
@@ -258696,6 +258733,14 @@ const FileCityTrailExplorerPanel = ({ context, actions }) => {
258696
258733
  const lineCounts = ((_a = context.lineCounts.data) == null ? void 0 : _a.lineCounts) ?? null;
258697
258734
  const trail2 = context.trail.data;
258698
258735
  const repository = context.repository;
258736
+ useRenderTracer("FileCityTrailExplorerPanel", {
258737
+ context,
258738
+ actions,
258739
+ tree,
258740
+ lineCounts,
258741
+ trail: trail2,
258742
+ repository
258743
+ });
258699
258744
  const cityData = React.useMemo(
258700
258745
  () => tree ? buildCityDataFromContext({ fileTree: tree, lineCounts }) : null,
258701
258746
  [tree, lineCounts]
@@ -258762,6 +258807,15 @@ const FileCityTrailSequenceLayout = ({
258762
258807
  }) => {
258763
258808
  var _a, _b;
258764
258809
  const { theme: theme2 } = useTheme();
258810
+ useRenderTracer("FileCityTrailSequenceLayout", {
258811
+ trail: trail2,
258812
+ view,
258813
+ markersForThisRepo,
258814
+ selectedMarkerId,
258815
+ cityData,
258816
+ hasLineCounts,
258817
+ readFile
258818
+ });
258765
258819
  const [show3D, setShow3D] = React.useState(
258766
258820
  false
258767
258821
  );
@@ -259126,23 +259180,26 @@ const FileCityTrailSequenceLayout = ({
259126
259180
  overflow: "hidden"
259127
259181
  },
259128
259182
  children: [
259129
- cityData ? /* @__PURE__ */ jsx(
259130
- FileCity3D,
259131
- {
259132
- cityData,
259133
- width: "100%",
259134
- height: "100%",
259135
- selectedPath: (selectedMarker == null ? void 0 : selectedMarker.sourcePath) ?? null,
259136
- onBuildingClick: handleBuildingClick,
259137
- onCameraFrame,
259138
- showControls: false,
259139
- backgroundColor: theme2.colors.background,
259140
- textColor: theme2.colors.textMuted,
259141
- isGrown: effectiveShow3D,
259142
- highlightLayers: cityHighlightLayers,
259143
- defaultBuildingColor: trailFilesActive ? theme2.colors.textTertiary : void 0
259144
- }
259145
- ) : /* @__PURE__ */ jsx(CityLoadingPlaceholder, {}),
259183
+ cityData ? /* @__PURE__ */ jsxs(Fragment, { children: [
259184
+ /* @__PURE__ */ jsx(FileCity3DLifecycleTracer, { tag: "sequence-layout" }),
259185
+ /* @__PURE__ */ jsx(
259186
+ FileCity3D,
259187
+ {
259188
+ cityData,
259189
+ width: "100%",
259190
+ height: "100%",
259191
+ selectedPath: (selectedMarker == null ? void 0 : selectedMarker.sourcePath) ?? null,
259192
+ onBuildingClick: handleBuildingClick,
259193
+ onCameraFrame,
259194
+ showControls: false,
259195
+ backgroundColor: theme2.colors.background,
259196
+ textColor: theme2.colors.textMuted,
259197
+ isGrown: effectiveShow3D,
259198
+ highlightLayers: cityHighlightLayers,
259199
+ defaultBuildingColor: trailFilesActive ? theme2.colors.textTertiary : void 0
259200
+ }
259201
+ )
259202
+ ] }) : /* @__PURE__ */ jsx(CityLoadingPlaceholder, {}),
259146
259203
  /* @__PURE__ */ jsx(
259147
259204
  TrailFilePath,
259148
259205
  {
@@ -259306,7 +259363,10 @@ const SequenceDrawer = ({
259306
259363
  pointerEvents: visible ? "auto" : "none",
259307
259364
  backgroundColor: withAlpha(theme2.colors.background, 92),
259308
259365
  borderTop: `1px solid ${theme2.colors.border}`,
259309
- zIndex: 10,
259366
+ // Above the leader-line (z 25) and trail-path (z 26) overlays so
259367
+ // the drawer clips them, but below the snippet side pane (z 1900)
259368
+ // and its edge-dot (z 1901) so those stay anchored on top.
259369
+ zIndex: 30,
259310
259370
  overflow: "hidden",
259311
259371
  transition: isResizing ? `opacity ${PANEL_TRANSITION_MS}ms ease` : `height ${PANEL_TRANSITION_MS}ms ease, opacity ${PANEL_TRANSITION_MS}ms ease`
259312
259372
  },
@@ -260099,17 +260159,20 @@ const FileCityTrailExplorerEmptyState = ({
260099
260159
  color: theme2.colors.text
260100
260160
  },
260101
260161
  children: [
260102
- cityData ? /* @__PURE__ */ jsx(
260103
- FileCity3D,
260104
- {
260105
- cityData,
260106
- width: "100%",
260107
- height: "100%",
260108
- showControls: false,
260109
- backgroundColor: theme2.colors.background,
260110
- textColor: theme2.colors.textMuted
260111
- }
260112
- ) : null,
260162
+ cityData ? /* @__PURE__ */ jsxs(Fragment, { children: [
260163
+ /* @__PURE__ */ jsx(FileCity3DLifecycleTracer, { tag: "empty-state" }),
260164
+ /* @__PURE__ */ jsx(
260165
+ FileCity3D,
260166
+ {
260167
+ cityData,
260168
+ width: "100%",
260169
+ height: "100%",
260170
+ showControls: false,
260171
+ backgroundColor: theme2.colors.background,
260172
+ textColor: theme2.colors.textMuted
260173
+ }
260174
+ )
260175
+ ] }) : null,
260113
260176
  /* @__PURE__ */ jsx(
260114
260177
  "div",
260115
260178
  {