Browse Source

feat(svg-brand-tint-ops): optional Image Trace benchmark-gallery link

The Image Trace panel now surfaces a 'Vectorise benchmark gallery' link
that appears only when a local ./gallery/ has been populated (a HEAD probe
reveals it; it ships hidden and stays hidden in sandboxed previews or for
installs without one). Gitignore the gallery dir — these before/after
galleries may hold third-party/client brand assets and are per-machine
local artifacts, never committed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0xDarkMatter 3 weeks ago
parent
commit
660dde1f7b
2 changed files with 12 additions and 0 deletions
  1. 4 0
      .gitignore
  2. 8 0
      skills/svg-brand-tint-ops/assets/index.html

+ 4 - 0
.gitignore

@@ -41,3 +41,7 @@ Thumbs.db
 
 # Test artifacts
 tests/*/output/
+
+# Local-only benchmark galleries (may contain third-party / client brand assets —
+# populated per-machine, surfaced by the studio's Image Trace panel; never committed)
+skills/svg-brand-tint-ops/assets/gallery/

+ 8 - 0
skills/svg-brand-tint-ops/assets/index.html

@@ -483,6 +483,14 @@ function buildTrace(p){
   const btn=el('button',{class:'btn primary wide',id:'traceGo'},'✦  Trace to SVG'); btn.style.marginTop='10px';
   btn.onclick=runTrace; p.append(btn);
   p.append(el('div',{class:'hint'},'Marching-squares contours · Douglas–Peucker simplify · optional bézier smoothing. All in-browser, no upload.'));
+  // Optional benchmark gallery — appears only when a local ./gallery/ has been
+  // populated (before/after vectorise experiments). Shipped hidden; a HEAD probe
+  // reveals it where present. Silently stays hidden in sandboxed previews (fetch
+  // blocked) and for installs without a local gallery.
+  const gal=el('a',{class:'hint',id:'benchGallery',href:'gallery/index.html',target:'_blank',rel:'noopener'},'◫  Vectorise benchmark gallery →');
+  gal.style.cssText='display:none;margin-top:8px;text-decoration:none;cursor:pointer;color:var(--accent,#6c5ce7)';
+  p.append(gal);
+  try{ fetch('gallery/index.html',{method:'HEAD'}).then(r=>{ if(r&&r.ok) gal.style.display='block'; }).catch(()=>{}); }catch(e){}
   buildTraceDyn();
 }
 function buildTraceDyn(){