openpencil/packages
Fini d2edcb352f fix(pen-core): preserve cornerRadius on media-clipping frames
Codex stop-hook on the prior strip-nested-card-decoration commit
caught a regression: cornerRadius on a media-clipping frame
(`clipContent: true` wrapping an image / video, or roles like
`image-placeholder` / `thumbnail` / `cover-image`) is doing the
rounding work for the photo, not stacking card decoration. Blanket
stripping un-rounded the media against the user's clear intent —
typical pattern is

  card { cornerRadius: 16, clipContent: true }
   └─ image-placeholder { cornerRadius: 12, clipContent: true }
       └─ image

where the inner cornerRadius rounds the photo and the outer rounds
the card frame around it. After the prior pass the inner radius got
stripped (ancestor had cornerRadius too) → square corners on the
photo.

New `MEDIA_CLIP_ROLES` set + `isMediaClipper(node)` helper:
  - role match: image, image-card, image-placeholder, video,
    video-placeholder, media, media-thumbnail, thumbnail, cover,
    cover-image, gallery-item
  - shape match: clipContent: true AND has a direct image / video /
    media-roled child

Either signal preserves cornerRadius. Other decorations (stroke,
shadow) still get stripped — those ARE redundant card decoration
even on a media wrapper, since the photo's own outline + the
ancestor card already provide the visual frame.

Tests: 2 new cases — clipContent + image, and the role-only path
covering image-placeholder / thumbnail / cover-image / gallery-item.
2026-05-11 00:23:08 +08:00
..
agent-native@22f20e42cd chore(agent): bump agent-native — anthropic provider gets same fix 2026-05-10 13:55:00 +08:00
pen-acp chore(release): bump to v0.8.0 2026-04-27 08:20:00 +08:00
pen-ai-skills fix(ai): edge-padding detector skips when any section has its own h-padding 2026-05-11 00:16:40 +08:00
pen-core fix(pen-core): preserve cornerRadius on media-clipping frames 2026-05-11 00:23:08 +08:00
pen-engine chore(release): bump to v0.8.0 2026-04-27 08:20:00 +08:00
pen-figma chore(release): bump to v0.8.0 2026-04-27 08:20:00 +08:00
pen-mcp feat(ai): detect stacked horizontal padding (page-vs-section gutter) 2026-05-10 15:15:00 +08:00
pen-react chore(release): bump to v0.8.0 2026-04-27 08:20:00 +08:00
pen-renderer fix(renderer): per-node catch restores canvas save stack 2026-05-10 22:53:58 +08:00
pen-sdk chore(release): bump to v0.8.0 2026-04-27 08:20:00 +08:00
pen-types chore(release): bump to v0.8.0 2026-04-27 08:20:00 +08:00
CLAUDE.md V0.7.0 (#95) 2026-04-11 23:25:13 +08:00