import type { NodeMetadata, Workflow, ConfigSchema } from '../types/index.js'; import type { SwapStrategy } from '../utils/nodeSwap.js'; import type { EndpointConfig } from '../config/endpoints.js'; import type { AuthProvider } from '../types/auth.js'; import type { FlowDropEventHandlers, FlowDropFeatures } from '../types/events.js'; import type { FlowDropTheme, FlowDropThemeName } from '../types/theme.js'; import type { SettingsCategory } from '../types/settings.js'; import type { MessagesOverride } from '../messages/index.js'; /** * Configuration props for runtime customization */ interface Props { /** Initial workflow to load */ workflow?: Workflow; /** Pre-loaded node types (if provided, skips API fetch) */ nodes?: NodeMetadata[]; /** Editor height */ height?: string | number; /** Editor width */ width?: string | number; /** Show the navbar */ showNavbar?: boolean; /** Disable the node sidebar */ disableSidebar?: boolean; /** Lock the workflow (prevent changes) */ lockWorkflow?: boolean; /** Read-only mode */ readOnly?: boolean; /** Node execution statuses */ nodeStatuses?: Record; /** Pipeline ID for fetching node execution info */ pipelineId?: string; /** Custom navbar title */ navbarTitle?: string; /** Custom navbar actions */ navbarActions?: Array<{ label: string; href: string; icon?: string; variant?: 'primary' | 'secondary' | 'outline'; onclick?: (event: Event) => void; }>; /** Show settings gear icon in navbar */ showSettings?: boolean; /** API base URL */ apiBaseUrl?: string; /** Endpoint configuration */ endpointConfig?: EndpointConfig; /** Authentication provider */ authProvider?: AuthProvider; /** Event handlers */ eventHandlers?: FlowDropEventHandlers; /** Feature configuration */ features?: FlowDropFeatures; /** Visual theme — named built-in ('default' | 'minimal') or custom theme object */ theme?: FlowDropTheme | FlowDropThemeName; /** Which settings tabs to show in the modal */ settingsCategories?: SettingsCategory[]; /** Show the "Sync to Cloud" button in the settings modal */ showSettingsSyncButton?: boolean; /** Show the reset buttons in the settings modal */ showSettingsResetButton?: boolean; /** Pluggable swap strategies — instance-scoped, checked in order */ swapStrategies?: SwapStrategy[]; /** Additional JSON Schema properties to show in the Workflow Settings panel. Values are persisted in workflow.config. */ workflowSettingsSchema?: ConfigSchema; /** * Override user-facing strings. Pass either a partial of the `Messages` * tree directly, or a callback that returns one. Missing keys fall through * to English defaults. * * For static overrides, a value is fine: `messages={{ common: { save: 'Apply' } }}`. * For reactive overrides driven by an i18n library (paraglide, etc.), * either form works — Svelte 5's prop reactivity propagates locale changes. * The callback form is useful when your translations live behind a * function call you'd rather not invoke unless the prop is actually read. */ messages?: MessagesOverride | (() => MessagesOverride); } declare const App: import("svelte").Component; type App = ReturnType; export default App;