@industry-theme/file-city-panel 0.3.10 → 0.3.12
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/TourPlayer.d.ts +6 -2
- package/dist/components/TourPlayer.d.ts.map +1 -1
- package/dist/components/TourPlayer.stories.d.ts.map +1 -1
- package/dist/panels/CodeCityPanel.d.ts.map +1 -1
- package/dist/panels.bundle.js +60 -22
- package/dist/panels.bundle.js.map +1 -1
- package/dist/types/index.d.ts +19 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { IntroductionTour, IntroductionTourStep } from '@principal-ai/file-city-builder';
|
|
3
|
+
import type { TourAudioContext } from '../types/TextToSpeech';
|
|
4
|
+
import type { PanelActions } from '../types';
|
|
3
5
|
export interface TourPlayerProps {
|
|
4
6
|
/** The introduction tour to play */
|
|
5
7
|
tour: IntroductionTour;
|
|
@@ -20,8 +22,10 @@ export interface TourPlayerProps {
|
|
|
20
22
|
position?: 'top' | 'bottom' | 'overlay' | 'left' | 'right';
|
|
21
23
|
/** Skip welcome screen and start playing immediately */
|
|
22
24
|
skipWelcome?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
+
/** Context for fetching tour audio (owner, repo, path, commitSha). Used with actions.fetchAudioUrls. */
|
|
26
|
+
tourAudioContext?: TourAudioContext;
|
|
27
|
+
/** Panel actions (provided by host). Used to fetch audio URLs via actions.fetchAudioUrls. */
|
|
28
|
+
actions?: PanelActions;
|
|
25
29
|
/** Auto-play audio when step changes (default: false) */
|
|
26
30
|
autoPlayAudio?: boolean;
|
|
27
31
|
/** Auto-advance to next step when audio ends (default: false) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TourPlayer.d.ts","sourceRoot":"","sources":["../../src/components/TourPlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,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;IACjE,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAijChD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TourPlayer.stories.d.ts","sourceRoot":"","sources":["../../src/components/TourPlayer.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"TourPlayer.stories.d.ts","sourceRoot":"","sources":["../../src/components/TourPlayer.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA4J1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAgBjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAM3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAsCvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAqCxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAqCtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAqCzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAqC7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAmFpC,CAAC;AAEF;;;GAGG;AACH,eAAO,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C,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE;QACb,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC;IACF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAGD,YAAY,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAmCpF;;GAEG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAorEvD,CAAC;AAEF;;;GAGG;AACH,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAEvD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EA8BxC,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -51265,7 +51265,8 @@ const TourPlayer = ({
|
|
|
51265
51265
|
visible = true,
|
|
51266
51266
|
position,
|
|
51267
51267
|
skipWelcome = false,
|
|
51268
|
-
|
|
51268
|
+
tourAudioContext,
|
|
51269
|
+
actions,
|
|
51269
51270
|
autoPlayAudio = false,
|
|
51270
51271
|
autoAdvanceOnAudioEnd = false,
|
|
51271
51272
|
autoAdvanceDelay = 1e3
|
|
@@ -51275,6 +51276,7 @@ const TourPlayer = ({
|
|
|
51275
51276
|
const [completedSteps, setCompletedSteps] = useState(/* @__PURE__ */ new Set());
|
|
51276
51277
|
const [isPlaying, setIsPlaying] = useState(skipWelcome);
|
|
51277
51278
|
const [autoAdvanceTimeRemaining, setAutoAdvanceTimeRemaining] = useState(null);
|
|
51279
|
+
const [audioUrls, setAudioUrls] = useState();
|
|
51278
51280
|
const [isAudioPlaying, setIsAudioPlaying] = useState(false);
|
|
51279
51281
|
const [isAudioPaused, setIsAudioPaused] = useState(false);
|
|
51280
51282
|
const [audioDuration, setAudioDuration] = useState(0);
|
|
@@ -51346,6 +51348,18 @@ const TourPlayer = ({
|
|
|
51346
51348
|
},
|
|
51347
51349
|
[onInteractiveAction]
|
|
51348
51350
|
);
|
|
51351
|
+
useEffect(() => {
|
|
51352
|
+
if (!(actions == null ? void 0 : actions.fetchAudioUrls) || !tourAudioContext) return;
|
|
51353
|
+
async function loadAudio() {
|
|
51354
|
+
try {
|
|
51355
|
+
const urls = await actions.fetchAudioUrls(tourAudioContext);
|
|
51356
|
+
setAudioUrls(urls);
|
|
51357
|
+
} catch (error) {
|
|
51358
|
+
console.error("[TourPlayer] Failed to fetch audio URLs:", error);
|
|
51359
|
+
}
|
|
51360
|
+
}
|
|
51361
|
+
loadAudio();
|
|
51362
|
+
}, [actions, tourAudioContext]);
|
|
51349
51363
|
useEffect(() => {
|
|
51350
51364
|
return () => {
|
|
51351
51365
|
if (audioElementRef.current) {
|
|
@@ -53920,7 +53934,7 @@ const CodeCityPanelContent = ({
|
|
|
53920
53934
|
actions: _actions,
|
|
53921
53935
|
events
|
|
53922
53936
|
}) => {
|
|
53923
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;
|
|
53937
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
|
|
53924
53938
|
const { theme: theme2 } = useTheme();
|
|
53925
53939
|
const [cityData, setCityData] = useState(null);
|
|
53926
53940
|
const [hoverInfo, setHoverInfo] = useState(null);
|
|
@@ -53932,6 +53946,7 @@ const CodeCityPanelContent = ({
|
|
|
53932
53946
|
const [showTourPlayer, setShowTourPlayer] = useState(false);
|
|
53933
53947
|
const [currentTourStepIndex, setCurrentTourStepIndex] = useState(0);
|
|
53934
53948
|
const [tourData, setTourData] = useState(null);
|
|
53949
|
+
const [tourFilePath, setTourFilePath] = useState(null);
|
|
53935
53950
|
const [tourHighlightLayers, setTourHighlightLayers] = useState([]);
|
|
53936
53951
|
const [tourColorMode, setTourColorMode] = useState(null);
|
|
53937
53952
|
const sliceSelectedColorMode = (_b = (_a = context.getSlice("fileCityColorModes")) == null ? void 0 : _a.data) == null ? void 0 : _b.selectedColorMode;
|
|
@@ -54014,33 +54029,38 @@ const CodeCityPanelContent = ({
|
|
|
54014
54029
|
}
|
|
54015
54030
|
const loadTour = async () => {
|
|
54016
54031
|
var _a3;
|
|
54017
|
-
const
|
|
54018
|
-
if (!
|
|
54032
|
+
const foundTourFilePath = findTourFilePathInFileTree(fileTreeSlice.data);
|
|
54033
|
+
if (!foundTourFilePath) {
|
|
54019
54034
|
setTourData(null);
|
|
54035
|
+
setTourFilePath(null);
|
|
54020
54036
|
return;
|
|
54021
54037
|
}
|
|
54022
54038
|
if (!((_a3 = context.adapters) == null ? void 0 : _a3.readFile)) {
|
|
54023
54039
|
console.warn("[Tour] No readFile adapter available - cannot load tour file");
|
|
54024
54040
|
setTourData(null);
|
|
54041
|
+
setTourFilePath(null);
|
|
54025
54042
|
return;
|
|
54026
54043
|
}
|
|
54027
54044
|
const repoPath = context.currentScope.repository.path;
|
|
54028
|
-
const fullPath = `${repoPath}/${
|
|
54045
|
+
const fullPath = `${repoPath}/${foundTourFilePath}`;
|
|
54029
54046
|
try {
|
|
54030
54047
|
const tourContent = await context.adapters.readFile(fullPath);
|
|
54031
54048
|
const tourResult = parseTour(tourContent);
|
|
54032
54049
|
if (tourResult.success && tourResult.tour) {
|
|
54033
|
-
console.log("[Tour] Found and parsed tour file:", tourResult.tour.title, `(${
|
|
54050
|
+
console.log("[Tour] Found and parsed tour file:", tourResult.tour.title, `(${foundTourFilePath})`);
|
|
54034
54051
|
setTourData(tourResult.tour);
|
|
54052
|
+
setTourFilePath(foundTourFilePath);
|
|
54035
54053
|
} else {
|
|
54036
54054
|
if (tourResult.errors && tourResult.errors.length > 0) {
|
|
54037
54055
|
console.warn("[Tour] Tour validation failed:", tourResult.errors.map((e) => e.message).join(", "));
|
|
54038
54056
|
}
|
|
54039
54057
|
setTourData(null);
|
|
54058
|
+
setTourFilePath(null);
|
|
54040
54059
|
}
|
|
54041
54060
|
} catch (error) {
|
|
54042
54061
|
console.warn("[Tour] Failed to read tour file:", error instanceof Error ? error.message : "Unknown error");
|
|
54043
54062
|
setTourData(null);
|
|
54063
|
+
setTourFilePath(null);
|
|
54044
54064
|
}
|
|
54045
54065
|
};
|
|
54046
54066
|
loadTour();
|
|
@@ -55069,6 +55089,22 @@ const CodeCityPanelContent = ({
|
|
|
55069
55089
|
}
|
|
55070
55090
|
return layers;
|
|
55071
55091
|
}, [highlightLayers, gitTreeHoverLayer, selectedFileLayer, previewCoverLayer, hoveredPackagePath, selectedPackagePath, isFileInPackage, tourHighlightLayers]);
|
|
55092
|
+
const tourAudioContext = useMemo(() => {
|
|
55093
|
+
var _a2, _b2, _c2;
|
|
55094
|
+
if (!tourFilePath) return void 0;
|
|
55095
|
+
const githubRepo = (_a2 = context.currentScope.repository) == null ? void 0 : _a2.githubRepo;
|
|
55096
|
+
if (!githubRepo || !githubRepo.includes("/")) return void 0;
|
|
55097
|
+
const [owner, repo] = githubRepo.split("/");
|
|
55098
|
+
if (!owner || !repo) return void 0;
|
|
55099
|
+
const commitSha = (_c2 = (_b2 = fileTreeSlice == null ? void 0 : fileTreeSlice.data) == null ? void 0 : _b2.metadata) == null ? void 0 : _c2.sourceSha;
|
|
55100
|
+
if (!commitSha) return void 0;
|
|
55101
|
+
return {
|
|
55102
|
+
owner,
|
|
55103
|
+
repo,
|
|
55104
|
+
path: tourFilePath,
|
|
55105
|
+
commitSha
|
|
55106
|
+
};
|
|
55107
|
+
}, [tourFilePath, context.currentScope.repository, (_l = (_k = fileTreeSlice == null ? void 0 : fileTreeSlice.data) == null ? void 0 : _k.metadata) == null ? void 0 : _l.sourceSha]);
|
|
55072
55108
|
return /* @__PURE__ */ jsxs(
|
|
55073
55109
|
"div",
|
|
55074
55110
|
{
|
|
@@ -55443,7 +55479,7 @@ const CodeCityPanelContent = ({
|
|
|
55443
55479
|
textOverflow: "ellipsis",
|
|
55444
55480
|
whiteSpace: "nowrap"
|
|
55445
55481
|
},
|
|
55446
|
-
children: ((
|
|
55482
|
+
children: ((_m = hoverInfo.fileTooltip) == null ? void 0 : _m.text) || ((_o = (_n = hoverInfo.hoveredDistrict) == null ? void 0 : _n.path) == null ? void 0 : _o.split("/").pop()) || ((_p = hoverInfo.hoveredDistrict) == null ? void 0 : _p.path) || "Unknown"
|
|
55447
55483
|
}
|
|
55448
55484
|
),
|
|
55449
55485
|
/* @__PURE__ */ jsx(
|
|
@@ -55457,7 +55493,7 @@ const CodeCityPanelContent = ({
|
|
|
55457
55493
|
textOverflow: "ellipsis",
|
|
55458
55494
|
whiteSpace: "nowrap"
|
|
55459
55495
|
},
|
|
55460
|
-
children: ((
|
|
55496
|
+
children: ((_q = hoverInfo.hoveredBuilding) == null ? void 0 : _q.path) || ((_r = hoverInfo.hoveredDistrict) == null ? void 0 : _r.path) || "/"
|
|
55461
55497
|
}
|
|
55462
55498
|
)
|
|
55463
55499
|
]
|
|
@@ -55566,6 +55602,8 @@ const CodeCityPanelContent = ({
|
|
|
55566
55602
|
TourPlayer,
|
|
55567
55603
|
{
|
|
55568
55604
|
tour: tourData,
|
|
55605
|
+
tourAudioContext,
|
|
55606
|
+
actions: _actions,
|
|
55569
55607
|
currentStepIndex: currentTourStepIndex,
|
|
55570
55608
|
onStepChange: (stepIndex, step) => {
|
|
55571
55609
|
setCurrentTourStepIndex(stepIndex);
|
|
@@ -55691,14 +55729,14 @@ const CodeCityPanelContent = ({
|
|
|
55691
55729
|
packageData: legendPackageData.packageData,
|
|
55692
55730
|
workspacePackageCount: legendPackageData.workspacePackageCount,
|
|
55693
55731
|
gitStatus: gitSlice == null ? void 0 : gitSlice.data,
|
|
55694
|
-
prFiles: (
|
|
55695
|
-
prFileStats: (
|
|
55696
|
-
prNumber: (
|
|
55697
|
-
commitFiles: (
|
|
55698
|
-
commitHash: (
|
|
55699
|
-
commitStats: (
|
|
55732
|
+
prFiles: (_s = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _s.filesByStatus,
|
|
55733
|
+
prFileStats: (_t = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _t.files,
|
|
55734
|
+
prNumber: (_u = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _u.pullNumber,
|
|
55735
|
+
commitFiles: (_v = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _v.filesByStatus,
|
|
55736
|
+
commitHash: (_w = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _w.commitHash,
|
|
55737
|
+
commitStats: (_x = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _x.stats,
|
|
55700
55738
|
fileTree: fileTreeSlice == null ? void 0 : fileTreeSlice.data,
|
|
55701
|
-
rootPath: (
|
|
55739
|
+
rootPath: (_y = context.currentScope.repository) == null ? void 0 : _y.path,
|
|
55702
55740
|
onGitFileClick: handleLegendFileClick,
|
|
55703
55741
|
onGitNodeHover: handleGitNodeHover,
|
|
55704
55742
|
onPrFileClick: handleLegendFileClick,
|
|
@@ -55723,14 +55761,14 @@ const CodeCityPanelContent = ({
|
|
|
55723
55761
|
packageData: legendPackageData.packageData,
|
|
55724
55762
|
workspacePackageCount: legendPackageData.workspacePackageCount,
|
|
55725
55763
|
gitStatus: gitSlice == null ? void 0 : gitSlice.data,
|
|
55726
|
-
prFiles: (
|
|
55727
|
-
prFileStats: (
|
|
55728
|
-
prNumber: (
|
|
55729
|
-
commitFiles: (
|
|
55730
|
-
commitHash: (
|
|
55731
|
-
commitStats: (
|
|
55764
|
+
prFiles: (_z = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _z.filesByStatus,
|
|
55765
|
+
prFileStats: (_A = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _A.files,
|
|
55766
|
+
prNumber: (_B = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _B.pullNumber,
|
|
55767
|
+
commitFiles: (_C = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _C.filesByStatus,
|
|
55768
|
+
commitHash: (_D = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _D.commitHash,
|
|
55769
|
+
commitStats: (_E = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _E.stats,
|
|
55732
55770
|
fileTree: fileTreeSlice == null ? void 0 : fileTreeSlice.data,
|
|
55733
|
-
rootPath: (
|
|
55771
|
+
rootPath: (_F = context.currentScope.repository) == null ? void 0 : _F.path,
|
|
55734
55772
|
agentLayers: legendAgentLayers,
|
|
55735
55773
|
qualityMetrics: legendQualityMetrics,
|
|
55736
55774
|
colorMode,
|