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

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;AAatC,OAAO,KAAK,EAEV,oCAAoC,EAErC,MAAM,wCAAwC,CAAC;AAqBhD;;;;;;;;;;;;;;;;;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;AA4BhD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAC/C,oCAAoC,CA+ErC,CAAC"}
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import type { CityBuilding } from '@principal-ai/file-city-react';
3
+ import type { OnCameraFrame } from './TrailLeaderLine';
4
+ export interface TrailFilePathHandle {
5
+ /** Pass this through alongside the leader-line's `onCameraFrame`. */
6
+ onCameraFrame: OnCameraFrame;
7
+ }
8
+ export interface TrailFilePathProps {
9
+ /** Container the SVG sits inside; used to convert client-rect coords to local. */
10
+ containerRef: React.RefObject<HTMLDivElement | null>;
11
+ /**
12
+ * Ordered list of buildings to walk through, one per marker. Empty
13
+ * (or single-entry) lists hide the path entirely. Repeats are kept
14
+ * — if a trail visits the same file twice, the path returns there.
15
+ */
16
+ buildings: readonly CityBuilding[];
17
+ /**
18
+ * `FileCity3D` re-centers the city around the world origin, so building
19
+ * positions need this offset subtracted before projecting through the
20
+ * camera. Compute as `(bounds.minX + bounds.maxX) / 2` etc.
21
+ */
22
+ cityCenter: {
23
+ x: number;
24
+ z: number;
25
+ } | null;
26
+ }
27
+ /**
28
+ * Sequential-path overlay: connects every marker's building in order
29
+ * with a dashed curve, dots at each step, and step indices floating
30
+ * above the dots. Drawn imperatively from inside `onCameraFrame` so it
31
+ * stays in lockstep with the city's camera without re-rendering React.
32
+ */
33
+ export declare const TrailFilePath: React.ForwardRefExoticComponent<TrailFilePathProps & React.RefAttributes<TrailFilePathHandle>>;
34
+ //# sourceMappingURL=TrailFilePath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrailFilePath.d.ts","sourceRoot":"","sources":["../../../../src/panels/FileCityTrailExplorerPanel/overlays/TrailFilePath.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,WAAW,mBAAmB;IAClC,qEAAqE;IACrE,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,kFAAkF;IAClF,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD;;;;OAIG;IACH,SAAS,EAAE,SAAS,YAAY,EAAE,CAAC;IACnC;;;;OAIG;IACH,UAAU,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAC7C;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,gGAsKxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TrailLeaderLine.d.ts","sourceRoot":"","sources":["../../../../src/panels/FileCityTrailExplorerPanel/overlays/TrailLeaderLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,KACpC,IAAI,CAAC;AAEV,MAAM,WAAW,qBAAqB;IACpC,+DAA+D;IAC/D,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,MAAM,WAAW,oBAAoB;IACnC,kFAAkF;IAClF,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD,0DAA0D;IAC1D,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC;IAC9B;;;;OAIG;IACH,UAAU,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC5C,2EAA2E;IAC3E,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAChD;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,oGA6K1B,CAAC"}
1
+ {"version":3,"file":"TrailLeaderLine.d.ts","sourceRoot":"","sources":["../../../../src/panels/FileCityTrailExplorerPanel/overlays/TrailLeaderLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,KACpC,IAAI,CAAC;AAEV,MAAM,WAAW,qBAAqB;IACpC,+DAA+D;IAC/D,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,MAAM,WAAW,oBAAoB;IACnC,kFAAkF;IAClF,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD,0DAA0D;IAC1D,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC;IAC9B;;;;OAIG;IACH,UAAU,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC5C,2EAA2E;IAC3E,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAChD;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,oGAoM1B,CAAC"}
@@ -23,11 +23,37 @@ export interface TrailMarkerNav {
23
23
  /** Steps to the next marker. No-op at the end of the trail. */
24
24
  onNext: () => void;
25
25
  }
26
+ /**
27
+ * One entry in the "Files in this trail" list shown below the
28
+ * markdown body. Each entry corresponds to a unique `sourcePath`
29
+ * across the trail's markers (in this panel's repo).
30
+ */
31
+ export interface TrailFileEntry {
32
+ /** Repo-relative path (the marker.sourcePath). */
33
+ sourcePath: string;
34
+ /** Number of markers that resolve to this file. */
35
+ markerCount: number;
36
+ /** True when the active marker is anchored to this file. */
37
+ isActive: boolean;
38
+ /** Click handler — typically selects the first marker for the file. */
39
+ onClick: () => void;
40
+ /**
41
+ * Fires on row hover. Pass the row's `sourcePath` on enter, `null`
42
+ * on leave. Hosts use this to paint a transient highlight layer on
43
+ * the matching building in the city below.
44
+ */
45
+ onHoverChange?: (sourcePath: string | null) => void;
46
+ }
26
47
  export interface TrailMarkdownOverlayProps {
27
- /** Small caps label shown above the title (e.g. "Overview", "Marker"). */
28
- eyebrow: string;
48
+ /**
49
+ * Small caps label shown above the title (e.g. "Overview", "Marker").
50
+ * Pass `null`/omit alongside `title` to suppress the header row
51
+ * entirely — useful for the idle trail-summary state where the
52
+ * surrounding panel chrome already names the trail.
53
+ */
54
+ eyebrow?: string | null;
29
55
  /** Bold heading shown under the eyebrow. */
30
- title: string;
56
+ title?: string | null;
31
57
  /** Markdown body. The overlay short-circuits to `null` when this is empty. */
32
58
  markdown: string;
33
59
  /** Stable prefix used by `IndustryMarkdownSlide` for slide ids. */
@@ -40,11 +66,21 @@ export interface TrailMarkdownOverlayProps {
40
66
  * (e.g. the camera-framing effect) use this to observe width changes.
41
67
  */
42
68
  containerRef?: React.Ref<HTMLDivElement>;
69
+ /**
70
+ * When true, omits the `bottom` CSS transition so a live drawer
71
+ * resize tracks the cursor instead of lagging behind it.
72
+ */
73
+ disableBottomTransition?: boolean;
43
74
  /**
44
75
  * Optional marker navigation footer. When omitted (e.g. trail has no
45
76
  * markers in this repo), the footer is not rendered.
46
77
  */
47
78
  nav?: TrailMarkerNav;
79
+ /**
80
+ * Optional "Files in this trail" list rendered below the markdown
81
+ * body. Empty / undefined hides the section entirely.
82
+ */
83
+ files?: TrailFileEntry[];
48
84
  }
49
85
  export declare const TrailMarkdownOverlay: React.FC<TrailMarkdownOverlayProps>;
50
86
  //# sourceMappingURL=TrailMarkdownOverlay.d.ts.map
@@ -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,MAAM,WAAW,yBAAyB;IACxC,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,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,GAAG,CAAC,EAAE,cAAc,CAAC;CACtB;AAQD,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA+MpE,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,CA4OpE,CAAC"}