Skip to content

fix(react): namespace SVG resource IDs per instance - #17

Merged
smbdy merged 1 commit into
mainfrom
fix/per-instance-svg-ids
Aug 4, 2026
Merged

smbdy merged 1 commit into
mainfrom
fix/per-instance-svg-ids

Conversation

@smbdy

@smbdy smbdy commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • namespace SVG clip path, gradient, mask, and fragment IDs per mounted React instance
  • rewrite matching URL and href references in generated components and GitHub fallback SVGs
  • avoid sharing cached converted fallback content when an SVG contains instance-bound IDs
  • preserve the id-free generation and caching fast paths
  • add a patch changeset for @bgd-labs/icons-react

Why

Multiple copies of the same icon previously emitted identical SVG resource IDs. Since fragment lookups are document-global, a copy in a hidden drawer or display-none subtree could capture the references from a visible copy and make that icon render blank.

Validation

  • pnpm test: 216 tests passed
  • pnpm typecheck
  • pnpm lint
  • pnpm format:check
  • pnpm check:consumers: ESM, CJS, SSR, and tree-shaking passed
  • pnpm size: all budgets passed
  • publint and Are the Types Wrong passed for both packages
  • production dependency audit: 0 vulnerabilities
  • pnpm stress: 913 components, 1,748 code-split chunks, formula size budgets passed

@smbdy
smbdy merged commit d6354ae into main Aug 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant