import { b as Theme } from './types-BTUuytwo.js'; import { L as Locale } from './i18n-DUwTFylQ.js'; /** * Lighting-editor-specific string keys. Kept in a SEPARATE interface * from the video editor's `Locale` so the timeline-only consumer's * type doesn't grow unused fields, but exported so a single host * locale object can spread both shapes together. */ interface LightingLocale { lightingGlobalTitle: string; lightingSmartMode: string; lightingBrightness: string; lightingColor: string; lightingKeyTitle: string; lightingRim: string; lightingViewPerspective: string; lightingViewFront: string; lightingDirLeft: string; lightingDirRight: string; lightingDirTop: string; lightingDirBottom: string; lightingDirFront: string; lightingDirBack: string; /** Section label above the color-temperature slider. */ lightingColorTemp: string; /** Section label above the in-sphere rotation slider. */ lightingRotation: string; /** Brand-color CTA label at the bottom-right of v3. */ lightingGenerate: string; /** Bottom-left "Reset" button label in V3. */ lightingReset: string; } declare const lightingLocaleEn: LightingLocale; declare const lightingLocaleZh: LightingLocale; declare function mergeLightingLocale(partial: Partial | undefined): LightingLocale; /** One of the six canonical key-light directions plus a sentinel for free-drag. */ type KeyPreset = "left" | "right" | "top" | "bottom" | "front" | "back" | "custom"; /** Snapshot of every adjustable lighting parameter — what `onChange` emits. */ interface LightingConfig { /** 0–1 multiplier. Snapped to 5 UI levels (0 / 0.25 / 0.5 / 0.75 / 1). */ brightness: number; /** Hex RGB string, e.g. "#ffffff". */ color: string; /** * Unit vector from the subject toward the light. `(0,0,1)` = light in * front of the subject, `(0,1,0)` = light directly overhead, etc. * Always renormalised on write. */ keyDirection: { x: number; y: number; z: number; }; /** Which canonical direction the dot is closest to, or `"custom"`. */ keyPreset: KeyPreset; /** Rim / contour light toggle. */ rim: boolean; } type LightingView = "perspective" | "front"; interface LightingEditorOptions { /** Host element. Will be wiped on init. */ container: HTMLElement; /** * Image URL or data URI shown on the in-sphere plane (the "subject" * being lit). Can be swapped at runtime via `setSubjectImage`. */ subjectImageUrl?: string; /** Initial config — merges over the safe defaults below. */ config?: Partial; /** Initial camera view. Default `"perspective"`. */ view?: LightingView; /** Theme tokens — same shape as the video Editor's theme. */ theme?: Theme; /** Locale overrides on top of English defaults (`localeEn` + `lightingLocaleEn`). */ locale?: Partial; /** Fires on any config mutation (drag, slider, preset click, toggle). */ onChange?: (cfg: LightingConfig) => void; } /** Safe, conservative defaults for first mount. */ declare const DEFAULT_LIGHTING_CONFIG: LightingConfig; /** * Canonical key-light direction unit vectors. Coordinate space matches * three.js's defaults — +X right, +Y up, +Z toward the camera. So * `front: (0, 0, 1)` means "light positioned between the camera and * the subject," which is the most flattering portrait default. */ declare const PRESET_DIRECTIONS: Record, { x: number; y: number; z: number; }>; /** * Decide which preset (if any) a given unit-vector direction snaps to. * Returns `"custom"` when no preset is within `PRESET_SNAP_RADIANS`. */ declare function snapToPreset(d: { x: number; y: number; z: number; }): KeyPreset; export { DEFAULT_LIGHTING_CONFIG as D, type KeyPreset as K, type LightingLocale as L, PRESET_DIRECTIONS as P, type LightingView as a, lightingLocaleZh as b, type LightingEditorOptions as c, type LightingConfig as d, lightingLocaleEn as l, mergeLightingLocale as m, snapToPreset as s };