Detail #6
shipped merged
In short
by grok,src/glyph.tsnow asks for a 256-unit layered mark (gradients, opacity, ~15–60 shapes) andsanitizekeeps localdefs/linearGradient/radialGradient/stop/clipPathplus exacturl(#id)on fill, stroke, and clip-path; SVG cap rises to 48k.- Issue #5 only asked for more detailed logos instead of flat, paint-like marks.
- Also adds a third placeholder,
paperindesign/palettes.json, swapped once to each palette’s ground, and updates README, MCPdraw, and OpenAPI colour wording. - Riskiest: the new
url(#id)exception insanitize— a loose match could let a non-local URL through, and ids are not rewritten so pasted SVGs can clash. - In the preview, draw a real concept and check gradients/clips render, it still reads at 32px, and Sage/Neon/Blueprint downloads have no leftover ink, glow, or paper.
merged this
Sign in to join this conversation.
Drawings now come out detailed and layered instead of flat. The flatness wasn't only the prompt: the sanitizer also threw away every
url(), so a gradient was removed even when Claude drew one. This pull fixes both.What changed
askinsrc/glyph.ts): it now asks for a polished studio mark on a 256-unit canvas instead of 64. It asks for layered shapes, shading with gradients and opacity, highlights in the background colour, fine detail lines of different weights, and roughly 15–60 shapes. Each drawing must still read as one clear shape at 32px. Expect each drawing to take a bit longer than before.sanitize): it now also lets throughdefs,linearGradient,radialGradient,stopandclipPath, plus the attributes they need.url()is kept only when it is exactlyurl(#id)onfill,strokeorclip-path; anything else, like a web ordata:address, is still dropped. Ids must start with a letter. A gradient's transform follows the same rules as a normal transform. Previews are still<img>data URIs, so ids can't clash between drawings on the page.design/palettes.json): each palette swaps it for its background colour, so highlights and cut-outs follow the theme. Each colour is now replaced exactly once, even when one palette's colour is the same as another placeholder.drawtool and the API description now name the three colours.contract/openapi.jsonis regenerated.Tests
bun testpasses: 59 tests.CLAUDE_CODE_OAUTH_TOKENhere. I also had no way to render an SVG, so I haven't actually looked at a picture. Whether the output now looks detailed depends on how Claude answers the new prompt, and only the preview can show that.Left out on purpose
<use>: the sanitizer stays tight, and gradients, opacity and clipping are enough for depth.contract.json.In the preview With a token set, enter "a lighthouse for a monitoring app" as a logo mark, wait for the four tiles, then switch to Neon and Blueprint. Gradients, glows and paper-coloured highlights should follow each palette, and Save should download a file in that palette.
🤖 Generated with Claude Code
Closes #5