@industry-theme/file-city-panel 0.2.70 → 0.2.73
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.
- package/dist/components/ContextContainer.d.ts +38 -0
- package/dist/components/ContextContainer.d.ts.map +1 -0
- package/dist/components/TourPlayer.d.ts +31 -0
- package/dist/components/TourPlayer.d.ts.map +1 -0
- package/dist/components/TourPlayer.stories.d.ts +56 -0
- package/dist/components/TourPlayer.stories.d.ts.map +1 -0
- package/dist/components/TourPlayerIntegration.d.ts +23 -0
- package/dist/components/TourPlayerIntegration.d.ts.map +1 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useTourPlayer.d.ts +55 -0
- package/dist/hooks/useTourPlayer.d.ts.map +1 -0
- package/dist/panels/CodeCityPanel.d.ts +9 -0
- package/dist/panels/CodeCityPanel.d.ts.map +1 -1
- package/dist/panels/CodeCityPanel.stories.d.ts +4 -0
- package/dist/panels/CodeCityPanel.stories.d.ts.map +1 -1
- package/dist/panels/components/CoverEditor.d.ts +22 -0
- package/dist/panels/components/CoverEditor.d.ts.map +1 -0
- package/dist/panels/components/Legend.d.ts.map +1 -1
- package/dist/panels/components/LegendTabs.d.ts +1 -0
- package/dist/panels/components/LegendTabs.d.ts.map +1 -1
- package/dist/panels/index.d.ts +5 -0
- package/dist/panels/index.d.ts.map +1 -0
- package/dist/panels/utils/qualityLayers.d.ts +2 -14
- package/dist/panels/utils/qualityLayers.d.ts.map +1 -1
- package/dist/panels.bundle.js +36921 -1375
- package/dist/panels.bundle.js.map +1 -1
- package/dist/types/IntroductionTour.d.ts +108 -0
- package/dist/types/IntroductionTour.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/tourParser.d.ts +46 -0
- package/dist/utils/tourParser.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Introduction Tour Configuration
|
|
3
|
+
*
|
|
4
|
+
* Defines a guided tour through a codebase using the File City visualization.
|
|
5
|
+
* Each step can focus on specific directories, highlight files, and provide
|
|
6
|
+
* educational context to help new developers understand the codebase structure.
|
|
7
|
+
*/
|
|
8
|
+
import type { LayerItem } from '@principal-ai/file-city-react';
|
|
9
|
+
/**
|
|
10
|
+
* A single step in the introduction tour
|
|
11
|
+
*/
|
|
12
|
+
export interface IntroductionTourStep {
|
|
13
|
+
/** Unique identifier for this step */
|
|
14
|
+
id: string;
|
|
15
|
+
/** Step title shown to the user */
|
|
16
|
+
title: string;
|
|
17
|
+
/** Detailed description of what this step shows */
|
|
18
|
+
description: string;
|
|
19
|
+
/** Optional estimated time to read/understand this step (in seconds) */
|
|
20
|
+
estimatedTime?: number;
|
|
21
|
+
/** Directory to focus on (will zoom and highlight this directory) */
|
|
22
|
+
focusDirectory?: string;
|
|
23
|
+
/** Highlight layers to show during this step */
|
|
24
|
+
highlightLayers?: HighlightLayerConfig[];
|
|
25
|
+
/** Specific files to highlight or point out */
|
|
26
|
+
highlightFiles?: string[];
|
|
27
|
+
/** Color mode to use for this step (fileTypes, git, coverage, etc.) */
|
|
28
|
+
colorMode?: 'fileTypes' | 'git' | 'pr' | 'commit' | 'coverage' | 'eslint' | 'typescript' | 'prettier' | 'knip' | 'alexandria';
|
|
29
|
+
/** Interactive actions the user should take */
|
|
30
|
+
interactiveActions?: InteractiveAction[];
|
|
31
|
+
/** Links to related documentation or resources */
|
|
32
|
+
resources?: TourResource[];
|
|
33
|
+
/** Whether to automatically advance to the next step */
|
|
34
|
+
autoAdvance?: boolean;
|
|
35
|
+
/** Duration before auto-advancing (in ms) */
|
|
36
|
+
autoAdvanceDelay?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Configuration for a highlight layer in a tour step
|
|
40
|
+
* Uses LayerItem from the file-city-react library for full compatibility
|
|
41
|
+
*/
|
|
42
|
+
export interface HighlightLayerConfig {
|
|
43
|
+
/** Layer identifier */
|
|
44
|
+
id: string;
|
|
45
|
+
/** Display name */
|
|
46
|
+
name: string;
|
|
47
|
+
/** Color for the highlight (hex) */
|
|
48
|
+
color: string;
|
|
49
|
+
/** Files/directories to include in this layer - uses LayerItem from file-city-react */
|
|
50
|
+
items: LayerItem[];
|
|
51
|
+
/** Opacity (0-1) */
|
|
52
|
+
opacity?: number;
|
|
53
|
+
/** Border width in pixels */
|
|
54
|
+
borderWidth?: number;
|
|
55
|
+
/** Render strategy */
|
|
56
|
+
renderStrategy?: 'fill' | 'border' | 'cover';
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Interactive action for user engagement
|
|
60
|
+
*/
|
|
61
|
+
export interface InteractiveAction {
|
|
62
|
+
/** Action type */
|
|
63
|
+
type: 'click-file' | 'hover-directory' | 'toggle-layer' | 'explore';
|
|
64
|
+
/** Action description */
|
|
65
|
+
description: string;
|
|
66
|
+
/** Target path or identifier */
|
|
67
|
+
target?: string;
|
|
68
|
+
/** Whether this action is required to proceed */
|
|
69
|
+
required?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Resource link for additional context
|
|
73
|
+
*/
|
|
74
|
+
export interface TourResource {
|
|
75
|
+
/** Resource title */
|
|
76
|
+
title: string;
|
|
77
|
+
/** URL or file path */
|
|
78
|
+
url: string;
|
|
79
|
+
/** Resource type */
|
|
80
|
+
type: 'documentation' | 'video' | 'article' | 'code';
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Complete introduction tour configuration
|
|
84
|
+
*/
|
|
85
|
+
export interface IntroductionTour {
|
|
86
|
+
/** Tour unique identifier */
|
|
87
|
+
id: string;
|
|
88
|
+
/** Tour title */
|
|
89
|
+
title: string;
|
|
90
|
+
/** Tour description/overview */
|
|
91
|
+
description: string;
|
|
92
|
+
/** Tour version (for tracking updates) */
|
|
93
|
+
version: string;
|
|
94
|
+
/** Target audience (beginner, intermediate, advanced) */
|
|
95
|
+
audience?: 'beginner' | 'intermediate' | 'advanced';
|
|
96
|
+
/** Prerequisites or required knowledge */
|
|
97
|
+
prerequisites?: string[];
|
|
98
|
+
/** Ordered list of steps */
|
|
99
|
+
steps: IntroductionTourStep[];
|
|
100
|
+
/** Tour metadata */
|
|
101
|
+
metadata?: {
|
|
102
|
+
author?: string;
|
|
103
|
+
createdAt?: string;
|
|
104
|
+
updatedAt?: string;
|
|
105
|
+
tags?: string[];
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=IntroductionTour.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntroductionTour.d.ts","sourceRoot":"","sources":["../../src/types/IntroductionTour.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IAEX,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IAEd,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IAEpB,wEAAwE;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,gDAAgD;IAChD,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAEzC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B,uEAAuE;IACvE,SAAS,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,IAAI,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,YAAY,CAAC;IAE9H,+CAA+C;IAC/C,kB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,CAAC;IAEd,gCAAgC;IAChC,WAAW,EAAE,MAAM,CAAC;IAEpB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAEhB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,UAAU,GAAG,cAAc,GAAG,UAAU,CAAC;IAEpD,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAEzB,4BAA4B;IAC5B,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAE9B,oBAAoB;IACpB,QAAQ,CAAC,EAAE;QACT,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC;CACH"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export type { DataSlice, WorkspaceMetadata, RepositoryMetadata, FileTreeSource, ActiveFileSlice, PanelEventType, PanelEvent, PanelEventEmitter, PanelActions, PanelContextValue, PanelComponentProps, PanelMetadata, PanelLifecycleHooks, PanelDefinition, PanelModule, PanelRegistryEntry, PanelLoader, PanelRegistryConfig, } from '@principal-ade/panel-framework-core';
|
|
7
7
|
export type { FileCityColorModesSliceData, QualitySliceData, ColorMode, ColorModeConfig, FileMetricData, HighlightLayer, } from '../panels/utils/qualityLayers';
|
|
8
|
+
export type { IntroductionTour, IntroductionTourStep, HighlightLayerConfig, InteractiveAction, TourResource, } from './IntroductionTour';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EAEV,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EAGf,cAAc,EACd,UAAU,EACV,iBAAiB,EAGjB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EAGnB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,WAAW,EAGX,kBAAkB,EAClB,WAAW,EACX,mBAAmB,GACpB,MAAM,qCAAqC,CAAC;AAG7C,YAAY,EACV,2BAA2B,EAC3B,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,cAAc,EACd,cAAc,GACf,MAAM,+BAA+B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EAEV,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EAGf,cAAc,EACd,UAAU,EACV,iBAAiB,EAGjB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EAGnB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,WAAW,EAGX,kBAAkB,EAClB,WAAW,EACX,mBAAmB,GACpB,MAAM,qCAAqC,CAAC;AAG7C,YAAY,EACV,2BAA2B,EAC3B,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,cAAc,EACd,cAAc,GACf,MAAM,+BAA+B,CAAC;AAGvC,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,GACb,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { IntroductionTour } from '../types/IntroductionTour';
|
|
2
|
+
/**
|
|
3
|
+
* Validation error for tour parsing
|
|
4
|
+
*/
|
|
5
|
+
export declare class TourValidationError extends Error {
|
|
6
|
+
readonly field?: string | undefined;
|
|
7
|
+
readonly value?: unknown | undefined;
|
|
8
|
+
constructor(message: string, field?: string | undefined, value?: unknown | undefined);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Result of tour parsing
|
|
12
|
+
*/
|
|
13
|
+
export interface TourParseResult {
|
|
14
|
+
success: boolean;
|
|
15
|
+
tour?: IntroductionTour;
|
|
16
|
+
errors?: TourValidationError[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Parses and validates a tour JSON string
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseTour(jsonString: string): TourParseResult;
|
|
22
|
+
/**
|
|
23
|
+
* Parses tour JSON with a simplified API that throws on error
|
|
24
|
+
*/
|
|
25
|
+
export declare function parseTourOrThrow(jsonString: string): IntroductionTour;
|
|
26
|
+
/**
|
|
27
|
+
* Finds *.tour.json file in a file tree
|
|
28
|
+
* Returns the file content if found, null otherwise
|
|
29
|
+
* If multiple tour files exist, returns the first one found (alphabetically)
|
|
30
|
+
*/
|
|
31
|
+
export declare function findTourInFileTree(fileTree: {
|
|
32
|
+
allFiles: Array<{
|
|
33
|
+
path: string;
|
|
34
|
+
content?: string;
|
|
35
|
+
}>;
|
|
36
|
+
}): string | null;
|
|
37
|
+
/**
|
|
38
|
+
* Convenience function to find and parse *.tour.json from a file tree
|
|
39
|
+
*/
|
|
40
|
+
export declare function loadTourFromFileTree(fileTree: {
|
|
41
|
+
allFiles: Array<{
|
|
42
|
+
path: string;
|
|
43
|
+
content?: string;
|
|
44
|
+
}>;
|
|
45
|
+
}): TourParseResult;
|
|
46
|
+
//# sourceMappingURL=tourParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tourParser.d.ts","sourceRoot":"","sources":["../../src/utils/tourParser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAwB,MAAM,2BAA2B,CAAC;AAExF;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;aAG1B,KAAK,CAAC,EAAE,MAAM;aACd,KAAK,CAAC,EAAE,OAAO;gBAF/B,OAAO,EAAE,MAAM,EACC,KAAK,CAAC,EAAE,MAAM,YAAA,EACd,KAAK,CAAC,EAAE,OAAO,YAAA;CAKlC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,MAAM,CAAC,EAAE,mBAAmB,EAAE,CAAC;CAChC;AAkRD;;GAEG;AACH,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,CAoC7D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,CASrE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,GAAG,MAAM,GAAG,IAAI,CAgBnH;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE;IAC7C,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrD,GAAG,eAAe,CAWlB"}
|
package/package.json
CHANGED