mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-25 15:25:44 +00:00
fix: import issues and changed some files around
This commit is contained in:
@@ -26,9 +26,9 @@ import type {
|
||||
ZoomFocus,
|
||||
ZoomRegion,
|
||||
} from "../types";
|
||||
import KeyframeMarkers from "./KeyframeMarkers";
|
||||
import TimelineWrapper from "./TimelineWrapper";
|
||||
import { useAudioPeaks } from "./useAudioPeaks";
|
||||
import KeyframeMarkers from "./components/markers/KeyframeMarkers";
|
||||
import TimelineWrapper from "./components/wrapper/TimelineWrapper";
|
||||
import { useTimelineAudioPeaks } from "./hooks/useTimelineAudioPeaks";
|
||||
import { calculateTimelineScale } from "./core/time";
|
||||
import { useTimelineEditorRuntime } from "./hooks/useTimelineEditorRuntime";
|
||||
import { useTimelineRange } from "./hooks/useTimelineRange";
|
||||
@@ -177,7 +177,7 @@ const TimelineEditor = forwardRef<TimelineEditorHandle, TimelineEditorProps>(
|
||||
zoom: "Ctrl + Scroll",
|
||||
});
|
||||
const { shortcuts: keyShortcuts, isMac } = useShortcuts();
|
||||
const audioPeaks = useAudioPeaks(videoPath);
|
||||
const audioPeaks = useTimelineAudioPeaks(videoPath);
|
||||
|
||||
useEffect(() => {
|
||||
if (aspectRatio === "native") {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Plus } from "@phosphor-icons/react";
|
||||
import { memo, useMemo, type MouseEventHandler } from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import AudioWaveform from "../../AudioWaveform";
|
||||
import AudioWaveform from "../waveform/AudioWaveform";
|
||||
import glassStyles from "../../ItemGlass.module.css";
|
||||
import Item from "../../Item";
|
||||
import Row from "../../Row";
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { useTimelineContext } from "dnd-timeline";
|
||||
import { memo, useCallback, useEffect, useRef, useState } from "react";
|
||||
import type { AudioPeaksData } from "./core/timelineTypes";
|
||||
import type { AudioPeaksData } from "../../core/timelineTypes";
|
||||
|
||||
interface AudioWaveformProps {
|
||||
peaks: AudioPeaksData;
|
||||
+2
-2
@@ -10,12 +10,12 @@ import type {
|
||||
import { TimelineContext } from "dnd-timeline";
|
||||
import type { Dispatch, ReactNode, SetStateAction } from "react";
|
||||
import { useCallback, useRef } from "react";
|
||||
import type { TimelineRegionSpan } from "../../core/timelineTypes";
|
||||
import {
|
||||
clampRange,
|
||||
resolveDragEnd,
|
||||
resolveResizeEnd,
|
||||
type TimelineRegionSpan,
|
||||
} from "./dnd/engine";
|
||||
} from "../../dnd/engine";
|
||||
|
||||
interface TimelineWrapperProps {
|
||||
children: ReactNode;
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
import { useCallback, useMemo } from "react";
|
||||
import { resolveMediaElementSource } from "@/lib/exporter/localMediaSource";
|
||||
import type { TimelineAudioRegion } from "../core/timelineTypes";
|
||||
import { resolveAudioPlacement } from "./timelineAudioPlacement";
|
||||
import { timelineNotifications } from "./timelineNotifications";
|
||||
import type { TimelineAudioRegion } from "../../core/timelineTypes";
|
||||
import { resolveAudioPlacement } from "../utils/timelineAudioPlacement";
|
||||
import { timelineNotifications } from "../utils/timelineNotifications";
|
||||
|
||||
interface AudioFilePickerResult {
|
||||
success: boolean;
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
import type { Span } from "dnd-timeline";
|
||||
import { useCallback, useEffect, useMemo } from "react";
|
||||
import type { CursorTelemetryPoint, ZoomFocus, ZoomRegion } from "../../types";
|
||||
import { buildInteractionZoomSuggestions } from "../zoomSuggestionUtils";
|
||||
import { timelineNotifications } from "./timelineNotifications";
|
||||
import type { CursorTelemetryPoint, ZoomFocus, ZoomRegion } from "../../../types";
|
||||
import { buildInteractionZoomSuggestions } from "../../zoomSuggestionUtils";
|
||||
import { timelineNotifications } from "../utils/timelineNotifications";
|
||||
|
||||
interface UseTimelineZoomActionsParams {
|
||||
timeline: {
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import type { AudioPeaksData } from "./core/timelineTypes";
|
||||
import type { AudioPeaksData } from "../core/timelineTypes";
|
||||
|
||||
/** Number of peak bins to produce — enough for smooth display at any zoom. */
|
||||
const TARGET_PEAK_COUNT = 2048;
|
||||
@@ -10,7 +10,7 @@ const TARGET_PEAK_COUNT = 2048;
|
||||
*
|
||||
* Returns `null` while loading or if the file has no decodeable audio.
|
||||
*/
|
||||
export function useAudioPeaks(fileUrl: string | null | undefined): AudioPeaksData | null {
|
||||
export function useTimelineAudioPeaks(fileUrl: string | null | undefined): AudioPeaksData | null {
|
||||
const [data, setData] = useState<AudioPeaksData | null>(null);
|
||||
const urlRef = useRef(fileUrl);
|
||||
|
||||
@@ -3,12 +3,12 @@ import { useCallback, useImperativeHandle } from "react";
|
||||
import type { ForwardedRef, RefObject } from "react";
|
||||
import type { TimelineShortcutBindings } from "../core/timelineTypes";
|
||||
import { useTimelineDndBindings } from "./useTimelineDndBindings";
|
||||
import { useTimelineAnnotationsActions } from "./useTimelineAnnotationsActions";
|
||||
import { useTimelineAudioActions } from "./useTimelineAudioActions";
|
||||
import { useTimelineAnnotationsActions } from "./actions/useTimelineAnnotationsActions";
|
||||
import { useTimelineAudioActions } from "./actions/useTimelineAudioActions";
|
||||
import { useTimelineKeyboardShortcuts } from "./useTimelineKeyboardShortcuts";
|
||||
import { useTimelineNormalization } from "./useTimelineNormalization";
|
||||
import { useTimelineSelection } from "./useTimelineSelection";
|
||||
import { useTimelineZoomActions } from "./useTimelineZoomActions";
|
||||
import { useTimelineZoomActions } from "./actions/useTimelineZoomActions";
|
||||
import type {
|
||||
AnnotationRegion,
|
||||
AudioRegion,
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { spansOverlap } from "../core/spans";
|
||||
import type { TimelineAudioRegion } from "../core/timelineTypes";
|
||||
import { spansOverlap } from "../../core/spans";
|
||||
import type { TimelineAudioRegion } from "../../core/timelineTypes";
|
||||
|
||||
interface ResolveAudioPlacementParams {
|
||||
audioRegions: TimelineAudioRegion[];
|
||||
Reference in New Issue
Block a user