atmosphere explorer pds.ls
tool typescript atproto

fix og card indent and padding

handle.invalid 3b92a93b d99c1327

verified
+5 -3
+5 -3
src/worker.js
··· 110 110 const keySegs = []; 111 111 if (key !== undefined) { 112 112 keySegs.push({ text: String(key), color: isIndex ? C.index : C.key }); 113 - keySegs.push({ text: ": ", color: C.colon }); 113 + keySegs.push({ text: ":", color: C.colon, mr: 4 }); 114 114 } 115 115 116 116 if (value === null) { ··· 189 189 "div", 190 190 { style: { display: "flex", overflow: "hidden", whiteSpace: "nowrap" } }, 191 191 ...guides, 192 - ...line.segments.map((seg) => h("div", { style: { color: seg.color } }, seg.text)), 192 + ...line.segments.map((seg) => 193 + h("div", { style: { color: seg.color, marginRight: seg.mr ?? 0, flexShrink: seg.mr ? 0 : undefined } }, seg.text), 194 + ), 193 195 ); 194 196 } 195 197 ··· 205 207 206 208 const availableHeight = 630 - 100; // height minus vertical padding 207 209 const fontSize = Math.min(32, Math.max(18, Math.floor(availableHeight / (lines.length * 1.5)))); 208 - const guideMargin = Math.round((fontSize * 19) / 18); 210 + const guideMargin = Math.round(fontSize * 1.2) - 1; 209 211 210 212 // Re-truncate string values if the larger font size means fewer chars fit. 211 213 // Available width: 1200 canvas - 100 padding - 80 logo area - 200 for key/depth overhead;