summaryrefslogtreecommitdiff
path: root/apps/web/src/types
diff options
context:
space:
mode:
authorvishesh711 <mail4vishesh@gmail.com>2025-07-15 12:36:53 -0400
committervishesh711 <mail4vishesh@gmail.com>2025-07-15 12:36:53 -0400
commitd3204f6cd7772fe63d19ef8892664335d615c9de (patch)
tree06e86f34d73158cbb7c09406ac8bead8bbaf55c4 /apps/web/src/types
parent1f95bb98d6108a5fa059e0f9a08c98e5bdb72c08 (diff)
downloadopencut-d3204f6cd7772fe63d19ef8892664335d615c9de.tar.gz
feat: Add comprehensive keyboard shortcuts system for video editor
- Implement industry-standard video editing shortcuts (Space, J/K/L, arrows) - Add playback controls: Space (play/pause), J/K/L (rewind/pause/forward) - Add navigation: arrow keys (frame stepping), Shift+arrows (5s jumps), Home/End - Add editing shortcuts: S (split at playhead), N (toggle snapping) - Add selection shortcuts: Ctrl/Cmd+A (select all), Ctrl/Cmd+D (duplicate) - Add keyboard shortcuts help dialog with categorized shortcuts display - Integrate help button in editor header for discoverability - Add TypeScript type declarations for better development experience - Fix Docker build environment variable validation issues All shortcuts follow professional video editing standards (Avid/Premiere/Final Cut). Context-aware shortcuts that don't interfere with text input fields. Toast notifications provide user feedback for better UX.
Diffstat (limited to 'apps/web/src/types')
-rw-r--r--apps/web/src/types/global.d.ts19
-rw-r--r--apps/web/src/types/modules.d.ts64
2 files changed, 83 insertions, 0 deletions
diff --git a/apps/web/src/types/global.d.ts b/apps/web/src/types/global.d.ts
new file mode 100644
index 00000000..f99e4cc3
--- /dev/null
+++ b/apps/web/src/types/global.d.ts
@@ -0,0 +1,19 @@
+/// <reference types="react" />
+/// <reference types="react-dom" />
+
+// Global React types
+declare global {
+ namespace JSX {
+ interface IntrinsicElements {
+ [elemName: string]: any;
+ }
+ }
+}
+
+// React module declarations
+declare module 'react' {
+ export * from '@types/react';
+}
+
+// Ensure this file is treated as a module
+export {}; \ No newline at end of file
diff --git a/apps/web/src/types/modules.d.ts b/apps/web/src/types/modules.d.ts
new file mode 100644
index 00000000..945b23fb
--- /dev/null
+++ b/apps/web/src/types/modules.d.ts
@@ -0,0 +1,64 @@
+// Type declarations for external modules without @types packages
+
+declare module 'lucide-react' {
+ import { FC, SVGProps } from 'react';
+
+ export interface IconProps extends SVGProps<SVGSVGElement> {
+ size?: string | number;
+ strokeWidth?: string | number;
+ }
+
+ export const Scissors: FC<IconProps>;
+ export const ArrowLeftToLine: FC<IconProps>;
+ export const ArrowRightToLine: FC<IconProps>;
+ export const Trash2: FC<IconProps>;
+ export const Snowflake: FC<IconProps>;
+ export const Copy: FC<IconProps>;
+ export const SplitSquareHorizontal: FC<IconProps>;
+ export const Pause: FC<IconProps>;
+ export const Play: FC<IconProps>;
+ export const Video: FC<IconProps>;
+ export const Music: FC<IconProps>;
+ export const TypeIcon: FC<IconProps>;
+ export const Magnet: FC<IconProps>;
+ export const Lock: FC<IconProps>;
+ export const ChevronLeft: FC<IconProps>;
+ export const Download: FC<IconProps>;
+ export const Keyboard: FC<IconProps>;
+ export const SkipBack: FC<IconProps>;
+ export const SkipForward: FC<IconProps>;
+ // Add other icons as needed
+}
+
+declare module 'sonner' {
+ export interface ToastOptions {
+ duration?: number;
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center';
+ style?: React.CSSProperties;
+ className?: string;
+ description?: string;
+ action?: {
+ label: string;
+ onClick: () => void;
+ };
+ cancel?: {
+ label: string;
+ onClick?: () => void;
+ };
+ id?: string | number;
+ onDismiss?: (toast: any) => void;
+ onAutoClose?: (toast: any) => void;
+ }
+
+ export interface Toast {
+ success: (message: string, options?: ToastOptions) => void;
+ error: (message: string, options?: ToastOptions) => void;
+ info: (message: string, options?: ToastOptions) => void;
+ warning: (message: string, options?: ToastOptions) => void;
+ loading: (message: string, options?: ToastOptions) => void;
+ custom: (jsx: React.ReactNode, options?: ToastOptions) => void;
+ }
+
+ export const toast: Toast;
+ export const Toaster: React.FC<any>;
+} \ No newline at end of file