@@ -36597,6 +36597,9 @@ const PauseIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
36597
36597
const RedoIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
36598
36598
d: "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"
36599
36599
}), "Redo");
36600
+ const RestoreIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
36601
+ d: "M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"
36602
+ }), "Restore");
36600
36603
const TimerIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
36601
36604
d: "M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61M13 14h-2V8h2z"
36602
36605
}), "Timer");
@@ -37749,6 +37752,7 @@ function Header({
37749
37752
onHandlerClick,
37750
37753
onFindReplace,
37751
37754
onEditAll,
37755
+ onUnCorrectAll,
37752
37756
onTimingOffset,
37753
37757
timingOffsetMs = 0,
37754
37758
onUndo,
@@ -37975,6 +37979,17 @@ function Header({
37975
37979
children: "Edit All"
37976
37980
}
37977
37981
),
37982
+ !isReadOnly && onUnCorrectAll && /* @__PURE__ */ jsxRuntimeExports.jsx(
37983
+ Button,
37984
+ {
37985
+ variant: "outlined",
37986
+ size: "small",
37987
+ onClick: onUnCorrectAll,
37988
+ startIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(RestoreIcon, {}),
37989
+ sx: { minWidth: "fit-content", height: "32px" },
37990
+ children: "Un-Correct All"
37991
+ }
37992
+ ),
37978
37993
!isReadOnly && onTimingOffset && /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
37979
37994
/* @__PURE__ */ jsxRuntimeExports.jsx(
37980
37995
Button,
@@ -38625,7 +38640,8 @@ const MemoizedHeader = reactExports.memo(function MemoizedHeader2({
38625
38640
onUndo,
38626
38641
onRedo,
38627
38642
canUndo,
38628
- canRedo
38643
+ canRedo,
38644
+ onUnCorrectAll
38629
38645
}) {
38630
38646
return /* @__PURE__ */ jsxRuntimeExports.jsx(
38631
38647
Header,
@@ -38649,7 +38665,8 @@ const MemoizedHeader = reactExports.memo(function MemoizedHeader2({
38649
38665
onUndo,
38650
38666
onRedo,
38651
38667
canUndo,
38652
- canRedo
38668
+ canRedo,
38669
+ onUnCorrectAll
38653
38670
}
38654
38671
);
38655
38672
});
@@ -38994,6 +39011,23 @@ function LyricsAnalyzer({ data: initialData, onFileLoad, apiClient, isReadOnly,
38994
39011
const newData = findAndReplace(data, findText, replaceText, options);
38995
39012
updateDataWithHistory(newData, "find/replace");
38996
39013
};
39014
+ const handleUnCorrectAll = reactExports.useCallback(() => {
39015
+ if (!originalData.original_segments) {
39016
+ console.warn("No original segments available for un-correcting");
39017
+ return;
39018
+ }
39019
+ if (window.confirm("Are you sure you want to revert all segments to their original transcribed state? This will undo all corrections made.")) {
39020
+ console.log("Un-Correct All: Reverting all segments to original transcribed state", {
39021
+ originalSegmentCount: originalData.original_segments.length,
39022
+ currentSegmentCount: data.corrected_segments.length
39023
+ });
39024
+ const newData = {
39025
+ ...data,
39026
+ corrected_segments: JSON.parse(JSON.stringify(originalData.original_segments))
39027
+ };
39028
+ updateDataWithHistory(newData, "un-correct all segments");
39029
+ }
39030
+ }, [originalData.original_segments, data, updateDataWithHistory]);
38997
39031
const handleReplaceAllLyrics = reactExports.useCallback(() => {
38998
39032
console.log("ReplaceAllLyrics - Opening modal");
38999
39033
setIsReplaceAllLyricsModalOpen(true);
@@ -39075,7 +39109,8 @@ function LyricsAnalyzer({ data: initialData, onFileLoad, apiClient, isReadOnly,
39075
39109
onUndo: handleUndo,
39076
39110
onRedo: handleRedo,
39077
39111
canUndo,
39078
- canRedo
39112
+ canRedo,
39113
+ onUnCorrectAll: handleUnCorrectAll
39079
39114
}
39080
39115
),
39081
39116
/* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { container: true, direction: isMobile ? "column" : "row", children: [
@@ -39573,7 +39608,7 @@ const theme = createTheme({
39573
39608
spacing: (factor) => `${0.6 * factor}rem`
39574
39609
// Further reduced from 0.8 * factor
39575
39610
});
39576
- const version = "0.69 .0";
39611
+ const version = "0.70 .0";
39577
39612
const packageJson = {
39578
39613
version
39579
39614
};
@@ -39584,4 +39619,4 @@ ReactDOM$1.createRoot(document.getElementById("root")).render(
39584
39619
/* @__PURE__ */ jsxRuntimeExports.jsx(App, {})
39585
39620
] })
39586
39621
);
39587
- //# sourceMappingURL=index-izP9z1oB .js.map
39622
+ //# sourceMappingURL=index-BV5ep1cr .js.map
0 commit comments