Skip to content

feat: add schematic graphic props - #818

Merged
seveibar merged 16 commits into
mainfrom
feat/schematic-graphic-props
Aug 26, 2026
Merged

feat: add schematic graphic props#818
seveibar merged 16 commits into
mainfrom
feat/schematic-graphic-props

Conversation

@seveibar

@seveibar seveibar commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add SchematicGraphicProps and schematicGraphicProps for <schematicgraphic />
  • accept at least one graphic source: inline svgContent, an SVG imageUrl/static-file import, or both
  • when both sources are supplied, treat imageUrl as the canonical asset source and svgContent as optional materialized fallback content
  • expose optional width and height distance props, normalize unit strings to millimetres, and reject non-positive or non-finite dimensions
  • report explicit validation errors for a missing source and empty source values
  • allow name and displayName to be omitted from <schematicsheet> so a diagram-only page can use the concise nested form
  • export the parser and type from the package entrypoint and regenerate the public props documentation

This is the props layer for embedding a system block diagram in a schematic sheet, including as the first page of a schematic PDF.

Related implementation chain:

Preview package: https://pkg.pr.new/@tscircuit/props@b76321d

Testing

  • bun test (461 passing)
  • bun run typecheck
  • bun run build
  • bun run check-circular-deps
  • bun run format:check
  • git diff --check
  • all required documentation generators

Comment thread tests/schematic-graphic1.test.ts
@seveibar
seveibar merged commit 091845f into main Aug 26, 2026
4 checks 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