Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/src/background-removal/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { type Device, type ModelId } from "./manager.js";

export type OutputFormat = "webm" | "mov" | "png";

export const QUALITY_CRF = {
const QUALITY_CRF = {
fast: 30,
balanced: 18,
best: 12,
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/compositions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function estimateDurationFromScripts(root: ParentNode): number {
return duration;
}

export function parseCompositions(html: string, baseDir: string): CompositionInfo[] {
function parseCompositions(html: string, baseDir: string): CompositionInfo[] {
const parser = new DOMParser();
const doc = parser.parseFromString(html, "text/html");

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/lambda/policies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ interface TrustPolicyDocument {
* Actions the CLI needs to deploy/invoke/destroy the stack. Keep this
* sorted alphabetically inside each service so diffs stay readable.
*/
export const REQUIRED_ACTIONS = {
const REQUIRED_ACTIONS = {
cloudformation: [
"cloudformation:CreateChangeSet",
"cloudformation:CreateStack",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/lambda/sam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { existsSync } from "node:fs";
import { join } from "node:path";

/** Throws with a clear hint when the SAM CLI is not on PATH. */
export function assertSamAvailable(): void {
function assertSamAvailable(): void {
try {
execFileSync("sam", ["--version"], { stdio: "ignore" });
} catch {
Expand All @@ -34,7 +34,7 @@ export function assertSamAvailable(): void {
}

/** Throws with a clear hint when the `aws` CLI is not on PATH. */
export function assertAwsCliAvailable(): void {
function assertAwsCliAvailable(): void {
try {
execFileSync("aws", ["--version"], { stdio: "ignore" });
} catch {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/tts/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,4 @@ export async function ensureVoices(options?: {
return voicesPath;
}

export { MODELS_DIR, VOICES_DIR, DEFAULT_MODEL };
export { MODELS_DIR, DEFAULT_MODEL };
2 changes: 1 addition & 1 deletion packages/cli/src/utils/projectConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { join, resolve } from "node:path";
import { DEFAULT_REGISTRY_URL } from "../registry/index.js";

export const PROJECT_CONFIG_FILENAME = "hyperframes.json";
export const PROJECT_CONFIG_SCHEMA_URL = "https://hyperframes.heygen.com/schema/hyperframes.json";
const PROJECT_CONFIG_SCHEMA_URL = "https://hyperframes.heygen.com/schema/hyperframes.json";

export interface ProjectConfigPaths {
/** Where `hyperframes:block` items land, relative to project root. */
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/whisper/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export function findWhisper(): WhisperResult | undefined {
return findFromEnv() ?? findFromSystem() ?? findBuiltBinary();
}

export function getInstallInstructions(): string {
function getInstallInstructions(): string {
if (platform() === "darwin") {
return "brew install whisper-cpp";
}
Expand Down
2 changes: 0 additions & 2 deletions packages/cli/src/whisper/transcribe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,5 +299,3 @@ export async function transcribe(
speechOnsetSeconds,
};
}

export { isAudioFile, isVideoFile };
4 changes: 2 additions & 2 deletions packages/core/src/lint/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export type ExtractedBlock = {
index: number;
};

export const TAG_PATTERN = /<([a-z][\w:-]*)(\s[^<>]*?)?>/gi;
const TAG_PATTERN = /<([a-z][\w:-]*)(\s[^<>]*?)?>/gi;
export const STYLE_BLOCK_PATTERN = /<style\b([^>]*)>([\s\S]*?)<\/style>/gi;
export const SCRIPT_BLOCK_PATTERN = /<script\b([^>]*)>([\s\S]*?)<\/script>/gi;
export const COMPOSITION_ID_IN_CSS_PATTERN = /\[data-composition-id=["']([^"']+)["']\]/g;
const COMPOSITION_ID_IN_CSS_PATTERN = /\[data-composition-id=["']([^"']+)["']\]/g;
export const TIMELINE_REGISTRY_INIT_PATTERN =
/window\.__timelines\s*=\s*window\.__timelines\s*\|\|\s*\{\}|window\.__timelines\s*=\s*\{\}|window\.__timelines\s*\?\?=\s*\{\}/i;
export const TIMELINE_REGISTRY_ASSIGN_PATTERN = /window\.__timelines\[[^\]]+\]\s*=/i;
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/runtime/adapters/lottie.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { RuntimeDeterministicAdapter } from "../types";
import { swallow } from "../diagnostics";
export { isLottieAnimationLoaded } from "../../lottieReadiness";

/**
* Lottie adapter for HyperFrames
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/studio-api/helpers/waveform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { join } from "node:path";

const SAMPLE_RATE = 4000;
const PEAK_COUNT = 4000;
export const WAVEFORM_CACHE_VERSION = "v2";
const WAVEFORM_CACHE_VERSION = "v2";

export function buildWaveformCacheKey(assetPath: string): string {
return `${WAVEFORM_CACHE_VERSION}_${assetPath.replace(/[/\\]/g, "_")}.json`;
Expand Down
3 changes: 0 additions & 3 deletions packages/core/src/studio-api/routes/waveform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import type { Hono } from "hono";
import type { StudioApiAdapter } from "../types.js";
import { decodeAudioPeaks, buildWaveformCacheKey } from "../helpers/waveform.js";

export { isAudioFile } from "../helpers/mime.js";
export { generateWaveformCache } from "../helpers/waveform.js";

export function registerWaveformRoutes(api: Hono, adapter: StudioApiAdapter): void {
api.get("/projects/:id/waveform/*", async (c) => {
const project = await adapter.resolveProject(c.req.param("id"));
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/src/services/browserManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ async function probeBeginFrameSupport(browser: Browser): Promise<boolean> {
*
* Exported for tests; production callers go through `resolveBrowserGpuMode`.
*/
export let _autoBrowserGpuModeCache: Promise<"software" | "hardware"> | undefined;
let _autoBrowserGpuModeCache: Promise<"software" | "hardware"> | undefined;

/** Test-only: reset the cached probe result. */
export function _resetAutoBrowserGpuModeCacheForTests(): void {
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/src/services/screenshotService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export async function captureScreenshotWithAlpha(
* video itself is the backdrop, so DOM layers must only contribute their
* foreground UI pixels — never a page-spanning solid backdrop.
*/
export const TRANSPARENT_BG_STYLE_ID = "__hf_transparent_bg__";
const TRANSPARENT_BG_STYLE_ID = "__hf_transparent_bg__";

export async function initTransparentBackground(page: Page): Promise<void> {
const client = await getCdpSession(page);
Expand Down
12 changes: 6 additions & 6 deletions packages/player/src/shader-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

export const SHADER_CAPTURE_SCALE_ATTR = "shader-capture-scale";
export const SHADER_LOADING_ATTR = "shader-loading";
export const SHADER_CAPTURE_SCALE_PARAM = "__hf_shader_capture_scale";
export const SHADER_LOADING_PARAM = "__hf_shader_loading";
const SHADER_CAPTURE_SCALE_PARAM = "__hf_shader_capture_scale";
const SHADER_LOADING_PARAM = "__hf_shader_loading";

export const SHADER_LOADING_PHRASES = [
"Preparing scene transitions",
Expand All @@ -31,14 +31,14 @@ export interface ShaderTransitionState {
loading?: boolean;
}

export function normalizeShaderCaptureScale(value: string | null): string | null {
function normalizeShaderCaptureScale(value: string | null): string | null {
if (value === null) return null;
const parsed = Number(value);
if (!Number.isFinite(parsed) || parsed <= 0) return null;
return String(Math.min(1, Math.max(0.25, parsed)));
}

export function normalizeShaderLoadingMode(value: string | null): ShaderLoadingMode {
function normalizeShaderLoadingMode(value: string | null): ShaderLoadingMode {
if (value === null || value.trim() === "") return "composition";
const normalized = value.trim().toLowerCase();
if (
Expand All @@ -65,7 +65,7 @@ function setQueryParam(params: URLSearchParams, key: string, value: string | nul
else params.set(key, value);
}

export function withShaderQueryParams(
function withShaderQueryParams(
src: string,
scale: string | null,
loadingMode: ShaderLoadingMode,
Expand All @@ -83,7 +83,7 @@ export function withShaderQueryParams(
return `${path}${nextQuery ? `?${nextQuery}` : ""}${hash}`;
}

export function injectShaderOptionsIntoSrcdoc(
function injectShaderOptionsIntoSrcdoc(
html: string,
scale: string | null,
loadingMode: ShaderLoadingMode,
Expand Down
2 changes: 1 addition & 1 deletion packages/producer/src/services/compilationTester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const EPSILON = 0.001; // Tolerance for floating-point timing comparisons
* Parse HTML and extract all elements with timing attributes.
* Includes <video>, <audio>, and <div data-composition-src>.
*/
export function extractTimedElements(html: string): CompiledElement[] {
function extractTimedElements(html: string): CompiledElement[] {
const elements: CompiledElement[] = [];

// Extract video elements
Expand Down
2 changes: 1 addition & 1 deletion packages/producer/src/services/distributed/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export async function readFfmpegVersion(): Promise<string> {
}

/** Test-only: clear the cached ffmpeg version so a fresh probe runs. */
export function _resetFfmpegVersionCacheForTests(): void {
function _resetFfmpegVersionCacheForTests(): void {
cachedFfmpegVersion = null;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/producer/src/services/fileServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { join, extname, resolve, sep } from "node:path";
import { injectScriptsAtHeadStart, injectScriptsIntoHtml } from "@hyperframes/core/compiler";
import { getVerifiedHyperframeRuntimeSource } from "./hyperframeRuntimeLoader.js";

export { injectScriptsAtHeadStart, injectScriptsIntoHtml };
export { injectScriptsAtHeadStart };

type PathModuleLike = {
resolve: (...segments: string[]) => string;
Expand Down
1 change: 0 additions & 1 deletion packages/producer/src/services/render/stages/freezePlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ export interface FreezePlanResult {
* `../runtimeEnvSnapshot.ts` — chunk workers re-apply the snapshot during
* boot, so it needs to be importable without dragging in the freeze pipeline.
*/
export { RUNTIME_ENV_PREFIXES, snapshotRuntimeEnv } from "../runtimeEnvSnapshot.js";

/** The relative path inside `<planDir>/` to the compiled HTML. */
const COMPILED_INDEX_RELATIVE_PATH = "compiled/index.html";
Expand Down
2 changes: 1 addition & 1 deletion packages/shader-transitions/src/capture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function forceSceneVisibleInClone(source: HTMLElement, cloneDoc: Document): void
});
}

export function stabilizeTransformedBoxShadows(root: HTMLElement): void {
function stabilizeTransformedBoxShadows(root: HTMLElement): void {
const view = root.ownerDocument.defaultView;
if (!view) return;

Expand Down
2 changes: 1 addition & 1 deletion packages/studio/src/captions/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export const DEFAULT_CONTAINER: CaptionContainerStyle = {
boxShadow: "none",
};

export const DEFAULT_ANIMATION: CaptionAnimation = {
const DEFAULT_ANIMATION: CaptionAnimation = {
preset: "fade",
duration: 0.2,
ease: "power2.out",
Expand Down
4 changes: 2 additions & 2 deletions packages/studio/src/components/editor/MotionPanelFields.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState, useRef, useEffect, type ReactNode } from "react";
import { Zap } from "../../icons/SystemIcons";

export const FIELD =
const FIELD =
"min-w-0 rounded-xl border border-neutral-800 bg-neutral-900/95 px-3 py-2 text-neutral-100 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)] transition-colors focus-within:border-neutral-600";
export const LABEL = "text-[11px] font-medium uppercase tracking-[0.18em] text-neutral-500";
export const RESPONSIVE_GRID = "grid grid-cols-[repeat(auto-fit,minmax(118px,1fr))] gap-3";
Expand Down Expand Up @@ -30,7 +30,7 @@ export function parsePlainNumber(value: string): number | null {

// ── CommitField ──

export function CommitField({
function CommitField({
value,
disabled,
onCommit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { GroupOverlayItem } from "./domEditOverlayGeometry";
export type GestureKind = "drag" | "resize" | "rotate";

export const BLOCKED_MOVE_THRESHOLD_PX = 4;
export const MIN_RESIZE_EDGE_PX = 20;
const MIN_RESIZE_EDGE_PX = 20;
const ROTATION_COMMIT_EPSILON_DEGREES = 0.05;
const ROTATION_SNAP_DEGREES = 15;

Expand Down
2 changes: 1 addition & 1 deletion packages/studio/src/components/editor/domEditingDom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export function normalizeTimelineCompositionSource(value: string | undefined): s

// ─── CSS escaping ─────────────────────────────────────────────────────────────

export function escapeCssIdentifier(value: string): string {
function escapeCssIdentifier(value: string): string {
const css = globalThis.CSS as { escape?: (input: string) => string } | undefined;
if (typeof css?.escape === "function") return css.escape(value);

Expand Down
2 changes: 1 addition & 1 deletion packages/studio/src/components/editor/fontAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const FONT_EXT_RE = /\.(eot|otf|ttc|ttf|woff2?)$/i;
const FONT_STYLE_SUFFIX_RE =
/\s+(thin|extralight|extra light|light|regular|roman|medium|semibold|semi bold|bold|extrabold|extra bold|black|italic|oblique|variable)$/i;

export function cssString(value: string): string {
function cssString(value: string): string {
return JSON.stringify(value);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/studio/src/components/editor/gradientValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ function formatHex(channel: number): string {
return channel.toString(16).padStart(2, "0");
}

export function interpolateGradientStopColor(model: GradientModel, position: number): string {
function interpolateGradientStopColor(model: GradientModel, position: number): string {
const clampedPosition = clamp(position, 0, 100);
const sortedStops = [...model.stops].sort((a, b) => a.position - b.position);
const exact = sortedStops.find((stop) => Math.abs(stop.position - clampedPosition) < 0.001);
Expand Down
4 changes: 2 additions & 2 deletions packages/studio/src/components/editor/manualOffsetDrag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export function createManualOffsetDragMember(input: {
};
}

export function resolveManualOffsetDragMemberOffset(
function resolveManualOffsetDragMemberOffset(
member: ManualOffsetDragMember,
dx: number,
dy: number,
Expand Down Expand Up @@ -289,7 +289,7 @@ export function applyManualOffsetDragCommit(
return offset;
}

export function restoreManualOffsetDragMember(member: ManualOffsetDragMember): void {
function restoreManualOffsetDragMember(member: ManualOffsetDragMember): void {
restoreStudioPathOffset(member.element, member.initialPathOffset);
endStudioManualEditGesture(member.element, member.gestureToken);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const COLOR_PICKER_SIZE = { width: 292, height: 386 };
/* ColorSlider */
/* ------------------------------------------------------------------ */

export function ColorSlider({
function ColorSlider({
label,
value,
min,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useCallback, useEffect, useRef, useState, type ReactNode } from "react";
import { adjustNumericToken, FIELD, LABEL, parseNumericToken } from "./propertyPanelHelpers";

export function CommitField({
function CommitField({
value,
disabled,
liveCommit,
Expand Down
2 changes: 1 addition & 1 deletion packages/studio/src/components/editor/studioMotionOps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export function buildStudioGsapPresetMotion(

// ── Manifest parse/serialize ──

export function parseMotionValues(value: unknown): StudioGsapMotionValues | null {
function parseMotionValues(value: unknown): StudioGsapMotionValues | null {
if (!value || typeof value !== "object") return null;
const record = value as Record<string, unknown>;
const parsed: StudioGsapMotionValues = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface CompositionThumbnailProps {

const CLIP_HEIGHT = 66;
const THUMBNAIL_URL_VERSION = "v3";
export const COMPOSITION_THUMBNAIL_LABEL_Z_INDEX = 10;
const COMPOSITION_THUMBNAIL_LABEL_Z_INDEX = 10;

export function buildCompositionThumbnailUrl({
previewUrl,
Expand Down
2 changes: 1 addition & 1 deletion packages/studio/src/player/components/timelineLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const TRACK_H = 72;
export const RULER_H = 24;
export const CLIP_Y = 3;
export const CLIP_HANDLE_W = 18;
export const TIMELINE_SCROLL_BUFFER = 20;
const TIMELINE_SCROLL_BUFFER = 20;

/* ── Tick generation ──────────────────────────────────────────────── */
function getMajorTickInterval(duration: number, pixelsPerSecond?: number): number {
Expand Down
2 changes: 1 addition & 1 deletion packages/studio/src/player/lib/playbackAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function isFinitePositive(value: number): boolean {
return Number.isFinite(value) && value > 0;
}

export function clampTime(time: number, duration: number): number {
function clampTime(time: number, duration: number): number {
const safeDuration = Math.max(0, Number.isFinite(duration) ? duration : 0);
const safeTime = Math.max(0, Number.isFinite(time) ? time : 0);
return safeDuration > 0 ? Math.min(safeTime, safeDuration) : safeTime;
Expand Down
Loading
Loading