@industry-theme/file-city-panel 0.5.66 → 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"}
@@ -1 +1 @@
1
- {"version":3,"file":"TrailMarkdownOverlay.d.ts","sourceRoot":"","sources":["../../../../src/panels/FileCityTrailExplorerPanel/overlays/TrailMarkdownOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAc;IAC7B,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,qEAAqE;IACrE,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,+DAA+D;IAC/D,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,kDAAkD;IAClD,UAAU,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,QAAQ,EAAE,OAAO,CAAC;IAClB,uEAAuE;IACvE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,yBAAyB;IACxC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,aAAa,EAAE,MAAM,CAAC;IACtB,4FAA4F;IAC5F,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B;;;;OAIG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACzC;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;;OAGG;IACH,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;CAC1B;AAQD,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAoPpE,CAAC"}
1
+ {"version":3,"file":"TrailMarkdownOverlay.d.ts","sourceRoot":"","sources":["../../../../src/panels/FileCityTrailExplorerPanel/overlays/TrailMarkdownOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;;;;;;;;;GAWG;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107,27 +258107,19 @@ const TrailMarkdownOverlay = ({
258107
258107
  flexDirection: "column"
258108
258108
  },
258109
258109
  children: [
258110
- /* @__PURE__ */ jsx(
258111
- "div",
258110
+ /* @__PURE__ */ jsx("div", { style: { flex: "0 0 auto" }, children: /* @__PURE__ */ jsx(
258111
+ IndustryMarkdownSlide,
258112
258112
  {
258113
- style: {
258114
- position: "relative",
258115
- flex: "0 0 100%"
258116
- },
258117
- children: /* @__PURE__ */ jsx("div", { style: { position: "absolute", inset: 0 }, children: /* @__PURE__ */ jsx(
258118
- IndustryMarkdownSlide,
258119
- {
258120
- content: body,
258121
- slideIdPrefix,
258122
- slideIndex: 0,
258123
- isVisible: true,
258124
- theme: theme2,
258125
- transparentBackground: true,
258126
- enableKeyboardScrolling: false
258127
- }
258128
- ) })
258129
- }
258130
- ),
258113
+ content: body,
258114
+ slideIdPrefix,
258115
+ slideIndex: 0,
258116
+ isVisible: true,
258117
+ theme: theme2,
258118
+ transparentBackground: true,
258119
+ enableKeyboardScrolling: false,
258120
+ disableScroll: true
258121
+ }
258122
+ ) }),
258131
258123
  nav ? /* @__PURE__ */ jsx(TrailMarkdownOverlayFooter, { nav }) : null,
258132
258124
  files && files.length > 0 ? /* @__PURE__ */ jsx(TrailFilesList, { files }) : null
258133
258125
  ]
@@ -258694,6 +258686,43 @@ const pierreOptionsBase = {
258694
258686
  const pierreStyle = {
258695
258687
  display: "block"
258696
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
+ }
258697
258726
  const SEQUENCE_DRAWER_HEIGHT_PCT = 45;
258698
258727
  const SNIPPET_PANE_WIDTH_PX = 460;
258699
258728
  const PANEL_TRANSITION_MS = 280;
@@ -258704,6 +258733,14 @@ const FileCityTrailExplorerPanel = ({ context, actions }) => {
258704
258733
  const lineCounts = ((_a = context.lineCounts.data) == null ? void 0 : _a.lineCounts) ?? null;
258705
258734
  const trail2 = context.trail.data;
258706
258735
  const repository = context.repository;
258736
+ useRenderTracer("FileCityTrailExplorerPanel", {
258737
+ context,
258738
+ actions,
258739
+ tree,
258740
+ lineCounts,
258741
+ trail: trail2,
258742
+ repository
258743
+ });
258707
258744
  const cityData = React.useMemo(
258708
258745
  () => tree ? buildCityDataFromContext({ fileTree: tree, lineCounts }) : null,
258709
258746
  [tree, lineCounts]
@@ -258770,6 +258807,15 @@ const FileCityTrailSequenceLayout = ({
258770
258807
  }) => {
258771
258808
  var _a, _b;
258772
258809
  const { theme: theme2 } = useTheme();
258810
+ useRenderTracer("FileCityTrailSequenceLayout", {
258811
+ trail: trail2,
258812
+ view,
258813
+ markersForThisRepo,
258814
+ selectedMarkerId,
258815
+ cityData,
258816
+ hasLineCounts,
258817
+ readFile
258818
+ });
258773
258819
  const [show3D, setShow3D] = React.useState(
258774
258820
  false
258775
258821
  );
@@ -258778,7 +258824,7 @@ const FileCityTrailSequenceLayout = ({
258778
258824
  }, [hasLineCounts]);
258779
258825
  const effectiveShow3D = false;
258780
258826
  const [viewMode, setViewMode] = React.useState("city");
258781
- const [showSequenceDrawer, setShowSequenceDrawer] = React.useState(false);
258827
+ const [showSequenceDrawer, setShowSequenceDrawer] = React.useState(true);
258782
258828
  const [drawerHeightOverridePct, setDrawerHeightOverridePct] = React.useState(null);
258783
258829
  const [isResizingDrawer, setIsResizingDrawer] = React.useState(false);
258784
258830
  const drawerHeightPct = !showSequenceDrawer ? 0 : drawerHeightOverridePct ?? SEQUENCE_DRAWER_HEIGHT_PCT;
@@ -259098,10 +259144,14 @@ const FileCityTrailSequenceLayout = ({
259098
259144
  setDrawerHeightOverridePct(null);
259099
259145
  setShowSequenceDrawer((v) => !v);
259100
259146
  },
259101
- canExit: selectedMarkerId != null || showSequenceDrawer || snippetExpanded || viewMode !== "city",
259147
+ canExit: (
259148
+ // Drawer-open is the default start state, so it no longer
259149
+ // counts as "non-idle". Exit is offered only when the user
259150
+ // has drilled into something the start view doesn't show.
259151
+ selectedMarkerId != null || snippetExpanded || viewMode !== "city"
259152
+ ),
259102
259153
  onExitTrail: () => {
259103
259154
  onSelectMarker(null);
259104
- setShowSequenceDrawer(false);
259105
259155
  setDrawerHeightOverridePct(null);
259106
259156
  setSnippetExpanded(false);
259107
259157
  setViewMode("city");
@@ -259130,23 +259180,26 @@ const FileCityTrailSequenceLayout = ({
259130
259180
  overflow: "hidden"
259131
259181
  },
259132
259182
  children: [
259133
- cityData ? /* @__PURE__ */ jsx(
259134
- FileCity3D,
259135
- {
259136
- cityData,
259137
- width: "100%",
259138
- height: "100%",
259139
- selectedPath: (selectedMarker == null ? void 0 : selectedMarker.sourcePath) ?? null,
259140
- onBuildingClick: handleBuildingClick,
259141
- onCameraFrame,
259142
- showControls: false,
259143
- backgroundColor: theme2.colors.background,
259144
- textColor: theme2.colors.textMuted,
259145
- isGrown: effectiveShow3D,
259146
- highlightLayers: cityHighlightLayers,
259147
- defaultBuildingColor: trailFilesActive ? theme2.colors.textTertiary : void 0
259148
- }
259149
- ) : /* @__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, {}),
259150
259203
  /* @__PURE__ */ jsx(
259151
259204
  TrailFilePath,
259152
259205
  {
@@ -259310,7 +259363,10 @@ const SequenceDrawer = ({
259310
259363
  pointerEvents: visible ? "auto" : "none",
259311
259364
  backgroundColor: withAlpha(theme2.colors.background, 92),
259312
259365
  borderTop: `1px solid ${theme2.colors.border}`,
259313
- 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,
259314
259370
  overflow: "hidden",
259315
259371
  transition: isResizing ? `opacity ${PANEL_TRANSITION_MS}ms ease` : `height ${PANEL_TRANSITION_MS}ms ease, opacity ${PANEL_TRANSITION_MS}ms ease`
259316
259372
  },
@@ -260014,40 +260070,38 @@ const TrailHeader = ({
260014
260070
  }
260015
260071
  ),
260016
260072
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
260017
- isDoc ? null : /* @__PURE__ */ jsx(
260018
- "button",
260019
- {
260020
- type: "button",
260021
- onClick: onToggleSequenceDrawer,
260022
- "aria-pressed": showSequenceDrawer,
260023
- title: showSequenceDrawer ? "Hide sequence diagram" : "Show sequence diagram",
260024
- style: toggleButtonStyle(showSequenceDrawer),
260025
- children: "Diagram"
260026
- }
260027
- ),
260028
- /* @__PURE__ */ jsx(
260073
+ canExit ? /* @__PURE__ */ jsx(
260029
260074
  "button",
260030
260075
  {
260031
260076
  type: "button",
260032
260077
  onClick: onExitTrail,
260033
- disabled: !canExit,
260034
- title: canExit ? "Return to the trail summary" : "Already at the trail summary",
260078
+ title: "Return to the trail summary",
260035
260079
  style: {
260036
260080
  flexShrink: 0,
260037
260081
  fontFamily: theme2.fonts.body,
260038
260082
  fontSize: theme2.fontSizes[0],
260039
260083
  fontWeight: theme2.fontWeights.medium,
260040
- color: canExit ? theme2.colors.text : theme2.colors.textTertiary,
260084
+ color: theme2.colors.text,
260041
260085
  background: "transparent",
260042
260086
  border: `1px solid ${theme2.colors.muted}`,
260043
260087
  borderRadius: theme2.radii[3],
260044
260088
  padding: "4px 10px",
260045
- cursor: canExit ? "pointer" : "not-allowed",
260046
- opacity: canExit ? 1 : 0.5,
260089
+ cursor: "pointer",
260047
260090
  lineHeight: 1.2
260048
260091
  },
260049
260092
  children: "Exit"
260050
260093
  }
260094
+ ) : null,
260095
+ isDoc ? null : /* @__PURE__ */ jsx(
260096
+ "button",
260097
+ {
260098
+ type: "button",
260099
+ onClick: onToggleSequenceDrawer,
260100
+ "aria-pressed": showSequenceDrawer,
260101
+ title: showSequenceDrawer ? "Hide sequence diagram" : "Show sequence diagram",
260102
+ style: toggleButtonStyle(showSequenceDrawer),
260103
+ children: "Diagram"
260104
+ }
260051
260105
  ),
260052
260106
  hideToggle || isDoc ? null : /* @__PURE__ */ jsx(
260053
260107
  "button",
@@ -260105,17 +260159,20 @@ const FileCityTrailExplorerEmptyState = ({
260105
260159
  color: theme2.colors.text
260106
260160
  },
260107
260161
  children: [
260108
- cityData ? /* @__PURE__ */ jsx(
260109
- FileCity3D,
260110
- {
260111
- cityData,
260112
- width: "100%",
260113
- height: "100%",
260114
- showControls: false,
260115
- backgroundColor: theme2.colors.background,
260116
- textColor: theme2.colors.textMuted
260117
- }
260118
- ) : 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,
260119
260176
  /* @__PURE__ */ jsx(
260120
260177
  "div",
260121
260178
  {