feat(photo-editor): Ajax Image Editor client (Photoshop-parity tools)

Photoshop-parity editor client: layers, selection/masking, brushes,
smart filters, LUT import, Quick Edit, mobile gestures, workspaces,
batch operations, and the service-worker versioning (v978->v1006).

Source: vendor/photocraft (ad1cff44) photo-editor client files, merged
onto upstream/dev (a8c147b2). Conflict resolution documented in
pr_work/A_conflicts.md; editor files taken from vendor/photocraft
(upstream's editor is an earlier snapshot of the same feature).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pewdiepie-archdaemon
2026-10-15 11:57:35 +00:00
co-authored by Claude Opus 5.5
parent c74f475679
commit 5fac693c1c
290 changed files with 34358 additions and 766 deletions
+7 -6
View File
@@ -2,6 +2,7 @@
import { drawLayerStack, drawLayerStackAsync } from './layer-clipping.js';
import { renderEffects, renderEffectsAsync } from './effects.js';
import { blendDraw } from './blend-modes.js';
function groupMap(editorState) {
return new Map((editorState.layerGroups || []).map(group => [group.id, group]));
@@ -390,9 +391,9 @@ export function drawGroupedLayers(ctx, editorState, renderLayer, renderAdjustmen
// raw member fallback loses masks, blending, and group effects.
editorState.groupCompositeCanvases.set(group.id, groupOutput);
}
target.globalAlpha = group.opacity;
target.globalCompositeOperation = group.blendMode || 'source-over';
target.drawImage(groupOutput, 0, 0);
target.globalAlpha = 1;
target.globalCompositeOperation = 'source-over';
blendDraw(target, groupOutput, group.blendMode, group.opacity, 0, 0);
}
flushLayers();
target.globalAlpha = 1;
@@ -497,9 +498,9 @@ export async function drawGroupedLayersAsync(ctx, editorState, renderLayer, rend
if (groupOutput.width && groupOutput.height) {
editorState.groupCompositeCanvases.set(group.id, groupOutput);
}
target.globalAlpha = group.opacity;
target.globalCompositeOperation = group.blendMode || 'source-over';
target.drawImage(groupOutput, 0, 0);
target.globalAlpha = 1;
target.globalCompositeOperation = 'source-over';
blendDraw(target, groupOutput, group.blendMode, group.opacity, 0, 0);
}
await flushLayers();
target.globalAlpha = 1;