/** * Guard functions for the generate state machine * * Guards are pure functions that determine whether a transition should occur. */ import type { GenerateMachineContext } from './types.js'; /** * Check if preflight checks passed */ export declare const preflightPassed: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if preflight checks failed */ export declare const preflightFailed: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if mode was provided as CLI argument */ export declare const hasModeArg: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if selected mode is hosted (including legacy aliases) */ export declare const isHostedMode: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if selected mode is offline */ export declare const isOfflineMode: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if selected mode is self-hosted */ export declare const isSelfHostedMode: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if selected mode is custom */ export declare const isCustomMode: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if mode requires a backend URL (hosted, legacy c15t, or self-hosted) */ export declare const modeRequiresBackend: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if mode doesn't require a backend URL (offline or custom) */ export declare const modeNoBackend: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if framework is Next.js */ export declare const isNextjs: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if framework is React (not Next.js) */ export declare const isReact: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if framework is core c15t (no React) */ export declare const isCore: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if framework has React */ export declare const hasReact: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if project has Tailwind CSS */ export declare const hasTailwind: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if backend URL has been set */ export declare const hasBackendURL: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if user selected expanded UI style */ export declare const isExpandedUIStyle: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if user confirmed dependency installation */ export declare const installConfirmed: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if installation succeeded */ export declare const installSucceeded: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if there are files to rollback */ export declare const hasFilesToRollback: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if there are dependencies to install */ export declare const hasDependencies: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if there are errors recorded */ export declare const hasErrors: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if cleanup is needed (files created or modified) */ export declare const needsCleanup: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if SSR should be prompted (Next.js with backend) */ export declare const shouldPromptSSR: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * Check if UI style should be prompted (Next.js or React) */ export declare const shouldPromptUIStyle: ({ context, }: { context: GenerateMachineContext; }) => boolean; /** * All guards exported as a single object for use in machine definition */ export declare const guards: { hasBackendURL: typeof hasBackendURL; hasDependencies: typeof hasDependencies; hasErrors: typeof hasErrors; hasFilesToRollback: typeof hasFilesToRollback; hasModeArg: typeof hasModeArg; hasReact: typeof hasReact; hasTailwind: typeof hasTailwind; installConfirmed: typeof installConfirmed; installSucceeded: typeof installSucceeded; isCore: typeof isCore; isCustomMode: typeof isCustomMode; isExpandedUIStyle: typeof isExpandedUIStyle; isHostedMode: typeof isHostedMode; isNextjs: typeof isNextjs; isOfflineMode: typeof isOfflineMode; isReact: typeof isReact; isSelfHostedMode: typeof isSelfHostedMode; modeNoBackend: typeof modeNoBackend; modeRequiresBackend: typeof modeRequiresBackend; needsCleanup: typeof needsCleanup; preflightFailed: typeof preflightFailed; preflightPassed: typeof preflightPassed; shouldPromptSSR: typeof shouldPromptSSR; shouldPromptUIStyle: typeof shouldPromptUIStyle; };