lyrics-transcriber 0.49.0__py3-none-any.whl → 0.49.2__py3-none-any.whl
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.
- lyrics_transcriber/frontend/dist/assets/{index-BpvPgWoc.js → index-DSQidWB1.js} +12 -46
- lyrics_transcriber/frontend/dist/assets/{index-BpvPgWoc.js.map → index-DSQidWB1.js.map} +1 -1
- lyrics_transcriber/frontend/dist/index.html +1 -1
- lyrics_transcriber/frontend/src/components/Header.tsx +2 -2
- lyrics_transcriber/frontend/src/components/LyricsAnalyzer.tsx +0 -66
- lyrics_transcriber/frontend/src/components/ReviewChangesModal.tsx +9 -7
- lyrics_transcriber/frontend/src/components/shared/utils/keyboardHandlers.ts +0 -6
- lyrics_transcriber/output/cdg.py +4 -1
- lyrics_transcriber/output/cdgmaker/composer.py +165 -118
- lyrics_transcriber/output/cdgmaker/config.py +1 -1
- lyrics_transcriber/output/cdgmaker/render.py +1 -1
- {lyrics_transcriber-0.49.0.dist-info → lyrics_transcriber-0.49.2.dist-info}/METADATA +1 -1
- {lyrics_transcriber-0.49.0.dist-info → lyrics_transcriber-0.49.2.dist-info}/RECORD +16 -16
- {lyrics_transcriber-0.49.0.dist-info → lyrics_transcriber-0.49.2.dist-info}/LICENSE +0 -0
- {lyrics_transcriber-0.49.0.dist-info → lyrics_transcriber-0.49.2.dist-info}/WHEEL +0 -0
- {lyrics_transcriber-0.49.0.dist-info → lyrics_transcriber-0.49.2.dist-info}/entry_points.txt +0 -0
@@ -5,7 +5,7 @@
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
7
7
|
<title>Lyrics Transcriber Analyzer</title>
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
8
|
+
<script type="module" crossorigin src="/assets/index-DSQidWB1.js"></script>
|
9
9
|
</head>
|
10
10
|
<body>
|
11
11
|
<div id="root"></div>
|
@@ -251,7 +251,7 @@ export default function Header({
|
|
251
251
|
/>
|
252
252
|
{!isReadOnly && (
|
253
253
|
<Box sx={{ display: 'flex', height: '32px' }}>
|
254
|
-
<Tooltip title="Undo
|
254
|
+
<Tooltip title="Undo">
|
255
255
|
<span>
|
256
256
|
<IconButton
|
257
257
|
size="small"
|
@@ -269,7 +269,7 @@ export default function Header({
|
|
269
269
|
</IconButton>
|
270
270
|
</span>
|
271
271
|
</Tooltip>
|
272
|
-
<Tooltip title="Redo
|
272
|
+
<Tooltip title="Redo">
|
273
273
|
<span>
|
274
274
|
<IconButton
|
275
275
|
size="small"
|
@@ -994,72 +994,6 @@ export default function LyricsAnalyzer({ data: initialData, onFileLoad, apiClien
|
|
994
994
|
// Determine if any modal is open to disable highlighting
|
995
995
|
const isAnyModalOpenMemo = useMemo(() => isAnyModalOpen, [isAnyModalOpen]);
|
996
996
|
|
997
|
-
// Update keyboard handlers to include Undo/Redo shortcuts (Cmd/Ctrl + Z, Cmd/Ctrl + Shift + Z)
|
998
|
-
useEffect(() => {
|
999
|
-
const { currentModalHandler } = getModalState()
|
1000
|
-
|
1001
|
-
if (debugLog) {
|
1002
|
-
console.log('LyricsAnalyzer - Setting up keyboard effect (incl. Undo/Redo)', {
|
1003
|
-
isAnyModalOpen,
|
1004
|
-
hasSpacebarHandler: !!currentModalHandler
|
1005
|
-
})
|
1006
|
-
}
|
1007
|
-
|
1008
|
-
const { handleKeyDown: baseHandleKeyDown, handleKeyUp, cleanup } = setupKeyboardHandlers({
|
1009
|
-
setIsShiftPressed,
|
1010
|
-
setIsCtrlPressed
|
1011
|
-
})
|
1012
|
-
|
1013
|
-
const handleKeyDown = (e: KeyboardEvent) => {
|
1014
|
-
// Prevent Undo/Redo if a modal is open or input/textarea has focus
|
1015
|
-
const targetElement = e.target as HTMLElement;
|
1016
|
-
const isInputFocused = targetElement.tagName === 'INPUT' || targetElement.tagName === 'TEXTAREA';
|
1017
|
-
|
1018
|
-
if (!isAnyModalOpen && !isInputFocused) {
|
1019
|
-
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
1020
|
-
const modifierKey = isMac ? e.metaKey : e.ctrlKey;
|
1021
|
-
|
1022
|
-
if (modifierKey && e.key.toLowerCase() === 'z') {
|
1023
|
-
e.preventDefault();
|
1024
|
-
if (e.shiftKey) {
|
1025
|
-
if (canRedo) handleRedo();
|
1026
|
-
} else {
|
1027
|
-
if (canUndo) handleUndo();
|
1028
|
-
}
|
1029
|
-
return; // Prevent base handler if we handled undo/redo
|
1030
|
-
}
|
1031
|
-
}
|
1032
|
-
|
1033
|
-
// Call original handler for other keys or when conditions not met
|
1034
|
-
baseHandleKeyDown(e);
|
1035
|
-
};
|
1036
|
-
|
1037
|
-
// Always add keyboard listeners
|
1038
|
-
if (debugLog) {
|
1039
|
-
console.log('LyricsAnalyzer - Adding keyboard event listeners (incl. Undo/Redo)')
|
1040
|
-
}
|
1041
|
-
window.addEventListener('keydown', handleKeyDown)
|
1042
|
-
window.addEventListener('keyup', handleKeyUp)
|
1043
|
-
|
1044
|
-
// Reset modifier states when a modal opens
|
1045
|
-
if (isAnyModalOpen) {
|
1046
|
-
setIsShiftPressed(false)
|
1047
|
-
setIsCtrlPressed(false)
|
1048
|
-
}
|
1049
|
-
|
1050
|
-
// Cleanup function
|
1051
|
-
return () => {
|
1052
|
-
if (debugLog) {
|
1053
|
-
console.log('LyricsAnalyzer - Cleanup effect running (incl. Undo/Redo)')
|
1054
|
-
}
|
1055
|
-
window.removeEventListener('keydown', handleKeyDown)
|
1056
|
-
window.removeEventListener('keyup', handleKeyUp)
|
1057
|
-
document.body.style.userSelect = ''
|
1058
|
-
// Call the cleanup function to remove window blur/focus listeners
|
1059
|
-
cleanup()
|
1060
|
-
}
|
1061
|
-
}, [setIsShiftPressed, setIsCtrlPressed, isAnyModalOpen, handleUndo, handleRedo, canUndo, canRedo]);
|
1062
|
-
|
1063
997
|
return (
|
1064
998
|
<Box sx={{
|
1065
999
|
p: 1,
|
@@ -85,14 +85,16 @@ export default function ReviewChangesModal({
|
|
85
85
|
useEffect(() => {
|
86
86
|
if (open) {
|
87
87
|
setModalSpacebarHandler(() => (e: KeyboardEvent) => {
|
88
|
-
e.
|
89
|
-
|
88
|
+
if (e.type === 'keydown') {
|
89
|
+
e.preventDefault()
|
90
|
+
e.stopPropagation()
|
90
91
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
92
|
+
if (videoRef.current) {
|
93
|
+
if (videoRef.current.paused) {
|
94
|
+
videoRef.current.play()
|
95
|
+
} else {
|
96
|
+
videoRef.current.pause()
|
97
|
+
}
|
96
98
|
}
|
97
99
|
}
|
98
100
|
})
|
@@ -86,9 +86,6 @@ export const setupKeyboardHandlers = (state: KeyboardState) => {
|
|
86
86
|
e.preventDefault()
|
87
87
|
|
88
88
|
if (isModalOpen && currentModalHandler) {
|
89
|
-
if (debugLog) {
|
90
|
-
console.log('Keyboard handler - Delegating to modal handler')
|
91
|
-
}
|
92
89
|
currentModalHandler(e)
|
93
90
|
} else if (window.toggleAudioPlayback && !isModalOpen) {
|
94
91
|
if (debugLog) {
|
@@ -129,9 +126,6 @@ export const setupKeyboardHandlers = (state: KeyboardState) => {
|
|
129
126
|
e.preventDefault()
|
130
127
|
|
131
128
|
if (isModalOpen && currentModalHandler) {
|
132
|
-
if (debugLog) {
|
133
|
-
console.log('Keyboard handler - Delegating keyup to modal handler')
|
134
|
-
}
|
135
129
|
currentModalHandler(e)
|
136
130
|
}
|
137
131
|
}
|
lyrics_transcriber/output/cdg.py
CHANGED
@@ -188,7 +188,7 @@ class CDGGenerator:
|
|
188
188
|
|
189
189
|
def _compose_cdg(self, toml_file: str) -> None:
|
190
190
|
"""Compose CDG using KaraokeComposer."""
|
191
|
-
kc = KaraokeComposer.from_file(toml_file)
|
191
|
+
kc = KaraokeComposer.from_file(toml_file, logger=self.logger)
|
192
192
|
kc.compose()
|
193
193
|
# kc.create_mp4(height=1080, fps=30)
|
194
194
|
|
@@ -302,6 +302,7 @@ class CDGGenerator:
|
|
302
302
|
"lead_in_duration",
|
303
303
|
"lead_in_total",
|
304
304
|
"title_artist_gap",
|
305
|
+
"title_top_padding",
|
305
306
|
"intro_duration_seconds",
|
306
307
|
"first_syllable_buffer_seconds",
|
307
308
|
"outro_background",
|
@@ -414,6 +415,8 @@ class CDGGenerator:
|
|
414
415
|
"title_screen_transition": cdg_styles["title_screen_transition"],
|
415
416
|
"instrumentals": instrumentals,
|
416
417
|
"intro_duration_seconds": cdg_styles["intro_duration_seconds"],
|
418
|
+
"title_top_padding": cdg_styles["title_top_padding"],
|
419
|
+
"title_artist_gap": cdg_styles["title_artist_gap"],
|
417
420
|
"first_syllable_buffer_seconds": cdg_styles["first_syllable_buffer_seconds"],
|
418
421
|
"outro_background": cdg_styles["outro_background"],
|
419
422
|
"outro_transition": cdg_styles["outro_transition"],
|