import { L as LightingLocale, a as LightingView } from '../presets-DTS1rPOb.js'; export { P as PRESET_DIRECTIONS, l as lightingLocaleEn, b as lightingLocaleZh, m as mergeLightingLocale, s as snapToPreset } from '../presets-DTS1rPOb.js'; import { L as Locale } from '../i18n-DUwTFylQ.js'; import { b as Theme } from '../types-BTUuytwo.js'; /** * V3 keeps the v2 data shape — same `keyDirection` / `brightness` / * `color` / `keyPreset` — and grows ONE new field: * * rotation: degrees, 0..360, clockwise as seen by the user looking * at the front of the sphere. Applied as `subjectMesh.rotation.z` * in the scene. Independent of `keyDirection` — the light dot * stays where the user put it while the subject spins under it. * * Existing v2 projects round-trip cleanly: a v2 LightingConfig is * also a valid v3 config (rotation defaults to 0). */ type KeyPresetV3 = "left" | "right" | "top" | "bottom" | "front" | "back" | "custom"; interface LightingConfigV3 { brightness: number; color: string; keyDirection: { x: number; y: number; z: number; }; keyPreset: KeyPresetV3; rim: boolean; /** In-sphere image rotation, degrees. Default 0. */ rotation: number; } interface LightingEditorV3Options { container: HTMLElement; subjectImageUrl?: string; config?: Partial; theme?: Theme; locale?: Partial; /** Title chip rendered above the sphere panel. Defaults to "智能光源" / "Smart light". */ title?: string; /** The "Generate" CTA copy at the bottom-right. Default "生成" / "Generate". */ generateLabel?: string; /** Number / string badge painted at the right of the Generate CTA * (matches the Figma reference's "✦ 2" pill). Omit to hide. */ generateBadge?: number | string; /** Initial scene camera mode. Default "perspective". Switchable * via the top-center pill in the scene column. */ view?: LightingView; /** * Color scheme — `"light"` (default, white card) or `"dark"` (dark * card). Different from `theme` (which only sets CSS variables); * `mode` flips a data attribute on the root that swaps the v3 * palette wholesale. Reactive via `setMode("dark" | "light")`. */ mode?: "light" | "dark"; /** Fires on EVERY config mutation. */ onChange?: (cfg: LightingConfigV3) => void; /** Fires when the user clicks the brand Generate CTA. */ onGenerate?: (cfg: LightingConfigV3) => void; /** Fires when the user clicks the top-right close (×) button. */ onClose?: () => void; /** Fires when the user toggles the perspective / front view pill. */ onViewChange?: (view: LightingView) => void; /** Fires when the user clicks the bottom-left Reset button. */ onReset?: () => void; } declare const DEFAULT_LIGHTING_CONFIG_V3: LightingConfigV3; /** * V3 lighting picker — same scene / data model as v2 but a fresh * Figma-driven chrome and a new `rotation` knob that spins the * in-sphere subject image. Composed alongside v2 so hosts can adopt * incrementally — both can co-exist in the same app. * * Layout (matches the Figma reference): * * ┌────────────────────────────────┬──────────────────────────┐ * │ │ Global × │ * │ │ │ * │ [ sphere scene viewport ] │ Brightness ━━●━━━ [50] │ * │ │ Color temp ━━●━━━ [5K] │ * │ │ Key light │ * │ dotted-bg, square 1:1 │ ▒ ▒ ▒ │ * │ │ ▒ ▓ ▒ (▓ = active) │ * │ [smart light] tab │ Rotation ━●━━━━━ [0°] │ * │ │ ─────────── │ * │ │ [✦ Generate] │ * └────────────────────────────────┴──────────────────────────┘ */ declare class LightingEditorV3 { private root; private opts; private config; private locale; /** Color temperature in Kelvin. Driven by the V3 controls; the scene * receives the derived hex color via `setLightColor`. */ private colorTempKelvin; private scene; private controls; private sceneViewport; private chip; private subjectStage; private subjectCard; private viewToggle; private resetBtn; private resetLabel; private view; private mode; private resizeObs; private destroyed; static create(opts: LightingEditorV3Options): LightingEditorV3; constructor(opts: LightingEditorV3Options); getConfig(): LightingConfigV3; setConfig(partial: Partial): void; setSubjectImage(url: string | null): void; reset(): void; setView(v: LightingView): void; getView(): LightingView; setBadge(text: string | number | null): void; setTheme(theme: Theme): void; setMode(mode: "light" | "dark"): void; getMode(): "light" | "dark"; setLocale(locale: Partial): void; private syncViewToggle; destroy(): void; private applyMutation; } export { DEFAULT_LIGHTING_CONFIG_V3, type KeyPresetV3, type LightingConfigV3, LightingEditorV3, type LightingEditorV3Options, LightingLocale, LightingView };