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
+32
View File
@@ -0,0 +1,32 @@
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
DOCK = ROOT / "static/js/editor/build/dock.js"
def test_dock_recomputes_tab_overflow_after_layout():
src = DOCK.read_text(encoding="utf-8")
# The dock is built before it is attached (width 0), so a one-shot check at
# build time could never see the real column width. A ResizeObserver plus a
# post-layout frame keeps the overflow chevron in sync.
assert "new ResizeObserver" in src
assert "ro.observe(dock)" in src
assert "requestAnimationFrame(() => groupEls.forEach(el => syncTabsOverflow(el)))" in src
def test_dock_overflow_chevron_tracks_scroll_width():
src = DOCK.read_text(encoding="utf-8")
assert "const overflowing = tabsEl.scrollWidth - tabsEl.clientWidth > 1;" in src
assert "moreEl.hidden = !overflowing;" in src
def test_dock_hides_partial_tabs_instead_of_clipping_labels():
src = DOCK.read_text(encoding="utf-8")
# Reset then hide trailing tabs so no label is clipped mid-word
# (Photoshop-style tab overflow).
assert "items.forEach(item => { item.style.display = ''; });" in src
assert "item.style.display = 'none';" in src
# The active tab is always kept visible so the open panel keeps its anchor.
assert "const activeItem = active ? active.closest('.ge-dock-tab-item') : null;" in src
assert "if (item === activeItem || (!cutting && used + w <= limit + 0.5))" in src