MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / computePreviewTilePxFromWidth

Function computePreviewTilePxFromWidth

renderer.js:611–620  ·  view source on GitHub ↗

* Fixed preview columns per size; tile dimension scales to fill row width. * S → 10 columns; M → 6 columns; L → 4 columns.

(availableWidth, horizontalGap = 2)

Source from the content-addressed store, hash-verified

609 method: 'POST',
610 headers: { 'Content-Type': 'application/json' },
611 body: JSON.stringify({
612 prompt,
613 imageUrl: imageUrl || null,
614 model: modelName,
615 authToken: puter.authToken || null
616 })
617 }).then(async (resp) => {
618 const data = await resp.json().catch(() => ({}));
619 if (!resp.ok) {
620 const err = new Error(data.error || `Puter AI proxy error (${resp.status})`);
621 if (data.code) err.code = data.code;
622 throw err;
623 }

Callers 2

renderVirtualGridFunction · 0.85
renderVisibleItemsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected