@industry-theme/file-city-panel 0.3.15 → 0.3.17
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/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/mocks/panelContext.d.ts.map +1 -1
- package/dist/panels/components/FileCardList.d.ts +6 -0
- package/dist/panels/components/FileCardList.d.ts.map +1 -1
- package/dist/panels/components/FileCardList.stories.d.ts +4 -0
- package/dist/panels/components/FileCardList.stories.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/components/GitChangesCardList.stories.d.ts +30 -0
- package/dist/panels/components/GitChangesCardList.stories.d.ts.map +1 -0
- package/dist/panels.bundle.js +165 -50
- package/dist/panels.bundle.js.map +1 -1
- package/dist/types/index.d.ts +16 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -3
- package/dist/hooks/useTextToSpeech.d.ts +0 -19
- package/dist/hooks/useTextToSpeech.d.ts.map +0 -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,CAA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EACV,eAAe,EACf,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelContext.d.ts","sourceRoot":"","sources":["../../src/mocks/panelContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EAIlB,MAAM,UAAU,CAAC;AA+BlB;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,OAAO,CAAC,iBAAiB,CAAC,KACrC,iBAoIF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,OAAO,CAAC,YAAY,CAAC,KAChC,
|
|
1
|
+
{"version":3,"file":"panelContext.d.ts","sourceRoot":"","sources":["../../src/mocks/panelContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EAIlB,MAAM,UAAU,CAAC;AA+BlB;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,OAAO,CAAC,iBAAiB,CAAC,KACrC,iBAoIF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,OAAO,CAAC,YAAY,CAAC,KAChC,YAsBD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAO,iBAwCnC,CAAC;AAEF;;;GAGG;AACH,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,UAAU,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;IAClF,gBAAgB,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IACzC,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA+E9D,CAAC"}
|
|
@@ -18,6 +18,12 @@ 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
|
+
/** Callback when unstage button is clicked (only shows for staged files) */
|
|
24
|
+
onUnstageFile?: (filePath: string) => void;
|
|
25
|
+
/** File status map for determining if file can be staged/unstaged */
|
|
26
|
+
fileStatusMap?: Map<string, string>;
|
|
21
27
|
/** Empty state message */
|
|
22
28
|
emptyMessage?: string;
|
|
23
29
|
/** 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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,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,4EAA4E;IAC5E,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,4EAA4E;IAC5E,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,qEAAqE;IACrE,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"}
|
|
@@ -51,4 +51,8 @@ export declare const PullRequestStyle: Story;
|
|
|
51
51
|
* Storyboard files with categories
|
|
52
52
|
*/
|
|
53
53
|
export declare const StoryboardFiles: Story;
|
|
54
|
+
/**
|
|
55
|
+
* With stage button for unstaged files
|
|
56
|
+
*/
|
|
57
|
+
export declare const WithStageButton: Story;
|
|
54
58
|
//# sourceMappingURL=FileCardList.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileCardList.stories.d.ts","sourceRoot":"","sources":["../../../src/panels/components/FileCardList.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAC;AAEjE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAwBnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAW3C;;GAEG;AACH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S,EAAE,KAUvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAKhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KA+BzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAW3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAU9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAU7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAwD7B,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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { GitChangesCardList } from './GitChangesCardList';
|
|
3
|
+
declare const meta: Meta<typeof GitChangesCardList>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof GitChangesCardList>;
|
|
6
|
+
/**
|
|
7
|
+
* Default git changes card list with toggle
|
|
8
|
+
*/
|
|
9
|
+
export declare const Default: Story;
|
|
10
|
+
/**
|
|
11
|
+
* Interactive with stage functionality
|
|
12
|
+
*/
|
|
13
|
+
export declare const InteractiveWithStage: Story;
|
|
14
|
+
/**
|
|
15
|
+
* Only unstaged changes
|
|
16
|
+
*/
|
|
17
|
+
export declare const OnlyUnstaged: Story;
|
|
18
|
+
/**
|
|
19
|
+
* Only staged changes
|
|
20
|
+
*/
|
|
21
|
+
export declare const OnlyStaged: Story;
|
|
22
|
+
/**
|
|
23
|
+
* No changes
|
|
24
|
+
*/
|
|
25
|
+
export declare const NoChanges: Story;
|
|
26
|
+
/**
|
|
27
|
+
* Many files
|
|
28
|
+
*/
|
|
29
|
+
export declare const ManyFiles: Story;
|
|
30
|
+
//# sourceMappingURL=GitChangesCardList.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitChangesCardList.stories.d.ts","sourceRoot":"","sources":["../../../src/panels/components/GitChangesCardList.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAI1D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,kBAAkB,CAwBzC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAgCjD;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAuFlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAwB1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAuBxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAmBvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAmBvB,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -36910,11 +36910,14 @@ function requireDrawLayeredBuildings() {
|
|
|
36910
36910
|
}
|
|
36911
36911
|
}
|
|
36912
36912
|
let iconBottomY = pos.y;
|
|
36913
|
+
let hasIcon = false;
|
|
36913
36914
|
if (showFileTypeIcons && iconMap) {
|
|
36914
36915
|
const iconConfig = (0, fileTypeIcons_1.getFileTypeIcon)(building.path, iconMap);
|
|
36915
36916
|
if (iconConfig) {
|
|
36917
|
+
hasIcon = true;
|
|
36918
|
+
const willShowText = showFileNames && width > 100 && height > 30;
|
|
36916
36919
|
const isWide = width > height;
|
|
36917
|
-
const iconYOffset = isWide ? -height * 0.15 : 0;
|
|
36920
|
+
const iconYOffset = willShowText && isWide ? -height * 0.15 : 0;
|
|
36918
36921
|
const iconY = pos.y + iconYOffset;
|
|
36919
36922
|
(0, fileTypeIcons_1.drawFileTypeIcon)(ctx, iconConfig, pos.x, iconY, width, height);
|
|
36920
36923
|
const minDimension = Math.min(width, height);
|
|
@@ -36940,12 +36943,18 @@ function requireDrawLayeredBuildings() {
|
|
|
36940
36943
|
const fontSize = Math.min(30, Math.max(10, Math.floor(Math.min(width, height) * 0.3)));
|
|
36941
36944
|
ctx.font = `${fontSize}px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`;
|
|
36942
36945
|
ctx.textAlign = "center";
|
|
36943
|
-
ctx.textBaseline = "top";
|
|
36944
36946
|
const textMetrics = ctx.measureText(fileName);
|
|
36945
36947
|
const textWidth = textMetrics.width;
|
|
36946
36948
|
if (textWidth < width - 8) {
|
|
36947
|
-
|
|
36948
|
-
|
|
36949
|
+
let textY;
|
|
36950
|
+
if (hasIcon) {
|
|
36951
|
+
ctx.textBaseline = "top";
|
|
36952
|
+
const spacing = 4;
|
|
36953
|
+
textY = iconBottomY + spacing;
|
|
36954
|
+
} else {
|
|
36955
|
+
ctx.textBaseline = "middle";
|
|
36956
|
+
textY = pos.y;
|
|
36957
|
+
}
|
|
36949
36958
|
ctx.fillStyle = "rgba(255, 255, 255, 0.95)";
|
|
36950
36959
|
ctx.fillText(fileName, pos.x, textY);
|
|
36951
36960
|
}
|
|
@@ -48258,12 +48267,15 @@ const FileCardList = ({
|
|
|
48258
48267
|
files: files2,
|
|
48259
48268
|
onFileClick,
|
|
48260
48269
|
onFileHover,
|
|
48270
|
+
onStageFile,
|
|
48271
|
+
fileStatusMap,
|
|
48261
48272
|
emptyMessage = "No files",
|
|
48262
48273
|
horizontalPadding = "0px",
|
|
48263
48274
|
showIcons = true
|
|
48264
48275
|
}) => {
|
|
48265
48276
|
const { theme: theme2 } = useTheme();
|
|
48266
48277
|
const [copiedPath, setCopiedPath] = React.useState(null);
|
|
48278
|
+
const [hoveredStageButton, setHoveredStageButton] = React.useState(null);
|
|
48267
48279
|
const getFileName = useCallback((path) => {
|
|
48268
48280
|
const parts = path.split("/");
|
|
48269
48281
|
return parts[parts.length - 1] || path;
|
|
@@ -48449,6 +48461,37 @@ const FileCardList = ({
|
|
|
48449
48461
|
children: file.badge
|
|
48450
48462
|
}
|
|
48451
48463
|
),
|
|
48464
|
+
onStageFile && fileStatusMap && fileStatusMap.get(file.path) !== "staged" && /* @__PURE__ */ jsxs(
|
|
48465
|
+
"button",
|
|
48466
|
+
{
|
|
48467
|
+
onClick: (e) => {
|
|
48468
|
+
e.stopPropagation();
|
|
48469
|
+
onStageFile(file.path);
|
|
48470
|
+
},
|
|
48471
|
+
onMouseEnter: () => setHoveredStageButton(file.path),
|
|
48472
|
+
onMouseLeave: () => setHoveredStageButton(null),
|
|
48473
|
+
style: {
|
|
48474
|
+
display: "flex",
|
|
48475
|
+
alignItems: "center",
|
|
48476
|
+
gap: "4px",
|
|
48477
|
+
fontFamily: theme2.fonts.body,
|
|
48478
|
+
fontSize: theme2.fontSizes[0],
|
|
48479
|
+
fontWeight: 500,
|
|
48480
|
+
color: hoveredStageButton === file.path ? "#22c55e" : theme2.colors.textSecondary,
|
|
48481
|
+
backgroundColor: hoveredStageButton === file.path ? "#22c55e20" : theme2.colors.background,
|
|
48482
|
+
padding: "4px 8px",
|
|
48483
|
+
borderRadius: "4px",
|
|
48484
|
+
border: `1px solid ${hoveredStageButton === file.path ? "#22c55e" : theme2.colors.border}`,
|
|
48485
|
+
cursor: "pointer",
|
|
48486
|
+
flexShrink: 0,
|
|
48487
|
+
transition: "all 0.15s ease"
|
|
48488
|
+
},
|
|
48489
|
+
children: [
|
|
48490
|
+
/* @__PURE__ */ jsx(Plus, { size: 12 }),
|
|
48491
|
+
"Stage"
|
|
48492
|
+
]
|
|
48493
|
+
}
|
|
48494
|
+
),
|
|
48452
48495
|
copiedPath === file.path && /* @__PURE__ */ jsx(
|
|
48453
48496
|
"span",
|
|
48454
48497
|
{
|
|
@@ -48493,9 +48536,11 @@ const GitChangesCardList = ({
|
|
|
48493
48536
|
gitStatus,
|
|
48494
48537
|
horizontalPadding = "0px",
|
|
48495
48538
|
onFileClick,
|
|
48496
|
-
onFileHover
|
|
48539
|
+
onFileHover,
|
|
48540
|
+
actions
|
|
48497
48541
|
}) => {
|
|
48498
48542
|
const { theme: theme2 } = useTheme();
|
|
48543
|
+
const [viewMode, setViewMode] = useState("unstaged");
|
|
48499
48544
|
const fileStatusMap = useMemo(() => {
|
|
48500
48545
|
const map = /* @__PURE__ */ new Map();
|
|
48501
48546
|
gitStatus.stagedFiles.forEach((f) => map.set(f, "staged"));
|
|
@@ -48518,18 +48563,25 @@ const GitChangesCardList = ({
|
|
|
48518
48563
|
}
|
|
48519
48564
|
});
|
|
48520
48565
|
};
|
|
48521
|
-
|
|
48522
|
-
|
|
48523
|
-
|
|
48524
|
-
|
|
48566
|
+
if (viewMode === "staged") {
|
|
48567
|
+
addFiles(gitStatus.stagedFiles, "staged");
|
|
48568
|
+
} else {
|
|
48569
|
+
addFiles(gitStatus.modifiedFiles, "unstaged");
|
|
48570
|
+
addFiles(gitStatus.untrackedFiles, "untracked");
|
|
48571
|
+
addFiles(gitStatus.deletedFiles, "deleted");
|
|
48572
|
+
}
|
|
48525
48573
|
return items;
|
|
48526
|
-
}, [gitStatus]);
|
|
48574
|
+
}, [gitStatus, viewMode]);
|
|
48527
48575
|
const handleFileClick = useCallback((filePath) => {
|
|
48528
48576
|
const status = fileStatusMap.get(filePath);
|
|
48529
48577
|
onFileClick == null ? void 0 : onFileClick(filePath, status);
|
|
48530
48578
|
}, [fileStatusMap, onFileClick]);
|
|
48531
|
-
const
|
|
48532
|
-
|
|
48579
|
+
const handleStageFile = useCallback((filePath) => {
|
|
48580
|
+
var _a;
|
|
48581
|
+
(_a = actions == null ? void 0 : actions.stageFile) == null ? void 0 : _a.call(actions, filePath);
|
|
48582
|
+
}, [actions]);
|
|
48583
|
+
const totalChanges = gitStatus.stagedFiles.length + gitStatus.modifiedFiles.length + gitStatus.untrackedFiles.length + gitStatus.deletedFiles.length;
|
|
48584
|
+
if (totalChanges === 0) {
|
|
48533
48585
|
return /* @__PURE__ */ jsx(
|
|
48534
48586
|
"div",
|
|
48535
48587
|
{
|
|
@@ -48545,17 +48597,104 @@ const GitChangesCardList = ({
|
|
|
48545
48597
|
}
|
|
48546
48598
|
);
|
|
48547
48599
|
}
|
|
48548
|
-
return /* @__PURE__ */
|
|
48549
|
-
|
|
48550
|
-
|
|
48551
|
-
|
|
48552
|
-
|
|
48553
|
-
|
|
48554
|
-
|
|
48555
|
-
|
|
48556
|
-
|
|
48557
|
-
|
|
48558
|
-
|
|
48600
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
48601
|
+
/* @__PURE__ */ jsxs(
|
|
48602
|
+
"div",
|
|
48603
|
+
{
|
|
48604
|
+
style: {
|
|
48605
|
+
display: "flex",
|
|
48606
|
+
alignItems: "center",
|
|
48607
|
+
justifyContent: "space-between",
|
|
48608
|
+
padding: `0 ${horizontalPadding}`
|
|
48609
|
+
},
|
|
48610
|
+
children: [
|
|
48611
|
+
/* @__PURE__ */ jsx(
|
|
48612
|
+
"span",
|
|
48613
|
+
{
|
|
48614
|
+
style: {
|
|
48615
|
+
fontFamily: theme2.fonts.body,
|
|
48616
|
+
fontSize: theme2.fontSizes[1],
|
|
48617
|
+
fontWeight: 600,
|
|
48618
|
+
color: theme2.colors.text
|
|
48619
|
+
},
|
|
48620
|
+
children: "Git Changes"
|
|
48621
|
+
}
|
|
48622
|
+
),
|
|
48623
|
+
/* @__PURE__ */ jsxs(
|
|
48624
|
+
"div",
|
|
48625
|
+
{
|
|
48626
|
+
style: {
|
|
48627
|
+
display: "flex",
|
|
48628
|
+
backgroundColor: theme2.colors.background,
|
|
48629
|
+
borderRadius: "6px",
|
|
48630
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
48631
|
+
overflow: "hidden"
|
|
48632
|
+
},
|
|
48633
|
+
children: [
|
|
48634
|
+
/* @__PURE__ */ jsxs(
|
|
48635
|
+
"button",
|
|
48636
|
+
{
|
|
48637
|
+
onClick: () => setViewMode("unstaged"),
|
|
48638
|
+
style: {
|
|
48639
|
+
fontFamily: theme2.fonts.body,
|
|
48640
|
+
fontSize: theme2.fontSizes[0],
|
|
48641
|
+
fontWeight: 500,
|
|
48642
|
+
padding: "4px 12px",
|
|
48643
|
+
border: "none",
|
|
48644
|
+
backgroundColor: viewMode === "unstaged" ? theme2.colors.backgroundLight : "transparent",
|
|
48645
|
+
color: viewMode === "unstaged" ? theme2.colors.text : theme2.colors.textSecondary,
|
|
48646
|
+
cursor: "pointer",
|
|
48647
|
+
transition: "all 0.15s ease"
|
|
48648
|
+
},
|
|
48649
|
+
children: [
|
|
48650
|
+
"Unstaged (",
|
|
48651
|
+
gitStatus.modifiedFiles.length + gitStatus.untrackedFiles.length + gitStatus.deletedFiles.length,
|
|
48652
|
+
")"
|
|
48653
|
+
]
|
|
48654
|
+
}
|
|
48655
|
+
),
|
|
48656
|
+
/* @__PURE__ */ jsxs(
|
|
48657
|
+
"button",
|
|
48658
|
+
{
|
|
48659
|
+
onClick: () => setViewMode("staged"),
|
|
48660
|
+
style: {
|
|
48661
|
+
fontFamily: theme2.fonts.body,
|
|
48662
|
+
fontSize: theme2.fontSizes[0],
|
|
48663
|
+
fontWeight: 500,
|
|
48664
|
+
padding: "4px 12px",
|
|
48665
|
+
border: "none",
|
|
48666
|
+
backgroundColor: viewMode === "staged" ? theme2.colors.backgroundLight : "transparent",
|
|
48667
|
+
color: viewMode === "staged" ? theme2.colors.text : theme2.colors.textSecondary,
|
|
48668
|
+
cursor: "pointer",
|
|
48669
|
+
transition: "all 0.15s ease"
|
|
48670
|
+
},
|
|
48671
|
+
children: [
|
|
48672
|
+
"Staged (",
|
|
48673
|
+
gitStatus.stagedFiles.length,
|
|
48674
|
+
")"
|
|
48675
|
+
]
|
|
48676
|
+
}
|
|
48677
|
+
)
|
|
48678
|
+
]
|
|
48679
|
+
}
|
|
48680
|
+
)
|
|
48681
|
+
]
|
|
48682
|
+
}
|
|
48683
|
+
),
|
|
48684
|
+
/* @__PURE__ */ jsx(
|
|
48685
|
+
FileCardList,
|
|
48686
|
+
{
|
|
48687
|
+
files: files2,
|
|
48688
|
+
onFileClick: handleFileClick,
|
|
48689
|
+
onFileHover,
|
|
48690
|
+
onStageFile: viewMode === "unstaged" ? handleStageFile : void 0,
|
|
48691
|
+
fileStatusMap,
|
|
48692
|
+
horizontalPadding,
|
|
48693
|
+
emptyMessage: viewMode === "unstaged" ? "No unstaged changes" : "No staged changes",
|
|
48694
|
+
showIcons: false
|
|
48695
|
+
}
|
|
48696
|
+
)
|
|
48697
|
+
] });
|
|
48559
48698
|
};
|
|
48560
48699
|
const PR_STATUS_COLORS$1 = {
|
|
48561
48700
|
added: "#22c55e",
|
|
@@ -51351,19 +51490,10 @@ const TourPlayer = ({
|
|
|
51351
51490
|
[onInteractiveAction]
|
|
51352
51491
|
);
|
|
51353
51492
|
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);
|
|
51493
|
+
if (!(actions == null ? void 0 : actions.fetchAudioUrls) || !tourAudioContext) return;
|
|
51363
51494
|
async function loadAudio() {
|
|
51364
51495
|
try {
|
|
51365
51496
|
const urls = await actions.fetchAudioUrls(tourAudioContext);
|
|
51366
|
-
console.log("[TourPlayer] Loaded audio URLs:", urls.size, "steps");
|
|
51367
51497
|
setAudioUrls(urls);
|
|
51368
51498
|
} catch (error) {
|
|
51369
51499
|
console.error("[TourPlayer] Failed to fetch audio URLs:", error);
|
|
@@ -51477,24 +51607,9 @@ const TourPlayer = ({
|
|
|
51477
51607
|
}
|
|
51478
51608
|
}, [isAutoPlaying, audioUrls, currentStep.id, stopAudio, playAudio]);
|
|
51479
51609
|
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
|
-
}
|
|
51610
|
+
if (!isAutoPlaying || !isPlaying || !audioUrls) return;
|
|
51492
51611
|
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);
|
|
51612
|
+
if (!audioUrl) return;
|
|
51498
51613
|
const timer2 = setTimeout(() => {
|
|
51499
51614
|
playAudio(audioUrl);
|
|
51500
51615
|
}, 100);
|