/**
* Build the editor's right-panel controls innerHTML.
*
* Returns the string — caller creates the wrapper element, attaches its
* own touch / swipe-to-dismiss listeners, then sets innerHTML. Per-tool
* sections are all toggled `display:none` here; the tool-switch handler
* in galleryEditor.js shows the section matching the active tool.
*
* @param {{ color: string, brushSize: number, wandTolerance: number, bucketTolerance: number, cropAspectPreset: string, eyedropperSampleSize: number }} ctx
* @returns {string}
*/
export function controlsHTML({ color, brushSize, wandTolerance, bucketTolerance = 32, cropAspectPreset = 'free', eyedropperSampleSize = 1 }) {
const brushSliderValue = Math.round(Math.log(Math.max(1, brushSize)) / Math.log(800) * 1000);
return `
Eyedropper
Move over the canvas
RGB --
HSL --
Crop
Pick a ratio, then drag on the canvas. Press Enter to apply.
SAM?
Click an object, or type a neutral object label. Shift adds, Alt subtracts.
QUICK SELECT?
24
Paint over a region; the brush grows the selection to similar nearby pixels.
OBJECT SELECT?
Draw a rough stroke over an object; SAM selects its boundary.
Background Remove?
rembg not installed.
Background Remove needs the rembg package on this
server. Click to install it from Cookbook → Dependencies.
Edge cleanup?
Import an image as a new layer. Drag to position it.
`;
}
/**
* Layer-panel header markup. Static; static IDs are wired by the caller.
* @returns {string}
*/
export function layerPanelHTML() {
return `
`;
}