export type LayerType = "text" | "device" | "image" | "shape" | "badge" | "arrow"; export type DeviceType = "iphone" | "ipad" | "android" | "frameless" | "macbook"; export type ShapeType = "rect" | "circle" | "rounded-rect"; export type TextAlign = "left" | "center" | "right"; export type BackgroundType = "solid" | "gradient"; export type ObjectFit = "cover" | "contain" | "fill"; export type MarketingMode = "app_store" | "play_store" | "social_carousel" | "paid_ad" | "launch_graphic"; export type LocaleStrategy = "english" | "localized" | "bilingual"; export type MarketingRole = "hook" | "feature" | "proof" | "cta" | "comparison" | "how_it_works" | "offer" | "announcement"; export type ComponentType = "button" | "pill" | "callout" | "proof_chip" | "rating" | "feature_tag"; export type CampaignMeta = { mode: MarketingMode; appName?: string; appCategory?: string; audience?: string; objective?: string; targetLocale?: string; localeStrategy?: LocaleStrategy; creativeDirection?: string; panelCount?: number; }; /** Mirror of the app's AppIdentity in canvasTypes.ts — keep in sync. */ export type AppIdentity = { name?: string; tagline?: string; iconUrl?: string; primaryColor?: string; secondaryColor?: string; category?: string; platforms?: ("ios" | "android")[]; appStoreId?: string; playPackageName?: string; /** only written by store lookup, never set directly by agents */ rating?: { value: number; count: number; source: "app_store" | "play_store"; fetchedAt: string; }; }; export type LayerAnimation = { entranceType?: string; entranceDuration?: number; entranceDelay?: number; exitType?: string; exitDuration?: number; exitDelay?: number; }; export type BaseLayer = { id: string; type: LayerType; x: number; y: number; width: number; height: number; rotation: number; rotateX: number; rotateY: number; zIndex: number; locked: boolean; visible: boolean; opacity: number; shadowEnabled?: boolean; shadowColor?: string; shadowBlur?: number; shadowOffsetX?: number; shadowOffsetY?: number; blurEnabled?: boolean; blurAmount?: number; backdropBlurEnabled?: boolean; backdropBlurAmount?: number; animation?: LayerAnimation; componentId?: string; componentType?: ComponentType; componentRole?: string; componentLabel?: string; }; export type TextSegment = { text: string; bold?: boolean; italic?: boolean; color?: string; backgroundColor?: string; backgroundPaddingX?: number; backgroundPaddingY?: number; backgroundRadius?: number; }; export type TextLayer = BaseLayer & { type: "text"; text: string; richText?: TextSegment[]; fontSize: number; fontFamily: string; fontWeight: number; color: string; textAlign: TextAlign; letterSpacing: number; lineHeight: number; fillType?: "solid" | "gradient"; gradientColor2?: string; gradientDirection?: number; strokeEnabled?: boolean; strokeColor?: string; strokeWidth?: number; }; export type DeviceFrameLayer = BaseLayer & { type: "device"; deviceType: DeviceType; screenshotUrl: string; hideStatusBar?: boolean; fadeBottom?: boolean; fadeBottomHeight?: number; }; export type ImageLayer = BaseLayer & { type: "image"; imageUrl: string; objectFit: ObjectFit; borderRadius: number; borderTopLeftRadius?: number; borderTopRightRadius?: number; borderBottomRightRadius?: number; borderBottomLeftRadius?: number; }; export type ShapeLayer = BaseLayer & { type: "shape"; shape: ShapeType; fill: string; fillType?: "solid" | "gradient" | "image"; gradientColor2?: string; gradientDirection?: number; gradientType?: "linear" | "radial"; fillImageUrl?: string; fillImageSize?: "cover" | "contain" | "fill"; stroke: string; strokeWidth: number; borderRadius: number; borderTopLeftRadius?: number; borderTopRightRadius?: number; borderBottomRightRadius?: number; borderBottomLeftRadius?: number; }; export type BadgeLayer = BaseLayer & { type: "badge"; badgeStyle: "rating" | "label" | "count" | "custom"; text: string; fontSize: number; fontFamily: string; fontWeight: number; color: string; backgroundColor: string; backgroundOpacity: number; borderRadius: number; iconType?: "star" | "download" | "check" | "laurel" | "none"; iconColor?: string; rating?: number; }; export type ArrowLayer = BaseLayer & { type: "arrow"; strokeColor: string; strokeWidth: number; headStyle: "triangle" | "none" | "circle"; curvature: number; dashed?: boolean; fromX: number; fromY: number; toX: number; toY: number; direction?: "right" | "left" | "up" | "down" | "auto"; }; export type Layer = TextLayer | DeviceFrameLayer | ImageLayer | ShapeLayer | BadgeLayer | ArrowLayer; export type CanvasScreen = { id: string; name: string; layers: Layer[]; backgroundColor: string; backgroundType: BackgroundType; gradientColor2: string; gradientDirection: number; backgroundGradientType?: "linear" | "radial"; backgroundImageUrl?: string; backgroundImageSize?: "cover" | "contain" | "fill"; backgroundImageOpacity?: number; width: number; height: number; canvasX: number; canvasY: number; connectedToNext?: boolean; transitionType?: string; transitionDuration?: number; screenDuration?: number; noiseEnabled?: boolean; noiseOpacity?: number; marketingRole?: MarketingRole; }; export type CanvasProject = { id: string; name: string; schemaVersion: number; screens: CanvasScreen[]; createdAt: string; updatedAt: string; campaign?: CampaignMeta; identity?: AppIdentity; videoConfig?: { preset: string; totalDuration: number; backdropType?: "solid" | "gradient"; backdropColor?: string; backdropGradientColor2?: string; backdropGradientDirection?: number; }; }; export type TemplateInfo = { id: string; name: string; description: string; category: string; }; //# sourceMappingURL=types.d.ts.map