@industry-theme/file-city-panel 0.5.64 → 0.5.66

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;AA4BhD;;;;;;;;;;;;;;;;;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;AA2BhD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAC/C,oCAAoC,CA+ErC,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,CA4OpE,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;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"}
@@ -258096,31 +258096,43 @@ const TrailMarkdownOverlay = ({
258096
258096
  ]
258097
258097
  }
258098
258098
  ) : null,
258099
- /* @__PURE__ */ jsx(
258099
+ /* @__PURE__ */ jsxs(
258100
258100
  "div",
258101
258101
  {
258102
258102
  style: {
258103
258103
  flex: 1,
258104
258104
  minHeight: 0,
258105
- maxHeight: files && files.length > 0 ? "30%" : void 0,
258106
- position: "relative"
258105
+ overflowY: "auto",
258106
+ display: "flex",
258107
+ flexDirection: "column"
258107
258108
  },
258108
- children: /* @__PURE__ */ jsx("div", { style: { position: "absolute", inset: 0 }, children: /* @__PURE__ */ jsx(
258109
- IndustryMarkdownSlide,
258110
- {
258111
- content: body,
258112
- slideIdPrefix,
258113
- slideIndex: 0,
258114
- isVisible: true,
258115
- theme: theme2,
258116
- transparentBackground: true,
258117
- enableKeyboardScrolling: false
258118
- }
258119
- ) })
258109
+ children: [
258110
+ /* @__PURE__ */ jsx(
258111
+ "div",
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
+ ),
258131
+ nav ? /* @__PURE__ */ jsx(TrailMarkdownOverlayFooter, { nav }) : null,
258132
+ files && files.length > 0 ? /* @__PURE__ */ jsx(TrailFilesList, { files }) : null
258133
+ ]
258120
258134
  }
258121
258135
  ),
258122
- nav ? /* @__PURE__ */ jsx(TrailMarkdownOverlayFooter, { nav }) : null,
258123
- files && files.length > 0 ? /* @__PURE__ */ jsx(TrailFilesList, { files }) : null,
258124
258136
  /* @__PURE__ */ jsx(
258125
258137
  "div",
258126
258138
  {
@@ -258163,14 +258175,14 @@ const TrailFilesList = ({ files }) => {
258163
258175
  {
258164
258176
  style: {
258165
258177
  borderTop: `1px solid ${theme2.colors.border}`,
258166
- // Markdown body is capped at 50% above; files take the rest
258167
- // of the remaining column. Grows past 50% if the summary is
258168
- // shorter than its cap (the markdown body shrinks below 50%
258169
- // to accommodate, since `max-height` doesn't force it).
258170
- flex: 1,
258178
+ // Lives inside the markdown body's scroll container, below
258179
+ // the slide and Start/nav footer. Sized to its content with
258180
+ // a 20% floor (of the scroll container's visible height) so
258181
+ // it always feels like a substantial section once revealed.
258182
+ flex: "0 0 auto",
258183
+ minHeight: "20%",
258171
258184
  display: "flex",
258172
- flexDirection: "column",
258173
- minHeight: 0
258185
+ flexDirection: "column"
258174
258186
  },
258175
258187
  children: [
258176
258188
  /* @__PURE__ */ jsx(
@@ -258188,7 +258200,7 @@ const TrailFilesList = ({ files }) => {
258188
258200
  children: "Files in this trail"
258189
258201
  }
258190
258202
  ),
258191
- /* @__PURE__ */ jsx("div", { style: { overflowY: "auto", minHeight: 0, padding: "0 6px 8px" }, children: files.map((file) => {
258203
+ /* @__PURE__ */ jsx("div", { style: { padding: "0 6px 8px" }, children: files.map((file) => {
258192
258204
  const fileName = file.sourcePath.split("/").pop() ?? file.sourcePath;
258193
258205
  const dir = file.sourcePath.slice(
258194
258206
  0,
@@ -258684,7 +258696,6 @@ const pierreStyle = {
258684
258696
  };
258685
258697
  const SEQUENCE_DRAWER_HEIGHT_PCT = 45;
258686
258698
  const SNIPPET_PANE_WIDTH_PX = 460;
258687
- const HEADER_HEIGHT_PX = 48;
258688
258699
  const PANEL_TRANSITION_MS = 280;
258689
258700
  const THREE_D_TOGGLE_DISABLED = true;
258690
258701
  const FileCityTrailExplorerPanel = ({ context, actions }) => {
@@ -258766,6 +258777,7 @@ const FileCityTrailSequenceLayout = ({
258766
258777
  return;
258767
258778
  }, [hasLineCounts]);
258768
258779
  const effectiveShow3D = false;
258780
+ const [viewMode, setViewMode] = React.useState("city");
258769
258781
  const [showSequenceDrawer, setShowSequenceDrawer] = React.useState(false);
258770
258782
  const [drawerHeightOverridePct, setDrawerHeightOverridePct] = React.useState(null);
258771
258783
  const [isResizingDrawer, setIsResizingDrawer] = React.useState(false);
@@ -259086,16 +259098,28 @@ const FileCityTrailSequenceLayout = ({
259086
259098
  setDrawerHeightOverridePct(null);
259087
259099
  setShowSequenceDrawer((v) => !v);
259088
259100
  },
259089
- canExit: selectedMarkerId != null || showSequenceDrawer || snippetExpanded,
259101
+ canExit: selectedMarkerId != null || showSequenceDrawer || snippetExpanded || viewMode !== "city",
259090
259102
  onExitTrail: () => {
259091
259103
  onSelectMarker(null);
259092
259104
  setShowSequenceDrawer(false);
259093
259105
  setDrawerHeightOverridePct(null);
259094
259106
  setSnippetExpanded(false);
259095
- }
259107
+ setViewMode("city");
259108
+ },
259109
+ viewMode,
259110
+ onSetViewMode: setViewMode
259096
259111
  }
259097
259112
  ),
259098
- /* @__PURE__ */ jsxs(
259113
+ viewMode === "doc" ? /* @__PURE__ */ jsx(
259114
+ TrailDocumentView,
259115
+ {
259116
+ markers: markersForThisRepo,
259117
+ summary: trail2.summary,
259118
+ readFile,
259119
+ selectedMarkerId,
259120
+ onSelectMarker
259121
+ }
259122
+ ) : /* @__PURE__ */ jsxs(
259099
259123
  "div",
259100
259124
  {
259101
259125
  ref: containerRef,
@@ -259643,6 +259667,251 @@ const SidePaneFrame = React.forwardRef(
259643
259667
  );
259644
259668
  }
259645
259669
  );
259670
+ const TrailDocumentView = ({
259671
+ markers,
259672
+ summary,
259673
+ readFile,
259674
+ selectedMarkerId,
259675
+ onSelectMarker
259676
+ }) => {
259677
+ const { theme: theme2 } = useTheme();
259678
+ return /* @__PURE__ */ jsx(
259679
+ "div",
259680
+ {
259681
+ style: {
259682
+ flex: 1,
259683
+ minHeight: 0,
259684
+ overflowY: "auto",
259685
+ overflowX: "hidden",
259686
+ padding: "24px 32px 64px",
259687
+ background: theme2.colors.background
259688
+ },
259689
+ children: /* @__PURE__ */ jsxs("div", { style: { maxWidth: 880, margin: "0 auto" }, children: [
259690
+ summary ? /* @__PURE__ */ jsx(
259691
+ "div",
259692
+ {
259693
+ style: {
259694
+ fontFamily: theme2.fonts.body,
259695
+ fontSize: theme2.fontSizes[1],
259696
+ lineHeight: 1.6,
259697
+ color: theme2.colors.text,
259698
+ whiteSpace: "pre-wrap",
259699
+ marginBottom: 32,
259700
+ paddingBottom: 24,
259701
+ borderBottom: `1px solid ${theme2.colors.border}`
259702
+ },
259703
+ children: summary
259704
+ }
259705
+ ) : null,
259706
+ markers.length === 0 ? /* @__PURE__ */ jsx(
259707
+ "div",
259708
+ {
259709
+ style: {
259710
+ fontFamily: theme2.fonts.body,
259711
+ fontSize: theme2.fontSizes[1],
259712
+ color: theme2.colors.textSecondary
259713
+ },
259714
+ children: "No markers in this repo."
259715
+ }
259716
+ ) : markers.map((marker, idx) => /* @__PURE__ */ jsx(
259717
+ TrailDocumentCard,
259718
+ {
259719
+ index: idx,
259720
+ total: markers.length,
259721
+ marker,
259722
+ readFile,
259723
+ isActive: marker.id === selectedMarkerId,
259724
+ onActivate: () => onSelectMarker(
259725
+ marker.id === selectedMarkerId ? null : marker.id
259726
+ )
259727
+ },
259728
+ marker.id
259729
+ ))
259730
+ ] })
259731
+ }
259732
+ );
259733
+ };
259734
+ const TrailDocumentCard = ({
259735
+ index: index2,
259736
+ total,
259737
+ marker,
259738
+ readFile,
259739
+ isActive,
259740
+ onActivate
259741
+ }) => {
259742
+ const { theme: theme2 } = useTheme();
259743
+ const fileName = marker.sourcePath ? marker.sourcePath.split("/").pop() ?? marker.sourcePath : null;
259744
+ const headingLabel = marker.label ?? `Marker ${index2 + 1}`;
259745
+ const snippet2 = marker.snippet;
259746
+ const [snippetExpanded, setSnippetExpanded] = React.useState(false);
259747
+ return /* @__PURE__ */ jsxs(
259748
+ "div",
259749
+ {
259750
+ style: {
259751
+ marginBottom: 32,
259752
+ border: `1px solid ${isActive ? theme2.colors.accent : theme2.colors.border}`,
259753
+ borderRadius: theme2.radii[3],
259754
+ background: theme2.colors.background,
259755
+ boxShadow: isActive ? `0 0 0 2px ${withAlpha(theme2.colors.accent, 0.18)}` : "none",
259756
+ overflow: "hidden"
259757
+ },
259758
+ children: [
259759
+ /* @__PURE__ */ jsxs(
259760
+ "button",
259761
+ {
259762
+ type: "button",
259763
+ onClick: onActivate,
259764
+ title: isActive ? "Clear selection" : "Select this marker on the city view",
259765
+ style: {
259766
+ display: "flex",
259767
+ flexDirection: "column",
259768
+ alignItems: "flex-start",
259769
+ gap: 4,
259770
+ width: "100%",
259771
+ textAlign: "left",
259772
+ padding: "16px 20px",
259773
+ background: "transparent",
259774
+ border: "none",
259775
+ borderBottom: `1px solid ${theme2.colors.border}`,
259776
+ cursor: "pointer",
259777
+ color: theme2.colors.text
259778
+ },
259779
+ children: [
259780
+ /* @__PURE__ */ jsxs(
259781
+ "div",
259782
+ {
259783
+ style: {
259784
+ fontFamily: theme2.fonts.body,
259785
+ fontSize: theme2.fontSizes[0],
259786
+ color: theme2.colors.textSecondary,
259787
+ letterSpacing: "0.04em",
259788
+ textTransform: "uppercase"
259789
+ },
259790
+ children: [
259791
+ index2 + 1,
259792
+ " / ",
259793
+ total
259794
+ ]
259795
+ }
259796
+ ),
259797
+ /* @__PURE__ */ jsx(
259798
+ "div",
259799
+ {
259800
+ style: {
259801
+ fontFamily: theme2.fonts.heading,
259802
+ fontSize: theme2.fontSizes[2],
259803
+ fontWeight: theme2.fontWeights.semibold,
259804
+ color: theme2.colors.text
259805
+ },
259806
+ children: headingLabel
259807
+ }
259808
+ ),
259809
+ marker.sourcePath ? /* @__PURE__ */ jsx(
259810
+ "div",
259811
+ {
259812
+ style: {
259813
+ fontFamily: theme2.fonts.monospace,
259814
+ fontSize: theme2.fontSizes[0],
259815
+ color: theme2.colors.textSecondary
259816
+ },
259817
+ children: marker.sourcePath
259818
+ }
259819
+ ) : null
259820
+ ]
259821
+ }
259822
+ ),
259823
+ marker.description ? /* @__PURE__ */ jsx(
259824
+ "div",
259825
+ {
259826
+ style: {
259827
+ fontFamily: theme2.fonts.body,
259828
+ fontSize: theme2.fontSizes[1],
259829
+ lineHeight: 1.6,
259830
+ color: theme2.colors.text,
259831
+ whiteSpace: "pre-wrap",
259832
+ padding: "16px 20px",
259833
+ borderBottom: snippet2 ? `1px solid ${theme2.colors.border}` : "none"
259834
+ },
259835
+ children: marker.description
259836
+ }
259837
+ ) : null,
259838
+ snippet2 && marker.sourcePath ? /* @__PURE__ */ jsxs("div", { style: { background: theme2.colors.background }, children: [
259839
+ /* @__PURE__ */ jsxs(
259840
+ "button",
259841
+ {
259842
+ type: "button",
259843
+ onClick: () => setSnippetExpanded((v) => !v),
259844
+ "aria-expanded": snippetExpanded,
259845
+ title: snippetExpanded ? "Hide snippet" : "Show snippet",
259846
+ style: {
259847
+ display: "flex",
259848
+ alignItems: "center",
259849
+ gap: 8,
259850
+ width: "100%",
259851
+ textAlign: "left",
259852
+ padding: "10px 20px",
259853
+ background: "transparent",
259854
+ border: "none",
259855
+ borderBottom: snippetExpanded ? `1px solid ${theme2.colors.border}` : "none",
259856
+ cursor: "pointer",
259857
+ fontFamily: theme2.fonts.body,
259858
+ fontSize: theme2.fontSizes[0],
259859
+ fontWeight: theme2.fontWeights.medium,
259860
+ color: theme2.colors.textSecondary,
259861
+ letterSpacing: "0.04em",
259862
+ textTransform: "uppercase"
259863
+ },
259864
+ children: [
259865
+ /* @__PURE__ */ jsx(
259866
+ "span",
259867
+ {
259868
+ "aria-hidden": true,
259869
+ style: {
259870
+ display: "inline-block",
259871
+ width: 10,
259872
+ transform: snippetExpanded ? "rotate(90deg)" : "rotate(0deg)",
259873
+ transition: "transform 120ms ease"
259874
+ },
259875
+ children: "▶"
259876
+ }
259877
+ ),
259878
+ snippetExpanded ? "Hide snippet" : "Show snippet"
259879
+ ]
259880
+ }
259881
+ ),
259882
+ snippetExpanded ? /* @__PURE__ */ jsx("div", { style: { padding: 12 }, children: snippet2.kind === "slice" ? /* @__PURE__ */ jsx(
259883
+ TrailSnippetView,
259884
+ {
259885
+ filePath: marker.sourcePath,
259886
+ fileName: fileName ?? marker.sourcePath,
259887
+ startLine: snippet2.startLine,
259888
+ endLine: snippet2.endLine,
259889
+ focusLine: snippet2.focusLine,
259890
+ contextLines: snippet2.contextLines,
259891
+ readFile,
259892
+ background: theme2.colors.background
259893
+ }
259894
+ ) : /* @__PURE__ */ jsx(
259895
+ TrailDiffSnippetView,
259896
+ {
259897
+ filePath: marker.sourcePath,
259898
+ fileName: fileName ?? marker.sourcePath,
259899
+ oldContents: snippet2.oldContents,
259900
+ newContents: snippet2.newContents,
259901
+ readFile,
259902
+ startLine: snippet2.startLine,
259903
+ endLine: snippet2.endLine,
259904
+ focusLine: snippet2.focusLine,
259905
+ contextLines: snippet2.contextLines,
259906
+ diffStyle: snippet2.diffStyle,
259907
+ background: theme2.colors.background
259908
+ }
259909
+ ) }) : null
259910
+ ] }) : null
259911
+ ]
259912
+ }
259913
+ );
259914
+ };
259646
259915
  const TrailHeader = ({
259647
259916
  trail: trail2,
259648
259917
  markerCount,
@@ -259652,7 +259921,9 @@ const TrailHeader = ({
259652
259921
  showSequenceDrawer,
259653
259922
  onToggleSequenceDrawer,
259654
259923
  canExit,
259655
- onExitTrail
259924
+ onExitTrail,
259925
+ viewMode,
259926
+ onSetViewMode
259656
259927
  }) => {
259657
259928
  const { theme: theme2 } = useTheme();
259658
259929
  const toggleButtonStyle = (active) => ({
@@ -259668,11 +259939,28 @@ const TrailHeader = ({
259668
259939
  cursor: "pointer",
259669
259940
  lineHeight: 1.2
259670
259941
  });
259942
+ const segmentStyle = (active, side) => ({
259943
+ flexShrink: 0,
259944
+ fontFamily: theme2.fonts.body,
259945
+ fontSize: theme2.fontSizes[0],
259946
+ fontWeight: theme2.fontWeights.medium,
259947
+ color: active ? theme2.colors.background : theme2.colors.text,
259948
+ background: active ? theme2.colors.accent : "transparent",
259949
+ border: `1px solid ${active ? theme2.colors.accent : theme2.colors.muted}`,
259950
+ borderTopLeftRadius: side === "left" ? theme2.radii[3] : 0,
259951
+ borderBottomLeftRadius: side === "left" ? theme2.radii[3] : 0,
259952
+ borderTopRightRadius: side === "right" ? theme2.radii[3] : 0,
259953
+ borderBottomRightRadius: side === "right" ? theme2.radii[3] : 0,
259954
+ marginLeft: side === "right" ? -1 : 0,
259955
+ padding: "4px 10px",
259956
+ cursor: "pointer",
259957
+ lineHeight: 1.2
259958
+ });
259959
+ const isDoc = viewMode === "doc";
259671
259960
  return /* @__PURE__ */ jsxs(
259672
259961
  "div",
259673
259962
  {
259674
259963
  style: {
259675
- height: HEADER_HEIGHT_PX,
259676
259964
  padding: "8px 16px",
259677
259965
  borderBottom: `1px solid ${theme2.colors.border}`,
259678
259966
  display: "flex",
@@ -259726,7 +260014,7 @@ const TrailHeader = ({
259726
260014
  }
259727
260015
  ),
259728
260016
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
259729
- /* @__PURE__ */ jsx(
260017
+ isDoc ? null : /* @__PURE__ */ jsx(
259730
260018
  "button",
259731
260019
  {
259732
260020
  type: "button",
@@ -259761,7 +260049,7 @@ const TrailHeader = ({
259761
260049
  children: "Exit"
259762
260050
  }
259763
260051
  ),
259764
- hideToggle ? null : /* @__PURE__ */ jsx(
260052
+ hideToggle || isDoc ? null : /* @__PURE__ */ jsx(
259765
260053
  "button",
259766
260054
  {
259767
260055
  type: "button",
@@ -259771,7 +260059,31 @@ const TrailHeader = ({
259771
260059
  style: toggleButtonStyle(show3D),
259772
260060
  children: "3D"
259773
260061
  }
259774
- )
260062
+ ),
260063
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", marginLeft: 6 }, children: [
260064
+ /* @__PURE__ */ jsx(
260065
+ "button",
260066
+ {
260067
+ type: "button",
260068
+ onClick: () => onSetViewMode("city"),
260069
+ "aria-pressed": !isDoc,
260070
+ title: "City view — 3D buildings + sequence drawer",
260071
+ style: segmentStyle(!isDoc, "left"),
260072
+ children: "City"
260073
+ }
260074
+ ),
260075
+ /* @__PURE__ */ jsx(
260076
+ "button",
260077
+ {
260078
+ type: "button",
260079
+ onClick: () => onSetViewMode("doc"),
260080
+ "aria-pressed": isDoc,
260081
+ title: "Document view — scroll all markers as one page",
260082
+ style: segmentStyle(isDoc, "right"),
260083
+ children: "Doc"
260084
+ }
260085
+ )
260086
+ ] })
259775
260087
  ] })
259776
260088
  ]
259777
260089
  }