@industry-theme/file-city-panel 0.5.53 → 0.5.54

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.
Files changed (164) hide show
  1. package/dist/components/ContextContainer.d.ts +40 -0
  2. package/dist/components/ContextContainer.d.ts.map +1 -0
  3. package/dist/components/TourPlayer.d.ts +49 -0
  4. package/dist/components/TourPlayer.d.ts.map +1 -0
  5. package/dist/components/TourPlayerIntegration.d.ts +26 -0
  6. package/dist/components/TourPlayerIntegration.d.ts.map +1 -0
  7. package/dist/components/index.d.ts +7 -0
  8. package/dist/components/index.d.ts.map +1 -0
  9. package/dist/hooks/index.d.ts +3 -0
  10. package/dist/hooks/index.d.ts.map +1 -0
  11. package/dist/hooks/useFuzzyFileSearch.d.ts +24 -0
  12. package/dist/hooks/useFuzzyFileSearch.d.ts.map +1 -0
  13. package/dist/hooks/useTourPlayer.d.ts +55 -0
  14. package/dist/hooks/useTourPlayer.d.ts.map +1 -0
  15. package/dist/index.d.ts +74 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/mocks/MockTTSAdapter.d.ts +85 -0
  18. package/dist/mocks/MockTTSAdapter.d.ts.map +1 -0
  19. package/dist/mocks/mockAudioActions.d.ts +27 -0
  20. package/dist/mocks/mockAudioActions.d.ts.map +1 -0
  21. package/dist/mocks/panelContext.d.ts +36 -0
  22. package/dist/mocks/panelContext.d.ts.map +1 -0
  23. package/dist/panels/CodeCityPanel.d.ts +108 -0
  24. package/dist/panels/CodeCityPanel.d.ts.map +1 -0
  25. package/dist/panels/FeedCodeCityPanel.d.ts +19 -0
  26. package/dist/panels/FeedCodeCityPanel.d.ts.map +1 -0
  27. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/AddToAreaModal.d.ts +14 -0
  28. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/AddToAreaModal.d.ts.map +1 -0
  29. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/AddToScopeModal.d.ts +14 -0
  30. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/AddToScopeModal.d.ts.map +1 -0
  31. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/CommitFileOverlay.d.ts +18 -0
  32. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/CommitFileOverlay.d.ts.map +1 -0
  33. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/FileCityExplorer.d.ts +87 -0
  34. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/FileCityExplorer.d.ts.map +1 -0
  35. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/RecentCommitCard.d.ts +37 -0
  36. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/RecentCommitCard.d.ts.map +1 -0
  37. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/ScopeInfoOverlay.d.ts +10 -0
  38. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/ScopeInfoOverlay.d.ts.map +1 -0
  39. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/WorkingTreeCard.d.ts +32 -0
  40. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/WorkingTreeCard.d.ts.map +1 -0
  41. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/WorkingTreeFileOverlay.d.ts +21 -0
  42. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/WorkingTreeFileOverlay.d.ts.map +1 -0
  43. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/index.d.ts +2 -0
  44. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/index.d.ts.map +1 -0
  45. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/layers.d.ts +22 -0
  46. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/layers.d.ts.map +1 -0
  47. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/pathConversion.d.ts +19 -0
  48. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/pathConversion.d.ts.map +1 -0
  49. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/scopeTreePaths.d.ts +21 -0
  50. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/scopeTreePaths.d.ts.map +1 -0
  51. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/styles.d.ts +9 -0
  52. package/dist/panels/FileCityExplorerPanel/FileCityExplorer/styles.d.ts.map +1 -0
  53. package/dist/panels/FileCityExplorerPanel/FileCityExplorerPanel.d.ts +4 -0
  54. package/dist/panels/FileCityExplorerPanel/FileCityExplorerPanel.d.ts.map +1 -0
  55. package/dist/panels/FileCityExplorerPanel/buildCityDataFromContext.d.ts +34 -0
  56. package/dist/panels/FileCityExplorerPanel/buildCityDataFromContext.d.ts.map +1 -0
  57. package/dist/panels/FileCityExplorerPanel/index.d.ts +4 -0
  58. package/dist/panels/FileCityExplorerPanel/index.d.ts.map +1 -0
  59. package/dist/panels/FileCityExplorerPanel/overlays/FileOverlay.d.ts +11 -0
  60. package/dist/panels/FileCityExplorerPanel/overlays/FileOverlay.d.ts.map +1 -0
  61. package/dist/panels/FileCityExplorerPanel/overlays/MarkdownNotes.d.ts +58 -0
  62. package/dist/panels/FileCityExplorerPanel/overlays/MarkdownNotes.d.ts.map +1 -0
  63. package/dist/panels/FileCityExplorerPanel/overlays/PierreFileView.d.ts +11 -0
  64. package/dist/panels/FileCityExplorerPanel/overlays/PierreFileView.d.ts.map +1 -0
  65. package/dist/panels/FileCityExplorerPanel/overlays/PierreSnippetDiffView.d.ts +28 -0
  66. package/dist/panels/FileCityExplorerPanel/overlays/PierreSnippetDiffView.d.ts.map +1 -0
  67. package/dist/panels/FileCityExplorerPanel/overlays/PierreSnippetView.d.ts +42 -0
  68. package/dist/panels/FileCityExplorerPanel/overlays/PierreSnippetView.d.ts.map +1 -0
  69. package/dist/panels/FileCityExplorerPanel/overlays/SequenceDiagramOverlay.d.ts +15 -0
  70. package/dist/panels/FileCityExplorerPanel/overlays/SequenceDiagramOverlay.d.ts.map +1 -0
  71. package/dist/panels/FileCityExplorerPanel/overlays/SequenceEventDetailOverlay.d.ts +22 -0
  72. package/dist/panels/FileCityExplorerPanel/overlays/SequenceEventDetailOverlay.d.ts.map +1 -0
  73. package/dist/panels/FileCityExplorerPanel/overlays/SequenceFilesOverlay.d.ts +28 -0
  74. package/dist/panels/FileCityExplorerPanel/overlays/SequenceFilesOverlay.d.ts.map +1 -0
  75. package/dist/panels/FileCityExplorerPanel/overlays/SequenceLeaderLine.d.ts +42 -0
  76. package/dist/panels/FileCityExplorerPanel/overlays/SequenceLeaderLine.d.ts.map +1 -0
  77. package/dist/panels/FileCityExplorerPanel/overlays/SequenceMarkdownOverlay.d.ts +44 -0
  78. package/dist/panels/FileCityExplorerPanel/overlays/SequenceMarkdownOverlay.d.ts.map +1 -0
  79. package/dist/panels/FileCityExplorerPanel/overlays/SnippetNotes.d.ts +67 -0
  80. package/dist/panels/FileCityExplorerPanel/overlays/SnippetNotes.d.ts.map +1 -0
  81. package/dist/panels/components/ActivityHeatmapView.d.ts +25 -0
  82. package/dist/panels/components/ActivityHeatmapView.d.ts.map +1 -0
  83. package/dist/panels/components/AgentActivityView.d.ts +29 -0
  84. package/dist/panels/components/AgentActivityView.d.ts.map +1 -0
  85. package/dist/panels/components/BuildingCityLoader.d.ts +11 -0
  86. package/dist/panels/components/BuildingCityLoader.d.ts.map +1 -0
  87. package/dist/panels/components/CommitChangesTree.d.ts +29 -0
  88. package/dist/panels/components/CommitChangesTree.d.ts.map +1 -0
  89. package/dist/panels/components/CoverEditor.d.ts +22 -0
  90. package/dist/panels/components/CoverEditor.d.ts.map +1 -0
  91. package/dist/panels/components/EmptyState.d.ts +12 -0
  92. package/dist/panels/components/EmptyState.d.ts.map +1 -0
  93. package/dist/panels/components/FeedProjectHeader.d.ts +86 -0
  94. package/dist/panels/components/FeedProjectHeader.d.ts.map +1 -0
  95. package/dist/panels/components/FileCardList.d.ts +44 -0
  96. package/dist/panels/components/FileCardList.d.ts.map +1 -0
  97. package/dist/panels/components/FileCityTips.d.ts +7 -0
  98. package/dist/panels/components/FileCityTips.d.ts.map +1 -0
  99. package/dist/panels/components/FileTypesView.d.ts +23 -0
  100. package/dist/panels/components/FileTypesView.d.ts.map +1 -0
  101. package/dist/panels/components/GitChangesCardList.d.ts +29 -0
  102. package/dist/panels/components/GitChangesCardList.d.ts.map +1 -0
  103. package/dist/panels/components/GitChangesTree.d.ts +26 -0
  104. package/dist/panels/components/GitChangesTree.d.ts.map +1 -0
  105. package/dist/panels/components/GitChangesView.d.ts +27 -0
  106. package/dist/panels/components/GitChangesView.d.ts.map +1 -0
  107. package/dist/panels/components/HoverInfoBar.d.ts +29 -0
  108. package/dist/panels/components/HoverInfoBar.d.ts.map +1 -0
  109. package/dist/panels/components/Legend.d.ts +145 -0
  110. package/dist/panels/components/Legend.d.ts.map +1 -0
  111. package/dist/panels/components/LegendTabs.d.ts +35 -0
  112. package/dist/panels/components/LegendTabs.d.ts.map +1 -0
  113. package/dist/panels/components/PackageInfo.d.ts +26 -0
  114. package/dist/panels/components/PackageInfo.d.ts.map +1 -0
  115. package/dist/panels/components/PackageManagerIcon.d.ts +10 -0
  116. package/dist/panels/components/PackageManagerIcon.d.ts.map +1 -0
  117. package/dist/panels/components/PrChangesCardList.d.ts +38 -0
  118. package/dist/panels/components/PrChangesCardList.d.ts.map +1 -0
  119. package/dist/panels/components/PrChangesTree.d.ts +32 -0
  120. package/dist/panels/components/PrChangesTree.d.ts.map +1 -0
  121. package/dist/panels/components/ProjectHeader.d.ts +36 -0
  122. package/dist/panels/components/ProjectHeader.d.ts.map +1 -0
  123. package/dist/panels/components/ProjectInfoHeader.d.ts +47 -0
  124. package/dist/panels/components/ProjectInfoHeader.d.ts.map +1 -0
  125. package/dist/panels/components/ProjectInfoView.d.ts +17 -0
  126. package/dist/panels/components/ProjectInfoView.d.ts.map +1 -0
  127. package/dist/panels/components/QualityMetricsView.d.ts +22 -0
  128. package/dist/panels/components/QualityMetricsView.d.ts.map +1 -0
  129. package/dist/panels/components/ScopesCanvasView.d.ts +17 -0
  130. package/dist/panels/components/ScopesCanvasView.d.ts.map +1 -0
  131. package/dist/panels/components/SearchResultsView.d.ts +19 -0
  132. package/dist/panels/components/SearchResultsView.d.ts.map +1 -0
  133. package/dist/panels/components/StoryboardFilesCardList.d.ts +28 -0
  134. package/dist/panels/components/StoryboardFilesCardList.d.ts.map +1 -0
  135. package/dist/panels/components/StoryboardFilesTree.d.ts +26 -0
  136. package/dist/panels/components/StoryboardFilesTree.d.ts.map +1 -0
  137. package/dist/panels/components/StoryboardView.d.ts +38 -0
  138. package/dist/panels/components/StoryboardView.d.ts.map +1 -0
  139. package/dist/panels/index.d.ts +4 -0
  140. package/dist/panels/index.d.ts.map +1 -0
  141. package/dist/panels/stress-test-data.d.ts +40 -0
  142. package/dist/panels/stress-test-data.d.ts.map +1 -0
  143. package/dist/panels/utils/cityData.d.ts +5 -0
  144. package/dist/panels/utils/cityData.d.ts.map +1 -0
  145. package/dist/panels/utils/qualityLayers.d.ts +119 -0
  146. package/dist/panels/utils/qualityLayers.d.ts.map +1 -0
  147. package/dist/tools/index.d.ts +32 -0
  148. package/dist/tools/index.d.ts.map +1 -0
  149. package/dist/tools.bundle.js +103 -0
  150. package/dist/types/FileCityExplorerPanel.d.ts +132 -0
  151. package/dist/types/FileCityExplorerPanel.d.ts.map +1 -0
  152. package/dist/types/Scope.d.ts +94 -0
  153. package/dist/types/Scope.d.ts.map +1 -0
  154. package/dist/types/SequenceDiagram.d.ts +306 -0
  155. package/dist/types/SequenceDiagram.d.ts.map +1 -0
  156. package/dist/types/TextToSpeech.d.ts +118 -0
  157. package/dist/types/TextToSpeech.d.ts.map +1 -0
  158. package/dist/types/TourExtensions.d.ts +28 -0
  159. package/dist/types/TourExtensions.d.ts.map +1 -0
  160. package/dist/types/index.d.ts +204 -0
  161. package/dist/types/index.d.ts.map +1 -0
  162. package/dist/utils/index.d.ts +3 -0
  163. package/dist/utils/index.d.ts.map +1 -0
  164. package/package.json +1 -1
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import type { StoryboardContextSliceData } from '../CodeCityPanel';
3
+ /** File category for selection callbacks */
4
+ export type StoryboardFileCategory = 'source' | 'supporting';
5
+ interface StoryboardFilesCardListProps {
6
+ /** Storyboard context data */
7
+ storyboardContext: StoryboardContextSliceData;
8
+ /** Horizontal padding for cards */
9
+ horizontalPadding?: string;
10
+ /** Callback when a file is clicked */
11
+ onFileClick?: (filePath: string, category?: StoryboardFileCategory) => void;
12
+ /** Callback when a file is hovered */
13
+ onFileHover?: (filePath: string | null) => void;
14
+ /** Whether to show the header (hierarchy breadcrumb and legend). Default true. */
15
+ showHeader?: boolean;
16
+ /** Currently selected file path (shows selection styling and Open button) */
17
+ selectedFile?: string | null;
18
+ /** Callback when Open button is clicked on selected file */
19
+ onOpenFile?: (filePath: string) => void;
20
+ }
21
+ /**
22
+ * StoryboardFilesCardList displays storyboard-associated files as a flat list of cards.
23
+ * Shows the hierarchy header (storyboard → workflow → scenario) and files categorized
24
+ * as source files (blue) or supporting files (gray).
25
+ */
26
+ export declare const StoryboardFilesCardList: React.FC<StoryboardFilesCardListProps>;
27
+ export {};
28
+ //# sourceMappingURL=StoryboardFilesCardList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StoryboardFilesCardList.d.ts","sourceRoot":"","sources":["../../../src/panels/components/StoryboardFilesCardList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAGpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAEnE,4CAA4C;AAC5C,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE7D,UAAU,4BAA4B;IACpC,8BAA8B;IAC9B,iBAAiB,EAAE,0BAA0B,CAAC;IAC9C,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAC5E,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,kFAAkF;IAClF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,4DAA4D;IAC5D,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CA6I1E,CAAC"}
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import type { StoryboardContextSliceData } from '../CodeCityPanel';
3
+ /** File category for selection callbacks */
4
+ export type StoryboardFileCategory = 'source' | 'supporting';
5
+ interface StoryboardFilesTreeProps {
6
+ /** Storyboard context data */
7
+ storyboardContext: StoryboardContextSliceData;
8
+ /** Root path for the repository (used for building file trees) */
9
+ rootPath?: string;
10
+ /** Horizontal padding for tree nodes */
11
+ horizontalPadding?: string;
12
+ /** Callback when a file is clicked */
13
+ onFileClick?: (filePath: string, category?: StoryboardFileCategory) => void;
14
+ /** Callback when a node is hovered */
15
+ onNodeHover?: (nodePath: string | null, isFolder: boolean) => void;
16
+ /** Whether to show the header (hierarchy breadcrumb and legend). Default true. */
17
+ showHeader?: boolean;
18
+ }
19
+ /**
20
+ * StoryboardFilesTree component that displays storyboard-associated files in a tree format.
21
+ * Shows the hierarchy header (storyboard → workflow → scenario) and files categorized
22
+ * as source files (from nodes' pv.sources) or supporting files (canvas, docs, workflow).
23
+ */
24
+ export declare const StoryboardFilesTree: React.FC<StoryboardFilesTreeProps>;
25
+ export {};
26
+ //# sourceMappingURL=StoryboardFilesTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StoryboardFilesTree.d.ts","sourceRoot":"","sources":["../../../src/panels/components/StoryboardFilesTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAIpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAEnE,4CAA4C;AAC5C,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,YAAY,CAAC;AAQ7D,UAAU,wBAAwB;IAChC,8BAA8B;IAC9B,iBAAiB,EAAE,0BAA0B,CAAC;IAC9C,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAC5E,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACnE,kFAAkF;IAClF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA0NlE,CAAC"}
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import { type StoryboardFileCategory } from './StoryboardFilesCardList';
3
+ import type { StoryboardContextSliceData } from '../CodeCityPanel';
4
+ interface StoryboardViewProps {
5
+ /** Storyboard context data */
6
+ storyboardContext: StoryboardContextSliceData;
7
+ /** Whether to show section header (default: true) */
8
+ showHeader?: boolean;
9
+ /** Horizontal padding for content */
10
+ horizontalPadding?: string;
11
+ /** Callback when the storyboard name is clicked (to focus on canvas panel) */
12
+ onStoryboardClick?: (storyboard: {
13
+ id: string;
14
+ name: string;
15
+ path: string;
16
+ }) => void;
17
+ /** Callback when the workflow name is clicked (to focus on workflow panel) */
18
+ onWorkflowClick?: (workflow: {
19
+ id: string;
20
+ name: string;
21
+ path: string;
22
+ }) => void;
23
+ /** Callback when a storyboard file is clicked */
24
+ onFileClick?: (filePath: string, category?: StoryboardFileCategory) => void;
25
+ /** Callback when a storyboard node is hovered */
26
+ onFileHover?: (filePath: string | null) => void;
27
+ /** Currently selected file in storyboard (for selection styling) */
28
+ selectedFile?: string | null;
29
+ /** Callback when Open button is clicked on a storyboard file */
30
+ onOpenFile?: (filePath: string) => void;
31
+ }
32
+ /**
33
+ * StoryboardView displays the storyboard context with hierarchy breadcrumb and file list.
34
+ * Provides a view suitable for the tab panel.
35
+ */
36
+ export declare const StoryboardView: React.FC<StoryboardViewProps>;
37
+ export {};
38
+ //# sourceMappingURL=StoryboardView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StoryboardView.d.ts","sourceRoot":"","sources":["../../../src/panels/components/StoryboardView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAA2B,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACjG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAEnE,UAAU,mBAAmB;IAC3B,8BAA8B;IAC9B,iBAAiB,EAAE,0BAA0B,CAAC;IAC9C,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qCAAqC;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACrF,8EAA8E;IAC9E,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACjF,iDAAiD;IACjD,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAC5E,iDAAiD;IACjD,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gEAAgE;IAChE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+HxD,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { CodeCityPanel, CodeCityPanelPreview, CodeCityPanelContent } from './CodeCityPanel';
2
+ export { FeedCodeCityPanel, FeedCodeCityPanelPreview } from './FeedCodeCityPanel';
3
+ export type { PrFilesSliceData, CommitFilesSliceData, StoryboardContextSliceData, } from './CodeCityPanel';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/panels/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAGlF,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Stress test data generator for testing subdirectory selection performance
3
+ * with large repository simulations.
4
+ */
5
+ interface FileInfo {
6
+ path: string;
7
+ name: string;
8
+ size: number;
9
+ }
10
+ /**
11
+ * Generate a large number of file paths with realistic nested directory structures
12
+ */
13
+ export declare function generateLargeFilePaths(fileCount: number): string[];
14
+ /**
15
+ * Convert file paths to FileInfo objects for the panel
16
+ */
17
+ export declare function createFileInfoList(paths: string[]): FileInfo[];
18
+ /**
19
+ * Create file list with a large number of files for stress testing subdirectory selection
20
+ *
21
+ * @param fileCount - Number of files to generate (default: 8000)
22
+ * @param useCache - Whether to cache results (default: true)
23
+ */
24
+ export declare function createStressTestFileList(fileCount?: number, useCache?: boolean): FileInfo[];
25
+ /**
26
+ * Get unique directory paths at each depth level from file list
27
+ * Useful for creating navigation buttons in stress test UI
28
+ */
29
+ export declare function getDirectoryPaths(files: FileInfo[]): {
30
+ topLevel: string[];
31
+ depth2: string[];
32
+ depth3: string[];
33
+ depth4: string[];
34
+ };
35
+ /**
36
+ * Clear the stress test cache (useful for testing memory)
37
+ */
38
+ export declare function clearStressTestCache(): void;
39
+ export {};
40
+ //# sourceMappingURL=stress-test-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stress-test-data.d.ts","sourceRoot":"","sources":["../../src/panels/stress-test-data.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAiCD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAoElE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAO9D;AAKD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,GAAE,MAAa,EAAE,QAAQ,GAAE,OAAc,GAAG,QAAQ,EAAE,CAavG;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG;IACpD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAmBA;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
@@ -0,0 +1,5 @@
1
+ import type { CityData } from '@principal-ai/file-city-builder';
2
+ export type LineCountData = Record<string, number>;
3
+ export declare function enrichWithLineCounts(cityData: CityData, lineCounts: LineCountData): CityData;
4
+ export declare function estimateLineCounts(cityData: CityData): CityData;
5
+ //# sourceMappingURL=cityData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cityData.d.ts","sourceRoot":"","sources":["../../../src/panels/utils/cityData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEhE,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnD,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,aAAa,GACxB,QAAQ,CAQV;AAUD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAoB/D"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Quality highlight layer generators for File City visualization
3
+ *
4
+ * Creates highlight layers from quality metrics data (coverage, linting, etc.)
5
+ */
6
+ import type { CityBuilding, LayerItem, HighlightLayer } from '@principal-ai/file-city-react';
7
+ import { type ColorMode as QualityColorMode, type LensColorMode, type ColorModeConfig, type FileMetricData, type QualitySliceData } from '@principal-ai/quality-lens-registry';
8
+ export type { LensColorMode, ColorModeConfig, FileMetricData, QualitySliceData };
9
+ export type { HighlightLayer, LayerItem };
10
+ export type ColorMode = QualityColorMode | 'fileTypes' | 'git' | 'pr' | 'commit' | 'storyboard';
11
+ /**
12
+ * Get all available color modes from the registry
13
+ */
14
+ export declare function getAvailableColorModes(): ColorModeConfig[];
15
+ /**
16
+ * Available color modes (derived from registry)
17
+ * @deprecated Use getAvailableColorModes() for dynamic list
18
+ */
19
+ export declare const COLOR_MODES: ColorModeConfig[];
20
+ /**
21
+ * Default color modes (always available without quality data)
22
+ */
23
+ export declare const DEFAULT_COLOR_MODES: ColorModeConfig[];
24
+ /**
25
+ * Quality-based color modes (require quality data)
26
+ */
27
+ export declare const QUALITY_COLOR_MODES: ColorModeConfig[];
28
+ /**
29
+ * File City color modes slice data structure.
30
+ * Hosts populate this slice to control which color modes are available.
31
+ * If not populated, only default modes (fileTypes, git) are available.
32
+ */
33
+ export interface FileCityColorModesSliceData {
34
+ /** Additional color modes to enable (beyond fileTypes and git) */
35
+ enabledModes?: ColorMode[];
36
+ /** The currently selected color mode (set by PanelContext via events) */
37
+ selectedColorMode?: ColorMode | null;
38
+ /** Quality data for quality-based color modes */
39
+ qualityData?: QualitySliceData;
40
+ }
41
+ /**
42
+ * Convert a score (0-100) to a color on the red-yellow-green gradient
43
+ * Higher scores = greener (better)
44
+ */
45
+ export declare function scoreToColor(score: number): string;
46
+ /**
47
+ * Convert coverage percentage to color
48
+ * High coverage = green, low coverage = red
49
+ */
50
+ export declare function coverageToColor(coverage: number): string;
51
+ /**
52
+ * Convert issue count to color (inverse - fewer issues = greener)
53
+ * Uses a log scale for better distribution
54
+ */
55
+ export declare function issueCountToColor(issueCount: number, maxIssues?: number): string;
56
+ /**
57
+ * Color thresholds for gradient legend
58
+ */
59
+ export declare const SCORE_THRESHOLDS: {
60
+ min: number;
61
+ max: number;
62
+ color: string;
63
+ label: string;
64
+ }[];
65
+ /**
66
+ * Create highlight layers for test coverage visualization
67
+ * Simple scheme: green = has coverage, red = no coverage, gray = not applicable
68
+ */
69
+ export declare function createCoverageHighlightLayers(buildings: CityBuilding[], fileCoverage: Record<string, number>): HighlightLayer[];
70
+ /**
71
+ * Create highlight layers for file metrics (ESLint, TypeScript, etc.)
72
+ * Uses issue-count-based categories for clarity
73
+ */
74
+ export declare function createMetricHighlightLayers(buildings: CityBuilding[], metrics: FileMetricData[], metricId: string, _metricName: string): HighlightLayer[];
75
+ /**
76
+ * Create ESLint highlight layers
77
+ * Uses a stricter color scheme: green only for clean files, orange-to-red for any issues
78
+ */
79
+ export declare function createEslintHighlightLayers(buildings: CityBuilding[], eslintMetrics: FileMetricData[]): HighlightLayer[];
80
+ /**
81
+ * Create Biome Lint highlight layers
82
+ * Uses a stricter color scheme: green only for clean files, orange-to-red for any issues
83
+ */
84
+ export declare function createBiomeLintHighlightLayers(buildings: CityBuilding[], biomeLintMetrics: FileMetricData[]): HighlightLayer[];
85
+ /**
86
+ * Create TypeScript highlight layers
87
+ * Uses a stricter color scheme: green only for clean files, orange-to-red for any issues
88
+ */
89
+ export declare function createTypescriptHighlightLayers(buildings: CityBuilding[], typescriptMetrics: FileMetricData[]): HighlightLayer[];
90
+ /**
91
+ * Create Prettier highlight layers
92
+ * Uses a stricter color scheme: green only for clean files, orange-to-red for any issues
93
+ */
94
+ export declare function createPrettierHighlightLayers(buildings: CityBuilding[], prettierMetrics: FileMetricData[]): HighlightLayer[];
95
+ /**
96
+ * Create Biome Format highlight layers
97
+ * Uses a stricter color scheme: green only for clean files, orange-to-red for any issues
98
+ */
99
+ export declare function createBiomeFormatHighlightLayers(buildings: CityBuilding[], biomeFormatMetrics: FileMetricData[]): HighlightLayer[];
100
+ /**
101
+ * Create Knip highlight layers
102
+ * Uses a stricter color scheme: green only for clean files, orange-to-red for any issues
103
+ */
104
+ export declare function createKnipHighlightLayers(buildings: CityBuilding[], knipMetrics: FileMetricData[]): HighlightLayer[];
105
+ /**
106
+ * Create Alexandria highlight layers
107
+ * Simple scheme: green = documented, red = needs docs, gray = not applicable
108
+ */
109
+ export declare function createAlexandriaHighlightLayers(buildings: CityBuilding[], alexandriaMetrics: FileMetricData[]): HighlightLayer[];
110
+ /**
111
+ * Check if quality data is available for a given color mode
112
+ */
113
+ export declare function isColorModeAvailable(mode: ColorMode, qualityData: QualitySliceData | null | undefined, hasGitData: boolean): boolean;
114
+ /**
115
+ * Get highlight layers for a given color mode.
116
+ * Uses specialized layer generators for known lenses, falls back to generic metric layers.
117
+ */
118
+ export declare function getLayersForColorMode(mode: ColorMode, buildings: CityBuilding[], qualityData: QualitySliceData | null | undefined, fileColorLayers: HighlightLayer[], gitLayers: HighlightLayer[]): HighlightLayer[];
119
+ //# sourceMappingURL=qualityLayers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualityLayers.d.ts","sourceRoot":"","sources":["../../../src/panels/utils/qualityLayers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC7F,OAAO,EACL,KAAK,SAAS,IAAI,gBAAgB,EAClC,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAKtB,MAAM,qCAAqC,CAAC;AAG7C,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC;AAGjF,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC;AAG1C,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,WAAW,GAAG,KAAK,GAAG,IAAI,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEhG;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,eAAe,EAAE,CAE1D;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,eAAe,EAA6B,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,eAAe,EAEhD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,eAAe,EAEhD,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,kEAAkE;IAClE,YAAY,CAAC,EAAE,SAAS,EAAE,CAAC;IAC3B,yEAAyE;IACzE,iBAAiB,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACrC,iDAAiD;IACjD,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAA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,EAAE,YAAY,EAAE,EACzB,WAAW,EAAE,cAAc,EAAE,GAC5B,cAAc,EAAE,CA6GlB;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,YAAY,EAAE,EACzB,iBAAiB,EAAE,cAAc,EAAE,GAClC,cAAc,EAAE,CAuElB;AAmBD;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,SAAS,EACf,WAAW,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,EAChD,UAAU,EAAE,OAAO,GAClB,OAAO,CAmBT;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,YAAY,EAAE,EACzB,WAAW,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,EAChD,eAAe,EAAE,cAAc,EAAE,EACjC,SAAS,EAAE,cAAc,EAAE,GAC1B,cAAc,EAAE,CA4ClB"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Panel Tools
3
+ *
4
+ * UTCP-compatible tools for the File City panel extension.
5
+ * These tools can be invoked by AI agents and emit events that panels listen for.
6
+ *
7
+ * IMPORTANT: This file should NOT import any React components to ensure
8
+ * it can be imported server-side without pulling in React dependencies.
9
+ * Use the './tools' subpath export for server-safe imports.
10
+ */
11
+ import type { PanelTool, PanelToolsMetadata } from '@principal-ade/utcp-panel-event';
12
+ /**
13
+ * Tool: Focus Building
14
+ */
15
+ export declare const focusBuildingTool: PanelTool;
16
+ /**
17
+ * Tool: Select District
18
+ */
19
+ export declare const selectDistrictTool: PanelTool;
20
+ /**
21
+ * Tool: Reset View
22
+ */
23
+ export declare const resetViewTool: PanelTool;
24
+ /**
25
+ * All tools exported as an array.
26
+ */
27
+ export declare const codeCityPanelTools: PanelTool[];
28
+ /**
29
+ * Panel tools metadata for registration with PanelToolRegistry.
30
+ */
31
+ export declare const codeCityPanelToolsMetadata: PanelToolsMetadata;
32
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,SA6B/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SA6BhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,SAuB3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,EAIzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,kBAKxC,CAAC"}
@@ -0,0 +1,103 @@
1
+ // src/tools/index.ts
2
+ var focusBuildingTool = {
3
+ name: "focus_building",
4
+ description: "Focuses the camera on a specific file (building) in the file city visualization",
5
+ inputs: {
6
+ type: "object",
7
+ properties: {
8
+ filePath: {
9
+ type: "string",
10
+ description: "Path to the file to focus on"
11
+ },
12
+ animate: {
13
+ type: "boolean",
14
+ description: "Whether to animate the camera transition"
15
+ }
16
+ },
17
+ required: ["filePath"]
18
+ },
19
+ outputs: {
20
+ type: "object",
21
+ properties: {
22
+ success: { type: "boolean" },
23
+ message: { type: "string" }
24
+ }
25
+ },
26
+ tags: ["navigation", "camera", "focus"],
27
+ tool_call_template: {
28
+ call_template_type: "panel_event",
29
+ event_type: "industry-theme.file-city-panel:focus-building"
30
+ }
31
+ };
32
+ var selectDistrictTool = {
33
+ name: "select_district",
34
+ description: "Selects and highlights a directory (district) in the file city visualization",
35
+ inputs: {
36
+ type: "object",
37
+ properties: {
38
+ directoryPath: {
39
+ type: "string",
40
+ description: "Path to the directory to select"
41
+ },
42
+ expandChildren: {
43
+ type: "boolean",
44
+ description: "Whether to expand and show child buildings"
45
+ }
46
+ },
47
+ required: ["directoryPath"]
48
+ },
49
+ outputs: {
50
+ type: "object",
51
+ properties: {
52
+ success: { type: "boolean" },
53
+ selectedDistrict: { type: "string" }
54
+ }
55
+ },
56
+ tags: ["selection", "district", "directory"],
57
+ tool_call_template: {
58
+ call_template_type: "panel_event",
59
+ event_type: "industry-theme.file-city-panel:select-district"
60
+ }
61
+ };
62
+ var resetViewTool = {
63
+ name: "reset_view",
64
+ description: "Resets the file city view to the default camera position",
65
+ inputs: {
66
+ type: "object",
67
+ properties: {
68
+ animate: {
69
+ type: "boolean",
70
+ description: "Whether to animate the camera reset"
71
+ }
72
+ }
73
+ },
74
+ outputs: {
75
+ type: "object",
76
+ properties: {
77
+ success: { type: "boolean" }
78
+ }
79
+ },
80
+ tags: ["navigation", "camera", "reset"],
81
+ tool_call_template: {
82
+ call_template_type: "panel_event",
83
+ event_type: "industry-theme.file-city-panel:reset-view"
84
+ }
85
+ };
86
+ var codeCityPanelTools = [
87
+ focusBuildingTool,
88
+ selectDistrictTool,
89
+ resetViewTool
90
+ ];
91
+ var codeCityPanelToolsMetadata = {
92
+ id: "industry-theme.file-city-panel",
93
+ name: "File City Panel",
94
+ description: "Tools provided by the file city visualization panel extension",
95
+ tools: codeCityPanelTools
96
+ };
97
+ export {
98
+ selectDistrictTool,
99
+ resetViewTool,
100
+ focusBuildingTool,
101
+ codeCityPanelToolsMetadata,
102
+ codeCityPanelTools
103
+ };
@@ -0,0 +1,132 @@
1
+ /**
2
+ * FileCityExplorerPanel — actions, context, and slice data types.
3
+ *
4
+ * Mirrors the per-panel pattern already used by `CodeCityPanelContext` /
5
+ * `FeedCodeCityPanelContext`, but with two differences spelled out in
6
+ * `docs/FILE_CITY_EXPLORER_PORT.md`:
7
+ *
8
+ * 1. Actions are panel-private (`FileCityExplorerPanelActions`), not
9
+ * added to the shared `PanelActions` umbrella. Mis-wiring surfaces at
10
+ * compile time on this panel only.
11
+ * 2. Every action and every slice is required. Nullability lives on the
12
+ * slice's data, not on the slice itself — the explorer reads
13
+ * `context.scopeWorkspace.data?.scopes` rather than guarding both the
14
+ * slice and its data. "Feature disabled" hosts wire the slice with
15
+ * permanent `data: null`; the corresponding UI never mounts and the
16
+ * paired action is unreachable.
17
+ */
18
+ import type { PanelActions as CorePanelActions, PanelComponentProps as CorePanelComponentProps, DataSlice } from '@principal-ade/panel-framework-core';
19
+ import type { FileTree, GitStatusWithFiles } from '@principal-ai/repository-abstraction';
20
+ import type { ProjectArea } from '@principal-ai/principal-view-core';
21
+ import type { ScopeWorkspace } from './Scope';
22
+ import type { SequenceDiagramPayload, SequenceNote, SequenceNoteDraft } from './SequenceDiagram';
23
+ import type { LineCountsSliceData } from './index';
24
+ /**
25
+ * Latest-commit metadata. Replaces the electron-only `useLatestCommit` hook
26
+ * — the host fetches once and on `git:committed` events, exposes the result
27
+ * here.
28
+ */
29
+ export interface LatestCommitFileEntry {
30
+ path: string;
31
+ status: 'A' | 'M' | 'D' | 'R' | 'C';
32
+ }
33
+ export interface LatestCommitSliceData {
34
+ sha: string;
35
+ subject: string;
36
+ author: string;
37
+ /** ISO 8601. */
38
+ authoredAt: string;
39
+ filesChanged: number;
40
+ additions: number;
41
+ deletions: number;
42
+ files: LatestCommitFileEntry[];
43
+ }
44
+ /**
45
+ * Area-workspace slice. Wraps `ProjectArea[]` so the slice signal is "no
46
+ * areas loaded yet" (`data: null`) vs. "loaded, possibly empty"
47
+ * (`data.areas = []`). `AuxiliaryManifest` from principal-view-core is the
48
+ * on-disk superset; this slim shape is what the panel actually reads.
49
+ */
50
+ export interface AreaWorkspace {
51
+ areas: ProjectArea[];
52
+ }
53
+ /**
54
+ * Identifier for the repository the panel is currently looking at. All
55
+ * three fields are optional because hosts cover different cases:
56
+ * - electron has an absolute filesystem `path`;
57
+ * - web hosts have `owner`/`name` from GitHub but no local path;
58
+ * - storybook may have neither.
59
+ */
60
+ export interface FileCityExplorerRepository {
61
+ path?: string | null;
62
+ owner?: string | null;
63
+ name?: string | null;
64
+ }
65
+ export interface FileCityExplorerPanelContext {
66
+ /** Required, always-loaded — the panel cannot render without a tree. */
67
+ fileTree: DataSlice<FileTree>;
68
+ /** Working-tree changes. `data: null` means "host doesn't expose git
69
+ * status" (web tour-only viewer) or "not loaded yet". */
70
+ gitStatusWithFiles: DataSlice<GitStatusWithFiles | null>;
71
+ /** Per-file line counts for building heights. */
72
+ lineCounts: DataSlice<LineCountsSliceData | null>;
73
+ /** Latest commit. Drives the floating `RecentCommitCard`. */
74
+ latestCommit: DataSlice<LatestCommitSliceData | null>;
75
+ /** Scopes workspace. `data: null` hides the Scopes tab and the
76
+ * `addToScope` action becomes unreachable. */
77
+ scopeWorkspace: DataSlice<ScopeWorkspace | null>;
78
+ /** Areas workspace. Same gating story as scopes. */
79
+ areaWorkspace: DataSlice<AreaWorkspace | null>;
80
+ /** Active sequence-diagram payload. Drives the sequence overlays. */
81
+ sequenceDiagram: DataSlice<SequenceDiagramPayload | null>;
82
+ /** Repository identifier — not a slice. */
83
+ repository: FileCityExplorerRepository | null;
84
+ }
85
+ export interface AddToScopeActionInput {
86
+ scopeName: string;
87
+ /** Omit to add at scope level (no namespace). */
88
+ namespaceName?: string;
89
+ paths: string[];
90
+ description?: string;
91
+ /** Pre-picked color for new namespaces. Use `pickNamespaceColor()` from
92
+ * the explorer's `layers.ts` to get a unique-in-workspace color. */
93
+ namespaceColor?: string;
94
+ }
95
+ export interface AddAreaActionInput {
96
+ name: string;
97
+ description?: string;
98
+ paths: string[];
99
+ }
100
+ export interface AddPathToAreaActionInput {
101
+ areaName: string;
102
+ path: string;
103
+ }
104
+ export interface FileCityExplorerPanelActions extends CorePanelActions {
105
+ /** Open a file in the host's active editor. */
106
+ openFile: (filePath: string, line?: number) => void;
107
+ /** Read a file's text content. Path may be absolute (electron) or
108
+ * repo-relative (web) — host normalizes. */
109
+ readFile: (path: string) => Promise<string>;
110
+ /** Unified-diff text for a single commit. The host's closure binds
111
+ * the repository identifier; the panel only knows the commit hash. */
112
+ getCommitDiff: (commitHash: string) => Promise<string>;
113
+ /** Unified-diff text for the current working tree. */
114
+ getWorkingTreeDiff: () => Promise<string>;
115
+ /** Mirror of `ScopeManager.addToScope` — single entry point, host
116
+ * decides whether to create scope/namespace or extend existing.
117
+ * Reachable only when `context.scopeWorkspace.data !== null`. */
118
+ addToScope: (input: AddToScopeActionInput) => Promise<void>;
119
+ /** Reachable only when `context.areaWorkspace.data !== null`. */
120
+ addArea: (input: AddAreaActionInput) => Promise<void>;
121
+ addPathToArea: (input: AddPathToAreaActionInput) => Promise<void>;
122
+ /** Persist a new note on the active payload. Returns the saved note
123
+ * (host fills id + timestamps), or `null` if the host couldn't
124
+ * persist (e.g. transient backend failure). */
125
+ createSequenceNote: (payloadId: string, draft: SequenceNoteDraft) => Promise<SequenceNote | null>;
126
+ /** Update a note's body. Returns the updated note. */
127
+ updateSequenceNote: (payloadId: string, noteId: string, body: string) => Promise<SequenceNote | null>;
128
+ /** Delete a note. */
129
+ deleteSequenceNote: (payloadId: string, noteId: string) => Promise<void>;
130
+ }
131
+ export type FileCityExplorerPanelPropsTyped = CorePanelComponentProps<FileCityExplorerPanelActions, FileCityExplorerPanelContext>;
132
+ //# sourceMappingURL=FileCityExplorerPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileCityExplorerPanel.d.ts","sourceRoot":"","sources":["../../src/types/FileCityExplorerPanel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,YAAY,IAAI,gBAAgB,EAChC,mBAAmB,IAAI,uBAAuB,EAC9C,SAAS,EACV,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EACV,QAAQ,EACR,kBAAkB,EACnB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EACV,sBAAsB,EACtB,YAAY,EACZ,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO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