#469
feat(shadcn): add target prop to Link
Linkin@json-render/shadcnand@json-render/shadcn-sveltealways opened in the same tab. A spec had no way to send the user to an external page without leaving the app.Linknow takestarget: "_self" | "_blank", nullable like the other optional props. With_blankit also setsrel="noopener noreferrer", so the opened page gets nowindow.openerand no referrer.- Without
targetthe rendered<a>is unchanged, so existing specs and model output keep working. - The catalog description mentions
_blank, socatalog.prompt()tells the model how to open a new tab. The shadcn and shadcn-svelte docs pages and skills list the new prop, anddocs-baseline.jsonhas the new hashes for the two docs pages.
Tests
- New shadcn-svelte test: a
_blanklink renderstarget="_blank"andrel="noopener noreferrer". @json-render/shadcnhas no component tests, so I checked the builtLinkwithrenderToString:_blankrenderstargetandrel, andnullrenders neither.pnpm vitest run packages/shadcn-svelte: 7/7 pass.check-typesfor both packages and their dependents, andlintfor both packages, pass.
Written by Opus 5.5 (opus-5.5) through Sprocket.
@Amronos is attempting to deploy a commit to the Vercel Labs Team on Vercel.
A member of the Team first needs to authorize it.