fix build errors

This commit is contained in:
Siddharth
2026-01-20 20:05:14 -08:00
parent 08f58b3539
commit 6d2e1edb5b
8 changed files with 263 additions and 444 deletions
@@ -671,7 +671,7 @@ export function SettingsPanel({
<div>
<div className="mb-1.5 text-xs font-medium text-slate-400">Output Size</div>
<div className="bg-white/5 border border-white/5 p-1 w-full grid grid-cols-3 h-auto rounded-xl">
{Object.entries(GIF_SIZE_PRESETS).map(([key, preset]) => (
{Object.entries(GIF_SIZE_PRESETS).map(([key, _preset]) => (
<button
key={key}
onClick={() => onGifSizePresetChange?.(key as GifSizePreset)}
+8 -8
View File
@@ -66,7 +66,7 @@ describe('GIF Exporter', () => {
* Feature: gif-export, Property 4: Aspect Ratio Preservation
*/
describe('Property 4: Aspect Ratio Preservation', () => {
const sizePresets: GifSizePreset[] = ['small', 'medium', 'large', 'original'];
const sizePresets: GifSizePreset[] = ['medium', 'large', 'original'];
it('should preserve aspect ratio within 0.01 tolerance for all size presets', () => {
fc.assert(
@@ -99,13 +99,13 @@ describe('GIF Exporter', () => {
fc.assert(
fc.property(
fc.integer({ min: 100, max: 400 }), // sourceWidth (small)
fc.integer({ min: 100, max: 400 }), // sourceHeight (small, less than 480p)
fc.integer({ min: 100, max: 400 }), // sourceHeight (small, less than 720p)
(sourceWidth: number, sourceHeight: number) => {
// For 'small' preset with maxHeight 480, if source is smaller, use original
// For 'medium' preset with maxHeight 720, if source is smaller, use original
const { width, height } = calculateOutputDimensions(
sourceWidth,
sourceHeight,
'small',
'medium',
GIF_SIZE_PRESETS
);
@@ -182,7 +182,7 @@ describe('Property 3: Size Preset Resolution Mapping', () => {
fc.property(
fc.integer({ min: 800, max: 4000 }), // sourceWidth (large enough to trigger scaling)
fc.integer({ min: 800, max: 2000 }), // sourceHeight (larger than all presets except original)
fc.constantFrom('small', 'medium', 'large') as fc.Arbitrary<GifSizePreset>,
fc.constantFrom('medium', 'large') as fc.Arbitrary<GifSizePreset>,
(sourceWidth: number, sourceHeight: number, sizePreset: GifSizePreset) => {
const { height } = calculateOutputDimensions(
sourceWidth,
@@ -206,8 +206,8 @@ describe('Property 3: Size Preset Resolution Mapping', () => {
fc.assert(
fc.property(
fc.integer({ min: 100, max: 400 }), // sourceWidth
fc.integer({ min: 100, max: 400 }), // sourceHeight (smaller than 480p 'small' preset)
fc.constantFrom('small', 'medium', 'large', 'original') as fc.Arbitrary<GifSizePreset>,
fc.integer({ min: 100, max: 400 }), // sourceHeight (smaller than 720p 'medium' preset)
fc.constantFrom('medium', 'large', 'original') as fc.Arbitrary<GifSizePreset>,
(sourceWidth: number, sourceHeight: number, sizePreset: GifSizePreset) => {
const { width, height } = calculateOutputDimensions(
sourceWidth,
@@ -230,7 +230,7 @@ describe('Property 3: Size Preset Resolution Mapping', () => {
fc.property(
fc.integer({ min: 100, max: 4000 }),
fc.integer({ min: 100, max: 4000 }),
fc.constantFrom('small', 'medium', 'large', 'original') as fc.Arbitrary<GifSizePreset>,
fc.constantFrom('medium', 'large', 'original') as fc.Arbitrary<GifSizePreset>,
(sourceWidth: number, sourceHeight: number, sizePreset: GifSizePreset) => {
const { width, height } = calculateOutputDimensions(
sourceWidth,
+1 -1
View File
@@ -252,7 +252,7 @@ export class GifExporter {
}
// Render the GIF
const blob = await new Promise<Blob>((resolve, reject) => {
const blob = await new Promise<Blob>((resolve, _reject) => {
this.gif!.on('finished', (blob: Blob) => {
resolve(blob);
});