The swiss army knife of lossless video/audio editing
Use @mifi/lint-config 1.1.0, with one-line doc comments again
Claude70ee501f48a2
diff --git a/package.json b/package.jsonindex 43619692..2a81d0dc 100644--- a/package.json+++ b/package.json@@ -54,7 +54,7 @@"@dnd-kit/modifiers": "^9.0.0","@dnd-kit/sortable": "^10.0.0","@fontsource/open-sans": "^5.2.7",- "@mifi/lint-config": "^1.0.0",+ "@mifi/lint-config": "^1.1.0","@radix-ui/colors": "^3.0.0","@radix-ui/react-alert-dialog": "^1.1.15","@radix-ui/react-checkbox": "^1.3.3",diff --git a/script/featureMedia/socialVideo.ts b/script/featureMedia/socialVideo.tsindex 6c482597..34e4180e 100644--- a/script/featureMedia/socialVideo.ts+++ b/script/featureMedia/socialVideo.ts@@ -96,16 +96,12 @@ export async function renderSocialVideo({ ffmpeg, rawVideo, videoStart, durationffmpeg: string,rawVideo: string,videoStart: number,- /**- Of the video after videoStart- */+ /** Of the video after videoStart */duration: number,captions: Caption[],zooms: Zoom[],description: string,- /**- An audio file, or undefined for no music- */+ /** An audio file, or undefined for no music */music: string | undefined,windowWidth: number,windowHeight: number,diff --git a/script/featureMedia/types.ts b/script/featureMedia/types.tsindex c561f608..0a1b6202 100644--- a/script/featureMedia/types.ts+++ b/script/featureMedia/types.ts@@ -1,58 +1,34 @@import type { Rect } from './socialVideo.ts';export interface ScenarioContext {- /**- Opens clips from the clips folder (several go to the batch list)- */+ /** Opens clips from the clips folder (several go to the batch list) */open: (...clips: string[]) => Promise<void>,- /**- Runs a keyboard action (see the Keyboard & mouse shortcuts dialog for names), optionally with arguments- */+ /** Runs a keyboard action (see the Keyboard & mouse shortcuts dialog for names), optionally with arguments */action: (name: string, args?: unknown) => Promise<void>,- /**- Runs an action that opens a dialog with a text field, types the text (if any) and confirms- */+ /** Runs an action that opens a dialog with a text field, types the text (if any) and confirms */actionWithDialog: (name: string, text?: string) => Promise<void>,- /**- Presses keys with xdotool, e.g. 'Return' to confirm a dialog that an action opened (start the action without awaiting it)- */+ /** Presses keys with xdotool, e.g. 'Return' to confirm a dialog that an action opened (start the action without awaiting it) */key: (keys: string) => Promise<void>,- /**- Types text with xdotool- */+ /** Types text with xdotool */type: (text: string) => Promise<void>,- /**- Clicks at a position in the 1024×640 window (find it in a screenshot)- */+ /** Clicks at a position in the 1024×640 window (find it in a screenshot) */click: (x: number, y: number) => Promise<void>,- /**- Saves a screenshot as <scenario>-<name>.png, optionally of only a part of the window (as for click)- */+ /** Saves a screenshot as <scenario>-<name>.png, optionally of only a part of the window (as for click) */shot: (name: string, crop?: Rect) => Promise<void>,wait: (ms: number) => Promise<void>,- /**- Starts the video here instead of at the beginning, e.g. after opening the file- */+ /** Starts the video here instead of at the beginning, e.g. after opening the file */startVideo: () => void,- /**- Shows a caption in the social media versions from now until the next one (or none with no text)- */+ /** Shows a caption in the social media versions from now until the next one (or none with no text) */caption: (text?: string) => void,- /**- Zooms the social media versions in on a part of the window (as for click), or back out with no rect- */+ /** Zooms the social media versions in on a part of the window (as for click), or back out with no rect */zoom: (rect?: Rect) => void,}export interface Scenario {description: string,- /**- File names of the clips it needs, from the clips folder or downloaded- */+ /** File names of the clips it needs, from the clips folder or downloaded */clips: string[],- /**- Settings to start with (see src/main/configStore.ts), e.g. to show an export mode- */+ /** Settings to start with (see src/main/configStore.ts), e.g. to show an export mode */config?: Record<string, unknown>,run: (ctx: ScenarioContext) => Promise<void>,}diff --git a/src/common/ffprobe.ts b/src/common/ffprobe.tsindex 80979a75..7829bcea 100644--- a/src/common/ffprobe.ts+++ b/src/common/ffprobe.ts@@ -158,128 +158,78 @@@property {FFprobeProbeError} [error] The error that occurred when trying to probe the file (-show_error flag required)*/-/**-The "disposition" field on an FFprobe response stream object-*/+/** The "disposition" field on an FFprobe response stream object */export interface FFprobeStreamDisposition {- /**- 1 if the default track- */+ /** 1 if the default track */default: 1 | 0,- /**- 1 if a dub track- */+ /** 1 if a dub track */dub: 1 | 0,- /**- 1 if the original track- */+ /** 1 if the original track */original: 1 | 0,- /**- 1 if a comment track- */+ /** 1 if a comment track */comment: 1 | 0,- /**- 1 if a lyrics track- */+ /** 1 if a lyrics track */lyrics: 1 | 0,- /**- 1 if a karaoke track- */+ /** 1 if a karaoke track */karaoke: 1 | 0,- /**- 1 if a forced track- */+ /** 1 if a forced track */forced: 1 | 0,- /**- 1 if a track for the hearing impaired- */+ /** 1 if a track for the hearing impaired */hearing_impaired: 1 | 0,- /**- 1 if a track for the visually impaired- */+ /** 1 if a track for the visually impaired */visual_impaired: 1 | 0,- /**- 1 if a clean effects track- */+ /** 1 if a clean effects track */clean_effects: 1 | 0,- /**- 1 if an attached picture track- */+ /** 1 if an attached picture track */attached_pic: 1 | 0,- /**- 1 if a timed thumbnails track (perhaps like the preview thumbnails you get when scrolling over a YouTube video's seek bar)- */+ /** 1 if a timed thumbnails track (perhaps like the preview thumbnails you get when scrolling over a YouTube video's seek bar) */timed_thumbnails: 1 | 0,- /**- 1 if a captions track- */+ /** 1 if a captions track */captions: 1 | 0,- /**- 1 if a descriptions track- */+ /** 1 if a descriptions track */descriptions: 1 | 0,- /**- 1 if a metadata track- */+ /** 1 if a metadata track */metadata: 1 | 0,- /**- 1 if a dependent track (unclear meaning)- */+ /** 1 if a dependent track (unclear meaning) */dependent: 1 | 0,- /**- 1 if a still image track- */+ /** 1 if a still image track */still_image: 1 | 0}-/**-The "tags" field on an FFprobe response stream object-*/+/** The "tags" field on an FFprobe response stream object */export type FFprobeStreamTags = {- /**- The track's language (usually represented using a 3 letter language code, e.g.: "eng")- */+ /** The track's language (usually represented using a 3 letter language code, e.g.: "eng") */language?: string,- /**- The name of the handler which produced the track- */+ /** The name of the handler which produced the track */handler_name?: string,- /**- The ID of the vendor which produced the track- */+ /** The ID of the vendor which produced the track */vendor_id?: string,- /**- The name of the encoder responsible for creating the stream- */+ /** The name of the encoder responsible for creating the stream */encoder?: string,- /**- The date (often ISO-formatted, but it may use other formats) when the media was created- */+ /** The date (often ISO-formatted, but it may use other formats) when the media was created */creation_time?: string,- /**- The comment attached to the stream- */+ /** The comment attached to the stream */comment?: stringrotate?: string,@@ -288,497 +238,299 @@ export type FFprobeStreamTags = {title?: string,} & Record<string, string>;-/**-An FFprobe response stream object-*/+/** An FFprobe response stream object */export interface FFprobeStream {- /**- The stream index- */+ /** The stream index */index: number,- /**- The codec's name- */+ /** The codec's name */codec_name: string,- /**- The codec's long (detailed) name- */+ /** The codec's long (detailed) name */codec_long_name: string,- /**- The codec profile- */+ /** The codec profile */profile: string,- /**- The type of codec (video, audio, subtitle, etc.)- */+ /** The type of codec (video, audio, subtitle, etc.) */codec_type: 'video' | 'audio' | 'subtitle' | 'attachment' | 'data',- /**- The codec tag (technical name)- */+ /** The codec tag (technical name) */codec_tag_string: string,- /**- The codec tag ID- */+ /** The codec tag ID */codec_tag: string,- /**- The audio sample format (not present if codec_type is not "audio")- */+ /** The audio sample format (not present if codec_type is not "audio") */sample_fmt?: string,- /**- A string representation of an integer showing the audio sample rate (not present if codec_type is not "audio")- */+ /** A string representation of an integer showing the audio sample rate (not present if codec_type is not "audio") */sample_rate?: string,- /**- The audio track's channel count (not present if codec_type is not "audio")- */+ /** The audio track's channel count (not present if codec_type is not "audio") */channels?: number,- /**- The audio track's channel layout (e.g. "stereo") (not present if codec_type is not "audio")- */+ /** The audio track's channel layout (e.g. "stereo") (not present if codec_type is not "audio") */channel_layout?: string,- /**- Bits per audio sample (might not be accurate, may just be 0) (not present if codec_type is not "audio")- */+ /** Bits per audio sample (might not be accurate, may just be 0) (not present if codec_type is not "audio") */bits_per_sample?: number,- /**- The video stream width (also available for images) (not present if codec_type is not "video")- */+ /** The video stream width (also available for images) (not present if codec_type is not "video") */width?: number,- /**- The stream height (also available for images) (not present if codec_type is not "video")- */+ /** The stream height (also available for images) (not present if codec_type is not "video") */height?: number,- /**- The stream's coded width (shouldn't vary from "width") (not present if codec_type is not "video")- */+ /** The stream's coded width (shouldn't vary from "width") (not present if codec_type is not "video") */coded_width?: number,- /**- The stream's coded height (shouldn't vary from "height") (not present if codec_type is not "video")- */+ /** The stream's coded height (shouldn't vary from "height") (not present if codec_type is not "video") */coded_height?: number,- /**- Set to 1 if closed captions are present in stream... I think (not present if codec_type is not "video")- */+ /** Set to 1 if closed captions are present in stream... I think (not present if codec_type is not "video") */closed_captions?: 1 | 0 | number,- /**- Set to 1 if the stream has b-frames... I think (not present if codec_type is not "video")- */+ /** Set to 1 if the stream has b-frames... I think (not present if codec_type is not "video") */has_b_frames?: 1 | 0 | number,- /**- The sample aspect ratio (you probably want "display_aspect_ratio") (not present if codec_type is not "video")- */+ /** The sample aspect ratio (you probably want "display_aspect_ratio") (not present if codec_type is not "video") */sample_aspect_ratio?: string,- /**- The display (real) aspect ratio (e.g. "16:9") (not present if codec_type is not "video")- */+ /** The display (real) aspect ratio (e.g. "16:9") (not present if codec_type is not "video") */display_aspect_ratio?: string,- /**- The pixel format used (not present if codec_type is not "video")- */+ /** The pixel format used (not present if codec_type is not "video") */pix_fmt?: string,- /**- Unknown (not present if codec_type is not "video")- */+ /** Unknown (not present if codec_type is not "video") */level?: number,- /**- The color range used (e.g. "tv") (not present if codec_type is not "video")- */+ /** The color range used (e.g. "tv") (not present if codec_type is not "video") */color_range?: string,- /**- The color space used (not present if codec_type is not "video")- */+ /** The color space used (not present if codec_type is not "video") */color_space?: string,- /**- The color transfer used (not present if codec_type is not "video")- */+ /** The color transfer used (not present if codec_type is not "video") */color_transfer?: string,- /**- The color primaries used (not present if codec_type is not "video")- */+ /** The color primaries used (not present if codec_type is not "video") */color_primaries?: string,- /**- The chroma location (not present if codec_type is not "video")- */+ /** The chroma location (not present if codec_type is not "video") */chroma_location?: string,- /**- Unknown (not present if codec_type is not "video")- */+ /** Unknown (not present if codec_type is not "video") */refs?: number,- /**- Whether the stream is AVC (not present if codec_type is not "video")- */+ /** Whether the stream is AVC (not present if codec_type is not "video") */is_avc?: 'true' | 'false',- /**- Unknown string representing a number (not present if codec_type is not "video")- */+ /** Unknown string representing a number (not present if codec_type is not "video") */nal_length_size?: string,- /**- Odd formatting of the frame rate, possibly "real frame rate"? (e.g. "30/1")- */+ /** Odd formatting of the frame rate, possibly "real frame rate"? (e.g. "30/1") */r_frame_rate: string,- /**- Odd formatting of the average frame rate (e.g. "30/1")- */+ /** Odd formatting of the average frame rate (e.g. "30/1") */avg_frame_rate: string,- /**- The division equation to use for converting integer representations of timestamps into seconds (e.g. "1/30000" turns 80632552 into 2687.751733 seconds)- */+ /** The division equation to use for converting integer representations of timestamps into seconds (e.g. "1/30000" turns 80632552 into 2687.751733 seconds) */time_base: string,- /**- Unknown- */+ /** Unknown */start_pts: number,- /**- A string representation of a floating point integer showing the start time in seconds- */+ /** A string representation of a floating point integer showing the start time in seconds */start_time: string,- /**- The stream's duration in integer timestamp format (defined by time_base)- */+ /** The stream's duration in integer timestamp format (defined by time_base) */duration_ts: number,- /**- A string representation of a floating point integer showing the stream duration in seconds- */+ /** A string representation of a floating point integer showing the stream duration in seconds */duration: string,- /**- The string representation of an integer showing the stream bit rate (not present on lossless formats such as FLAC)- */+ /** The string representation of an integer showing the stream bit rate (not present on lossless formats such as FLAC) */bit_rate?: string,- /**- A string representation of an integer showing the bits per raw sample (not present if codec_type is not "video")- */+ /** A string representation of an integer showing the bits per raw sample (not present if codec_type is not "video") */bits_per_raw_sample?: string,- /**- A string representation of an integer showing the total number of frames in the stream- */+ /** A string representation of an integer showing the total number of frames in the stream */nb_frames: string,- /**- The stream's disposition- */+ /** The stream's disposition */disposition: FFprobeStreamDisposition,- /**- The stream's tags- */+ /** The stream's tags */tags?: FFprobeStreamTags}-/**-The "tags" field on an FFprobe response chapter object-*/+/** The "tags" field on an FFprobe response chapter object */export interface FFprobeChapterTags {- /**- The chapter title- */+ /** The chapter title */title: string}-/**-An FFprobe response chapter object-*/+/** An FFprobe response chapter object */export interface FFprobeChapter {- /**- The chapter ID- */+ /** The chapter ID */id: number,- /**- The division equation to use for converting integer representations of timestamps into seconds (e.g. "1/30000" turns 80632552 into 2687.751733 seconds)- */+ /** The division equation to use for converting integer representations of timestamps into seconds (e.g. "1/30000" turns 80632552 into 2687.751733 seconds) */time_base: string,- /**- When the chapter starts in integer timestamp format (defined by time_base)- */+ /** When the chapter starts in integer timestamp format (defined by time_base) */start: number,- /**- The string representation of a floating point integer showing when the chapter starts in seconds- */+ /** The string representation of a floating point integer showing when the chapter starts in seconds */start_time: string,- /**- When the chapter end in integer timestamp format (defined by time_base)- */+ /** When the chapter end in integer timestamp format (defined by time_base) */end: number,- /**- The string representation of a floating point integer showing when the chapter ends in seconds- */+ /** The string representation of a floating point integer showing when the chapter ends in seconds */end_time: string,- /**- The chapter's tags- */+ /** The chapter's tags */tags?: FFprobeChapterTags}-/**-The "tags" field on an FFprobe response format object-*/+/** The "tags" field on an FFprobe response format object */export type FFprobeFormatTags = {- /**- Not clear, probably the media type brand, but not sure- */+ /** Not clear, probably the media type brand, but not sure */major_brand: string,- /**- The brand version perhaps, but not sure- */+ /** The brand version perhaps, but not sure */minor_version: string,- /**- The brands that are compatible with the referenced brands perhaps, but not sure- */+ /** The brands that are compatible with the referenced brands perhaps, but not sure */compatible_brands: string,- /**- The media's title (song metadata uses an all uppercase version)- */+ /** The media's title (song metadata uses an all uppercase version) */title?: string,- /**- The media artist (song metadata uses an all uppercase version)- */+ /** The media artist (song metadata uses an all uppercase version) */artist?: string,- /**- The media's creation date, seems to be in YYYYMMDD format (song metadata uses an all uppercase version)- */+ /** The media's creation date, seems to be in YYYYMMDD format (song metadata uses an all uppercase version) */date?: string,- /**- The name of the encoder responsible for encoding the media- */+ /** The name of the encoder responsible for encoding the media */encoder?: string,- /**- The comment attached to the file- */+ /** The comment attached to the file */comment?: string,- /**- The description attached to the file- */+ /** The description attached to the file */description?: string,- /**- The ISO-formatted date (although it may use other formats) when the media was created- */+ /** The ISO-formatted date (although it may use other formats) when the media was created */creation_time?: string,- /**- The album (only present in audio files)- */+ /** The album (only present in audio files) */ALBUM?: string,- /**- The album arist (only present in audio files)- */+ /** The album arist (only present in audio files) */album_artist?: string,- /**- The album artist name used for sorting probably (only present in audio files)- */+ /** The album artist name used for sorting probably (only present in audio files) */ALBUMARTISTSORT?: string,- /**- The song artist (only present in audio files)- */+ /** The song artist (only present in audio files) */ARTIST?: string,- /**- The date when the song was created (no particular format, often the year) (only present in audio files)- */+ /** The date when the song was created (no particular format, often the year) (only present in audio files) */DATE?: string,- /**- The string representation of an integer showing the song's disc number (only present in audio files)- */+ /** The string representation of an integer showing the song's disc number (only present in audio files) */disc?: string,- /**- The string representation of an integer showing the total number of discs comprising the album the song is in (only present in audio files)- */+ /** The string representation of an integer showing the total number of discs comprising the album the song is in (only present in audio files) */DISCTOTAL?: string,- /**- The song's International Standard Recording Code- */+ /** The song's International Standard Recording Code */ISRC?: string,- /**- The song's genre (only present in audio files)- */+ /** The song's genre (only present in audio files) */GENRE?: string,- /**- The song's title (only present in audio files)- */+ /** The song's title (only present in audio files) */TITLE?: string,- /**- The string representation of an integer showing the song's track number (only present in audio files)- */+ /** The string representation of an integer showing the song's track number (only present in audio files) */track?: string,- /**- The string representation of an integer showing the total number of tracks in the album the song is in (only present in audio files)- */+ /** The string representation of an integer showing the total number of tracks in the album the song is in (only present in audio files) */TRACKTOTAL?: string,- /**- The string representation of an integer showing the year the song was created (only present in audio files)- */+ /** The string representation of an integer showing the year the song was created (only present in audio files) */YEAR?: string,- /**- The string representation of an integer showing the song's BPM (only present in audio files)- */+ /** The string representation of an integer showing the song's BPM (only present in audio files) */BPM?: string,- /**- The song's publisher (only present in audio files)- */+ /** The song's publisher (only present in audio files) */PUBLISHER?: string} & Record<string, string>;-/**-An FFprobe response format object-*/+/** An FFprobe response format object */export interface FFprobeFormat {- /**- The path of the probed file (as specified in the input file argument)- */+ /** The path of the probed file (as specified in the input file argument) */filename: string,- /**- The total number of streams present- */+ /** The total number of streams present */nb_streams: number,- /**- The total number of programs present- */+ /** The total number of programs present */nb_programs: number,- /**- The name of the format (a comma separated list of applicable file extensions for the format)- */+ /** The name of the format (a comma separated list of applicable file extensions for the format) */format_name: string,- /**- The long (detailed) name of the format- */+ /** The long (detailed) name of the format */format_long_name: string,- /**- The string representation of a floating point integer showing the file's starting time- */+ /** The string representation of a floating point integer showing the file's starting time */start_time: string,- /**- The string representation of a floating point integer showing the file's duration in seconds (seems to be a non-accurate, rounded version of the real duration)- */+ /** The string representation of a floating point integer showing the file's duration in seconds (seems to be a non-accurate, rounded version of the real duration) */duration: string,- /**- The string representation of a long integer showing the file's size in bytes- */+ /** The string representation of a long integer showing the file's size in bytes */size: string,- /**- The string representation of a long integer showing the file's stated bitrate (may vary between streams, probably applies to just video if a video file)- */+ /** The string representation of a long integer showing the file's stated bitrate (may vary between streams, probably applies to just video if a video file) */bit_rate: string,- /**- A score of how confident FFprobe is of the format, 0 to 100. https://stackoverflow.com/questions/25257986/what-does-probe-score-mean-in-ffprobe-output- */+ /** A score of how confident FFprobe is of the format, 0 to 100. https://stackoverflow.com/questions/25257986/what-does-probe-score-mean-in-ffprobe-output */probe_score: number,- /**- The format's tags- */+ /** The format's tags */tags?: FFprobeFormatTags}-/**-An FFprobe error object-*/+/** An FFprobe error object */export interface FFprobeProbeError {- /**- The error code- */+ /** The error code */code: number,- /**- The error message- */+ /** The error message */string: string}-/**-An FFprobe probe result object-*/+/** An FFprobe probe result object */export interface FFprobeProbeResult {- /**- The probed file's streams (-show_streams flag required)- */+ /** The probed file's streams (-show_streams flag required) */streams?: FFprobeStream[],- /**- The probed file's chapters (-show_chapters flag required)- */+ /** The probed file's chapters (-show_chapters flag required) */chapters?: FFprobeChapter[],- /**- The probed file's format data (-show_format flag required)- */+ /** The probed file's format data (-show_format flag required) */format?: FFprobeFormat,- /**- The error that occurred when trying to probe the file (-show_error flag required)- */+ /** The error that occurred when trying to probe the file (-show_error flag required) */error?: FFprobeProbeError}diff --git a/src/common/types.ts b/src/common/types.tsindex 54d8bae0..8ce5a9b8 100644--- a/src/common/types.ts+++ b/src/common/types.ts@@ -82,17 +82,11 @@ export const configSchema = z.object({autoLoadTimecode: z.boolean(),segmentsToChapters: z.boolean(),simpleMode: z.boolean(),- /**- todo: rename to cutFileTemplate- */+ /** todo: rename to cutFileTemplate */outSegTemplate: z.string().or(z.undefined()),- /**- todo: rename to cutMergedFileTemplate- */+ /** todo: rename to cutMergedFileTemplate */mergedFileTemplate: z.string().or(z.undefined()),- /**- todo: rename to mergedFileTemplate- */+ /** todo: rename to mergedFileTemplate */mergedFilesTemplate: z.string().or(z.undefined()),keyboardSeekAccFactor: z.number(),keyboardNormalSeekSpeed: z.number(),diff --git a/src/common/userTypes.ts b/src/common/userTypes.tsindex 39d937c2..f08ec4a0 100644--- a/src/common/userTypes.ts+++ b/src/common/userTypes.ts@@ -1,4 +1,4 @@-/* eslint-disable unicorn-js/single-line-block-comment-style, unicorn-js/no-asterisk-prefix-in-documentation-comments -- these doc comments are published as is in docs/generated/types.md */+/* eslint-disable unicorn-js/no-asterisk-prefix-in-documentation-comments -- these doc comments are published as is in docs/generated/types.md */// ⚠️ These types are a the contract with the user, through the documentation.// ⚠️ JSDoc comments get converted to user documentation.// ‼️ DO NOT change these types without considering the user impact!diff --git a/src/main/ffmpeg.ts b/src/main/ffmpeg.tsindex 1ffe5b98..292f6251 100644--- a/src/main/ffmpeg.ts+++ b/src/main/ffmpeg.ts@@ -78,9 +78,7 @@ export async function checkFfExists(cmd: FfCommand) {}const getFfprobePath = () => getFfPath('ffprobe');-/**-⚠️ Do not use directly when running ffmpeg, because we need to add certain options before running, like `LD_LIBRARY_PATH` on linux-*/+/** ⚠️ Do not use directly when running ffmpeg, because we need to add certain options before running, like `LD_LIBRARY_PATH` on linux */export const getFfmpegPath = () => getFfPath('ffmpeg');export function abortFfmpegs() {diff --git a/src/renderer/src/components/ErrorDialog.tsx b/src/renderer/src/components/ErrorDialog.tsxindex 74a37cd2..52d62478 100644--- a/src/renderer/src/components/ErrorDialog.tsx+++ b/src/renderer/src/components/ErrorDialog.tsx@@ -11,9 +11,7 @@ export interface GenericError {title?: string | undefined;}-/**-We need to be able to show errors from anywhere in the app, also while dialogs are open. Also originating from keyboard actions-*/+/** We need to be able to show errors from anywhere in the app, also while dialogs are open. Also originating from keyboard actions */export default function ErrorDialog({ error, onOpenChange }: {error: GenericError | undefined,onOpenChange: (open: boolean) => void,diff --git a/src/renderer/src/hooks/useErrorHandling.ts b/src/renderer/src/hooks/useErrorHandling.tsindex 758c6665..d16c42ab 100644--- a/src/renderer/src/hooks/useErrorHandling.ts+++ b/src/renderer/src/hooks/useErrorHandling.ts@@ -14,9 +14,7 @@ export default function useErrorHandling() {setGenericError({ title, err });}, []);- /**- Run an operation with error handling- */+ /** Run an operation with error handling */async function withErrorHandling(operation: () => Promise<void>, errorMsg?: string) {try {await operation();diff --git a/src/renderer/src/util/constants.ts b/src/renderer/src/util/constants.tsindex 3ec8b166..a9b670f4 100644--- a/src/renderer/src/util/constants.ts+++ b/src/renderer/src/util/constants.ts@@ -1,9 +1,7 @@// anything more than this will probably cause the UI to become unusably slowexport const maxSegmentsAllowed = 2000;-/**-Size of the window to extract keyframes/waveforms-*/+/** Size of the window to extract keyframes/waveforms */export const ffmpegExtractWindow = 60;export const zoomMax = 2 ** 14;diff --git a/src/renderer/src/util/streams.ts b/src/renderer/src/util/streams.tsindex 8ad16c3e..6ed6f097 100644--- a/src/renderer/src/util/streams.ts+++ b/src/renderer/src/util/streams.ts@@ -285,9 +285,7 @@ export function isStreamThumbnail(stream: Pick<FFprobeStream, 'codec_type' | 'direturn stream?.codec_type === 'video' && stream.disposition?.[attachedPicDisposition] === 1;}-/**-Resolves every stream that is going to be copied to the output. Unknown streams resolve to `undefined`.-*/+/** Resolves every stream that is going to be copied to the output. Unknown streams resolve to `undefined`. */const getCopiedStreams = ({ allFilesMeta, copyFileStreams }: {allFilesMeta: AllFilesStreamMeta,copyFileStreams: CopyfileStreams,diff --git a/website/src/lib/docs.ts b/website/src/lib/docs.tsindex cd7bdcaf..79e1ced8 100644--- a/website/src/lib/docs.ts+++ b/website/src/lib/docs.ts@@ -21,9 +21,7 @@ const descriptionOverrides: Record<string, string> = {'faq.md': 'Answers to common questions about LosslessCut: free vs app store versions, safety, supported operating systems, updating, and features it doesn\'t have.',};-/**-Site URL of a doc, by its path relative to docs/: `cli.md` -> `/docs/cli`, `index.md` -> `/docs`-*/+/** Site URL of a doc, by its path relative to docs/: `cli.md` -> `/docs/cli`, `index.md` -> `/docs` */export function getDocUrl(docPath: string) {return `/docs/${docPath.replace(/\.md$/, '').replace(/(^|\/)index$/, '')}`.replace(/\/$/, '');}@@ -41,19 +39,13 @@ function summarize(text: string, maxLength = 160) {return `${collapsed.slice(0, lastSpace > 0 ? lastSpace : maxLength - 1)}…`;}-/**-Path of a doc file relative to docs/, e.g. `cli.md`.-*/+/** Path of a doc file relative to docs/, e.g. `cli.md`. */export const getDocPath = (filePath: string) => path.relative(docsDir, filePath).split(path.sep).join('/');-/**-The heading that a doc's title is taken from: its first `# heading`.-*/+/** The heading that a doc's title is taken from: its first `# heading`. */export const findTitleHeading = (tree: Root) => tree.children.find((node): node is Heading => node.type === 'heading' && node.depth === 1);-/**-Frontmatter for a doc: title from its first heading, description from its first paragraph.-*/+/** Frontmatter for a doc: title from its first heading, description from its first paragraph. */function getFrontmatter(docPath: string, markdown: string) {// the frontmatter, if any, is parsed by the loaderconst tree = fromMarkdown(markdown.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n/, ''));@@ -67,9 +59,7 @@ function getFrontmatter(docPath: string, markdown: string) {};}-/**-Like Starlight's docsLoader, but for ../docs, and generates the frontmatter that Starlight needs.-*/+/** Like Starlight's docsLoader, but for ../docs, and generates the frontmatter that Starlight needs. */export function repoDocsLoader(): Loader {const globLoader = glob({base: docsDir,diff --git a/yarn.lock b/yarn.lockindex 01d8c727..a29c358c 100644--- a/yarn.lock+++ b/yarn.lock@@ -2066,9 +2066,9 @@ __metadata:languageName: nodelinkType: hard-"@mifi/lint-config@npm:^1.0.0":- version: 1.0.0- resolution: "@mifi/lint-config@npm:1.0.0"+"@mifi/lint-config@npm:^1.1.0":+ version: 1.1.0+ resolution: "@mifi/lint-config@npm:1.1.0"dependencies:"@eslint-react/eslint-plugin": "npm:^5.28.8""@stylistic/eslint-plugin": "npm:^5.10.0"@@ -2084,7 +2084,7 @@ __metadata:optional: truebin:mifi-lint-migrate: migrate.mjs- checksum: 10/2747a390b6b86922c6f7f5976af684f6145568980535b407975c464af4c1835346b0ca5f7f4fd2dc71d135ea80727ec6c1d5b6e38137ca423334931f141762a2+ checksum: 10/67ad1aa2a29b2df0495b5e0cca0f5de6a74a0c0b199ea36fe51b393ca0e08bf480c564d3081d938957e86e22d28120a4c927a7a902bad982294db41f31826f68languageName: nodelinkType: hard@@ -9348,7 +9348,7 @@ __metadata:"@dnd-kit/sortable": "npm:^10.0.0""@electron/remote": "npm:^2.1.3""@fontsource/open-sans": "npm:^5.2.7"- "@mifi/lint-config": "npm:^1.0.0"+ "@mifi/lint-config": "npm:^1.1.0""@radix-ui/colors": "npm:^3.0.0""@radix-ui/react-alert-dialog": "npm:^1.1.15""@radix-ui/react-checkbox": "npm:^1.3.3"