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
+18 -1
View File
@@ -80,7 +80,24 @@ export function getAllTools(): ToolItem[] {
if (mgmtTool.media?.after && mgmtTool.content?.examples?.[0]) {
mgmtTool.content.examples[0].after = mgmtTool.media.after;
}
toolsCache.set(mgmtTool.slug, mgmtTool);
const existing = toolsCache.get(mgmtTool.slug) || ({} as any);
const merged: ToolItem = {
...existing,
...mgmtTool,
content: {
...(existing.content || {}),
...(mgmtTool.content || {}),
alternatingFeatures: mgmtTool.content?.alternatingFeatures || existing.content?.alternatingFeatures,
},
pageType: mgmtTool.pageType || existing.pageType,
showThumbnailsSection: mgmtTool.showThumbnailsSection !== undefined ? mgmtTool.showThumbnailsSection : existing.showThumbnailsSection,
thumbnailPlacement: mgmtTool.thumbnailPlacement || existing.thumbnailPlacement,
thumbnails: mgmtTool.thumbnails || existing.thumbnails,
maskingConfig: mgmtTool.maskingConfig || existing.maskingConfig,
twoImagesConfig: mgmtTool.twoImagesConfig || existing.twoImagesConfig,
textToImageConfig: mgmtTool.textToImageConfig || existing.textToImageConfig,
};
toolsCache.set(mgmtTool.slug, merged);
}
}
}