feat(tools): dynamic 5-archetype tool pages, masking editor, alternating features, and studio workflow

This commit is contained in:
2026-11-07 13:05:17 +05:30
parent 39fdb0aae1
commit 4eff5ae66c
25 changed files with 3690 additions and 199 deletions
+62
View File
@@ -158,6 +158,60 @@ export interface EndpointSpec {
hash: string;
}
export type ToolPageType =
| 'image-only'
| 'image-thumbnail'
| 'masking'
| 'text-to-image'
| 'two-images';
export interface ThumbnailItem {
id: string;
label: Localised;
thumbnail: string;
preview?: string;
value: string;
description?: Localised;
badge?: string;
}
export interface MaskingConfig {
autoMask?: {
enabled: boolean;
endpoint?: string;
module?: string;
buttonLabel?: Localised;
description?: Localised;
};
maskParamName?: string;
imageParamName?: string;
defaultBrushSize?: number;
}
export interface TwoImagesConfig {
firstImageParam?: string;
firstImageLabel?: Localised;
secondImageParam?: string;
secondImageLabel?: Localised;
}
export interface TextToImageConfig {
promptParam?: string;
placeholder?: Localised;
negativePromptParam?: string;
aspectRatios?: Array<{ label: string; value: string }>;
samplePrompts?: Localised[];
}
export interface AlternatingFeature {
title: Localised;
description: Localised;
image: string;
badge?: Localised;
caption?: Localised;
metrics?: Array<{ label: string; value: string }>;
}
export interface ToolItem {
id: string;
slug: string;
@@ -168,6 +222,13 @@ export interface ToolItem {
homeApp: string;
alsoIn?: string[];
featured?: boolean;
pageType?: ToolPageType;
showThumbnailsSection?: boolean;
thumbnailPlacement?: 'before-upload' | 'after-upload' | 'both';
thumbnails?: ThumbnailItem[];
maskingConfig?: MaskingConfig;
twoImagesConfig?: TwoImagesConfig;
textToImageConfig?: TextToImageConfig;
tryIt: {
enabled: boolean;
endpointRef: {
@@ -200,6 +261,7 @@ export interface ToolItem {
alt?: Localised;
caption?: string;
}>;
alternatingFeatures?: AlternatingFeature[];
faqs?: Array<{
q: string;
a: string;