@industry-theme/file-city-panel 0.3.15 → 0.3.16
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.map +1 -1
- package/dist/panels/components/FileCardList.d.ts +4 -0
- package/dist/panels/components/FileCardList.d.ts.map +1 -1
- package/dist/panels/components/GitChangesCardList.d.ts +6 -0
- package/dist/panels/components/GitChangesCardList.d.ts.map +1 -1
- package/dist/panels.bundle.js +152 -46
- package/dist/panels.bundle.js.map +1 -1
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TourPlayer.d.ts","sourceRoot":"","sources":["../../src/components/TourPlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAgBxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,MAAM,WAAW,eAAe;IAC9B,oCAAoC;IACpC,IAAI,EAAE,gBAAgB,CAAC;IAEvB,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,iCAAiC;IACjC,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAEvE,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAEpB,uDAAuD;IACvD,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAE1E,yCAAyC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,qIAAqI;IACrI,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IAE3D,wDAAwD;IACxD,WAAW,CAAC,EAAE,OAAO,CAAC;IAGtB,wGAAwG;IACxG,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC,6FAA6F;IAC7F,OAAO,CAAC,EAAE,YAAY,CAAC;IAEvB,yDAAyD;IACzD,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,iEAAiE;IACjE,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,2DAA2D;IAC3D,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"TourPlayer.d.ts","sourceRoot":"","sources":["../../src/components/TourPlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAgBxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,MAAM,WAAW,eAAe;IAC9B,oCAAoC;IACpC,IAAI,EAAE,gBAAgB,CAAC;IAEvB,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,iCAAiC;IACjC,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAEvE,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAEpB,uDAAuD;IACvD,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAE1E,yCAAyC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,qIAAqI;IACrI,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IAE3D,wDAAwD;IACxD,WAAW,CAAC,EAAE,OAAO,CAAC;IAGtB,wGAAwG;IACxG,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC,6FAA6F;IAC7F,OAAO,CAAC,EAAE,YAAY,CAAC;IAEvB,yDAAyD;IACzD,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,iEAAiE;IACjE,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,2DAA2D;IAC3D,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwhChD,CAAC"}
|
|
@@ -18,6 +18,10 @@ interface FileCardListProps {
|
|
|
18
18
|
onFileClick?: (filePath: string) => void;
|
|
19
19
|
/** Callback when a file card is hovered */
|
|
20
20
|
onFileHover?: (filePath: string | null) => void;
|
|
21
|
+
/** Callback when stage button is clicked (only shows for unstaged files) */
|
|
22
|
+
onStageFile?: (filePath: string) => void;
|
|
23
|
+
/** File status map for determining if file can be staged */
|
|
24
|
+
fileStatusMap?: Map<string, string>;
|
|
21
25
|
/** Empty state message */
|
|
22
26
|
emptyMessage?: string;
|
|
23
27
|
/** Horizontal padding for cards */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileCardList.d.ts","sourceRoot":"","sources":["../../../src/panels/components/FileCardList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,MAAM,WAAW,YAAY;IAC3B,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,iBAAiB;IACzB,+BAA+B;IAC/B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,2CAA2C;IAC3C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gDAAgD;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"FileCardList.d.ts","sourceRoot":"","sources":["../../../src/panels/components/FileCardList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,MAAM,WAAW,YAAY;IAC3B,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,iBAAiB;IACzB,+BAA+B;IAC/B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,2CAA2C;IAC3C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,4EAA4E;IAC5E,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,4DAA4D;IAC5D,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gDAAgD;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiRpD,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { GitStatusWithFiles } from '@principal-ai/repository-abstraction';
|
|
3
|
+
import type { PanelActions } from '../../types';
|
|
3
4
|
/** Git status category for selection callbacks */
|
|
4
5
|
export type GitChangeSelectionStatus = 'staged' | 'unstaged' | 'untracked' | 'deleted';
|
|
6
|
+
/** View mode for git changes */
|
|
7
|
+
export type GitChangesViewMode = 'unstaged' | 'staged';
|
|
5
8
|
interface GitChangesCardListProps {
|
|
6
9
|
/** Git status data with categorized file paths */
|
|
7
10
|
gitStatus: GitStatusWithFiles;
|
|
@@ -11,10 +14,13 @@ interface GitChangesCardListProps {
|
|
|
11
14
|
onFileClick?: (filePath: string, status?: GitChangeSelectionStatus) => void;
|
|
12
15
|
/** Callback when a file is hovered */
|
|
13
16
|
onFileHover?: (filePath: string | null) => void;
|
|
17
|
+
/** Panel actions for git operations */
|
|
18
|
+
actions?: PanelActions;
|
|
14
19
|
}
|
|
15
20
|
/**
|
|
16
21
|
* GitChangesCardList displays git changes as a flat list of file cards.
|
|
17
22
|
* Each card shows the filename with a colored status badge (A, M, D, ??).
|
|
23
|
+
* Includes a toggle to switch between staged and unstaged views.
|
|
18
24
|
*/
|
|
19
25
|
export declare const GitChangesCardList: React.FC<GitChangesCardListProps>;
|
|
20
26
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitChangesCardList.d.ts","sourceRoot":"","sources":["../../../src/panels/components/GitChangesCardList.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"GitChangesCardList.d.ts","sourceRoot":"","sources":["../../../src/panels/components/GitChangesCardList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAG9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,kDAAkD;AAClD,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAEvF,gCAAgC;AAChC,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAkBvD,UAAU,uBAAuB;IAC/B,kDAAkD;IAClD,SAAS,EAAE,kBAAkB,CAAC;IAC9B,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC5E,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,uCAAuC;IACvC,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAmKhE,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -48258,12 +48258,15 @@ const FileCardList = ({
|
|
|
48258
48258
|
files: files2,
|
|
48259
48259
|
onFileClick,
|
|
48260
48260
|
onFileHover,
|
|
48261
|
+
onStageFile,
|
|
48262
|
+
fileStatusMap,
|
|
48261
48263
|
emptyMessage = "No files",
|
|
48262
48264
|
horizontalPadding = "0px",
|
|
48263
48265
|
showIcons = true
|
|
48264
48266
|
}) => {
|
|
48265
48267
|
const { theme: theme2 } = useTheme();
|
|
48266
48268
|
const [copiedPath, setCopiedPath] = React.useState(null);
|
|
48269
|
+
const [hoveredStageButton, setHoveredStageButton] = React.useState(null);
|
|
48267
48270
|
const getFileName = useCallback((path) => {
|
|
48268
48271
|
const parts = path.split("/");
|
|
48269
48272
|
return parts[parts.length - 1] || path;
|
|
@@ -48449,6 +48452,37 @@ const FileCardList = ({
|
|
|
48449
48452
|
children: file.badge
|
|
48450
48453
|
}
|
|
48451
48454
|
),
|
|
48455
|
+
onStageFile && fileStatusMap && fileStatusMap.get(file.path) !== "staged" && /* @__PURE__ */ jsxs(
|
|
48456
|
+
"button",
|
|
48457
|
+
{
|
|
48458
|
+
onClick: (e) => {
|
|
48459
|
+
e.stopPropagation();
|
|
48460
|
+
onStageFile(file.path);
|
|
48461
|
+
},
|
|
48462
|
+
onMouseEnter: () => setHoveredStageButton(file.path),
|
|
48463
|
+
onMouseLeave: () => setHoveredStageButton(null),
|
|
48464
|
+
style: {
|
|
48465
|
+
display: "flex",
|
|
48466
|
+
alignItems: "center",
|
|
48467
|
+
gap: "4px",
|
|
48468
|
+
fontFamily: theme2.fonts.body,
|
|
48469
|
+
fontSize: theme2.fontSizes[0],
|
|
48470
|
+
fontWeight: 500,
|
|
48471
|
+
color: hoveredStageButton === file.path ? "#22c55e" : theme2.colors.textSecondary,
|
|
48472
|
+
backgroundColor: hoveredStageButton === file.path ? "#22c55e20" : theme2.colors.background,
|
|
48473
|
+
padding: "4px 8px",
|
|
48474
|
+
borderRadius: "4px",
|
|
48475
|
+
border: `1px solid ${hoveredStageButton === file.path ? "#22c55e" : theme2.colors.border}`,
|
|
48476
|
+
cursor: "pointer",
|
|
48477
|
+
flexShrink: 0,
|
|
48478
|
+
transition: "all 0.15s ease"
|
|
48479
|
+
},
|
|
48480
|
+
children: [
|
|
48481
|
+
/* @__PURE__ */ jsx(Plus, { size: 12 }),
|
|
48482
|
+
"Stage"
|
|
48483
|
+
]
|
|
48484
|
+
}
|
|
48485
|
+
),
|
|
48452
48486
|
copiedPath === file.path && /* @__PURE__ */ jsx(
|
|
48453
48487
|
"span",
|
|
48454
48488
|
{
|
|
@@ -48493,9 +48527,11 @@ const GitChangesCardList = ({
|
|
|
48493
48527
|
gitStatus,
|
|
48494
48528
|
horizontalPadding = "0px",
|
|
48495
48529
|
onFileClick,
|
|
48496
|
-
onFileHover
|
|
48530
|
+
onFileHover,
|
|
48531
|
+
actions
|
|
48497
48532
|
}) => {
|
|
48498
48533
|
const { theme: theme2 } = useTheme();
|
|
48534
|
+
const [viewMode, setViewMode] = useState("unstaged");
|
|
48499
48535
|
const fileStatusMap = useMemo(() => {
|
|
48500
48536
|
const map = /* @__PURE__ */ new Map();
|
|
48501
48537
|
gitStatus.stagedFiles.forEach((f) => map.set(f, "staged"));
|
|
@@ -48518,18 +48554,25 @@ const GitChangesCardList = ({
|
|
|
48518
48554
|
}
|
|
48519
48555
|
});
|
|
48520
48556
|
};
|
|
48521
|
-
|
|
48522
|
-
|
|
48523
|
-
|
|
48524
|
-
|
|
48557
|
+
if (viewMode === "staged") {
|
|
48558
|
+
addFiles(gitStatus.stagedFiles, "staged");
|
|
48559
|
+
} else {
|
|
48560
|
+
addFiles(gitStatus.modifiedFiles, "unstaged");
|
|
48561
|
+
addFiles(gitStatus.untrackedFiles, "untracked");
|
|
48562
|
+
addFiles(gitStatus.deletedFiles, "deleted");
|
|
48563
|
+
}
|
|
48525
48564
|
return items;
|
|
48526
|
-
}, [gitStatus]);
|
|
48565
|
+
}, [gitStatus, viewMode]);
|
|
48527
48566
|
const handleFileClick = useCallback((filePath) => {
|
|
48528
48567
|
const status = fileStatusMap.get(filePath);
|
|
48529
48568
|
onFileClick == null ? void 0 : onFileClick(filePath, status);
|
|
48530
48569
|
}, [fileStatusMap, onFileClick]);
|
|
48531
|
-
const
|
|
48532
|
-
|
|
48570
|
+
const handleStageFile = useCallback((filePath) => {
|
|
48571
|
+
var _a;
|
|
48572
|
+
(_a = actions == null ? void 0 : actions.stageFile) == null ? void 0 : _a.call(actions, filePath);
|
|
48573
|
+
}, [actions]);
|
|
48574
|
+
const totalChanges = gitStatus.stagedFiles.length + gitStatus.modifiedFiles.length + gitStatus.untrackedFiles.length + gitStatus.deletedFiles.length;
|
|
48575
|
+
if (totalChanges === 0) {
|
|
48533
48576
|
return /* @__PURE__ */ jsx(
|
|
48534
48577
|
"div",
|
|
48535
48578
|
{
|
|
@@ -48545,17 +48588,104 @@ const GitChangesCardList = ({
|
|
|
48545
48588
|
}
|
|
48546
48589
|
);
|
|
48547
48590
|
}
|
|
48548
|
-
return /* @__PURE__ */
|
|
48549
|
-
|
|
48550
|
-
|
|
48551
|
-
|
|
48552
|
-
|
|
48553
|
-
|
|
48554
|
-
|
|
48555
|
-
|
|
48556
|
-
|
|
48557
|
-
|
|
48558
|
-
|
|
48591
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
48592
|
+
/* @__PURE__ */ jsxs(
|
|
48593
|
+
"div",
|
|
48594
|
+
{
|
|
48595
|
+
style: {
|
|
48596
|
+
display: "flex",
|
|
48597
|
+
alignItems: "center",
|
|
48598
|
+
justifyContent: "space-between",
|
|
48599
|
+
padding: `0 ${horizontalPadding}`
|
|
48600
|
+
},
|
|
48601
|
+
children: [
|
|
48602
|
+
/* @__PURE__ */ jsx(
|
|
48603
|
+
"span",
|
|
48604
|
+
{
|
|
48605
|
+
style: {
|
|
48606
|
+
fontFamily: theme2.fonts.body,
|
|
48607
|
+
fontSize: theme2.fontSizes[1],
|
|
48608
|
+
fontWeight: 600,
|
|
48609
|
+
color: theme2.colors.text
|
|
48610
|
+
},
|
|
48611
|
+
children: "Git Changes"
|
|
48612
|
+
}
|
|
48613
|
+
),
|
|
48614
|
+
/* @__PURE__ */ jsxs(
|
|
48615
|
+
"div",
|
|
48616
|
+
{
|
|
48617
|
+
style: {
|
|
48618
|
+
display: "flex",
|
|
48619
|
+
backgroundColor: theme2.colors.background,
|
|
48620
|
+
borderRadius: "6px",
|
|
48621
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
48622
|
+
overflow: "hidden"
|
|
48623
|
+
},
|
|
48624
|
+
children: [
|
|
48625
|
+
/* @__PURE__ */ jsxs(
|
|
48626
|
+
"button",
|
|
48627
|
+
{
|
|
48628
|
+
onClick: () => setViewMode("unstaged"),
|
|
48629
|
+
style: {
|
|
48630
|
+
fontFamily: theme2.fonts.body,
|
|
48631
|
+
fontSize: theme2.fontSizes[0],
|
|
48632
|
+
fontWeight: 500,
|
|
48633
|
+
padding: "4px 12px",
|
|
48634
|
+
border: "none",
|
|
48635
|
+
backgroundColor: viewMode === "unstaged" ? theme2.colors.backgroundLight : "transparent",
|
|
48636
|
+
color: viewMode === "unstaged" ? theme2.colors.text : theme2.colors.textSecondary,
|
|
48637
|
+
cursor: "pointer",
|
|
48638
|
+
transition: "all 0.15s ease"
|
|
48639
|
+
},
|
|
48640
|
+
children: [
|
|
48641
|
+
"Unstaged (",
|
|
48642
|
+
gitStatus.modifiedFiles.length + gitStatus.untrackedFiles.length + gitStatus.deletedFiles.length,
|
|
48643
|
+
")"
|
|
48644
|
+
]
|
|
48645
|
+
}
|
|
48646
|
+
),
|
|
48647
|
+
/* @__PURE__ */ jsxs(
|
|
48648
|
+
"button",
|
|
48649
|
+
{
|
|
48650
|
+
onClick: () => setViewMode("staged"),
|
|
48651
|
+
style: {
|
|
48652
|
+
fontFamily: theme2.fonts.body,
|
|
48653
|
+
fontSize: theme2.fontSizes[0],
|
|
48654
|
+
fontWeight: 500,
|
|
48655
|
+
padding: "4px 12px",
|
|
48656
|
+
border: "none",
|
|
48657
|
+
backgroundColor: viewMode === "staged" ? theme2.colors.backgroundLight : "transparent",
|
|
48658
|
+
color: viewMode === "staged" ? theme2.colors.text : theme2.colors.textSecondary,
|
|
48659
|
+
cursor: "pointer",
|
|
48660
|
+
transition: "all 0.15s ease"
|
|
48661
|
+
},
|
|
48662
|
+
children: [
|
|
48663
|
+
"Staged (",
|
|
48664
|
+
gitStatus.stagedFiles.length,
|
|
48665
|
+
")"
|
|
48666
|
+
]
|
|
48667
|
+
}
|
|
48668
|
+
)
|
|
48669
|
+
]
|
|
48670
|
+
}
|
|
48671
|
+
)
|
|
48672
|
+
]
|
|
48673
|
+
}
|
|
48674
|
+
),
|
|
48675
|
+
/* @__PURE__ */ jsx(
|
|
48676
|
+
FileCardList,
|
|
48677
|
+
{
|
|
48678
|
+
files: files2,
|
|
48679
|
+
onFileClick: handleFileClick,
|
|
48680
|
+
onFileHover,
|
|
48681
|
+
onStageFile: viewMode === "unstaged" ? handleStageFile : void 0,
|
|
48682
|
+
fileStatusMap,
|
|
48683
|
+
horizontalPadding,
|
|
48684
|
+
emptyMessage: viewMode === "unstaged" ? "No unstaged changes" : "No staged changes",
|
|
48685
|
+
showIcons: false
|
|
48686
|
+
}
|
|
48687
|
+
)
|
|
48688
|
+
] });
|
|
48559
48689
|
};
|
|
48560
48690
|
const PR_STATUS_COLORS$1 = {
|
|
48561
48691
|
added: "#22c55e",
|
|
@@ -51351,19 +51481,10 @@ const TourPlayer = ({
|
|
|
51351
51481
|
[onInteractiveAction]
|
|
51352
51482
|
);
|
|
51353
51483
|
useEffect(() => {
|
|
51354
|
-
if (!(actions == null ? void 0 : actions.fetchAudioUrls))
|
|
51355
|
-
console.log("[TourPlayer] No fetchAudioUrls action available");
|
|
51356
|
-
return;
|
|
51357
|
-
}
|
|
51358
|
-
if (!tourAudioContext) {
|
|
51359
|
-
console.log("[TourPlayer] No tour audio context provided");
|
|
51360
|
-
return;
|
|
51361
|
-
}
|
|
51362
|
-
console.log("[TourPlayer] Fetching audio URLs for tour:", tourAudioContext);
|
|
51484
|
+
if (!(actions == null ? void 0 : actions.fetchAudioUrls) || !tourAudioContext) return;
|
|
51363
51485
|
async function loadAudio() {
|
|
51364
51486
|
try {
|
|
51365
51487
|
const urls = await actions.fetchAudioUrls(tourAudioContext);
|
|
51366
|
-
console.log("[TourPlayer] Loaded audio URLs:", urls.size, "steps");
|
|
51367
51488
|
setAudioUrls(urls);
|
|
51368
51489
|
} catch (error) {
|
|
51369
51490
|
console.error("[TourPlayer] Failed to fetch audio URLs:", error);
|
|
@@ -51477,24 +51598,9 @@ const TourPlayer = ({
|
|
|
51477
51598
|
}
|
|
51478
51599
|
}, [isAutoPlaying, audioUrls, currentStep.id, stopAudio, playAudio]);
|
|
51479
51600
|
useEffect(() => {
|
|
51480
|
-
if (!isAutoPlaying)
|
|
51481
|
-
console.log("[TourPlayer] Auto-play disabled");
|
|
51482
|
-
return;
|
|
51483
|
-
}
|
|
51484
|
-
if (!isPlaying) {
|
|
51485
|
-
console.log("[TourPlayer] Tour not playing");
|
|
51486
|
-
return;
|
|
51487
|
-
}
|
|
51488
|
-
if (!audioUrls) {
|
|
51489
|
-
console.log("[TourPlayer] Audio URLs not loaded yet");
|
|
51490
|
-
return;
|
|
51491
|
-
}
|
|
51601
|
+
if (!isAutoPlaying || !isPlaying || !audioUrls) return;
|
|
51492
51602
|
const audioUrl = audioUrls.get(currentStep.id);
|
|
51493
|
-
if (!audioUrl)
|
|
51494
|
-
console.log("[TourPlayer] No audio URL for step:", currentStep.id);
|
|
51495
|
-
return;
|
|
51496
|
-
}
|
|
51497
|
-
console.log("[TourPlayer] Auto-playing audio for step:", currentStep.id);
|
|
51603
|
+
if (!audioUrl) return;
|
|
51498
51604
|
const timer2 = setTimeout(() => {
|
|
51499
51605
|
playAudio(audioUrl);
|
|
51500
51606
|
}, 100);
|