From 7054d88edb5fa6860416f68492419e6ea809a06d Mon Sep 17 00:00:00 2001 From: Rushabh Patil Date: Sun, 31 May 2026 23:38:13 +0530 Subject: [PATCH 1/2] remove unsupported corner radius from schematic rect --- README.md | 1 - generated/COMPONENT_TYPES.md | 2 -- generated/PROPS_OVERVIEW.md | 1 - lib/components/schematic-rect.ts | 4 +--- tests/schematic-rect.test.ts | 12 ++++++++++++ 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 960ac285..7cfe846a 100644 --- a/README.md +++ b/README.md @@ -1565,7 +1565,6 @@ export interface SchematicRectProps { isFilled?: boolean; fillColor?: string; isDashed?: boolean; - cornerRadius?: Distance; } ``` diff --git a/generated/COMPONENT_TYPES.md b/generated/COMPONENT_TYPES.md index 75fa9a87..553a7f5d 100644 --- a/generated/COMPONENT_TYPES.md +++ b/generated/COMPONENT_TYPES.md @@ -3470,7 +3470,6 @@ export const schematicRectProps = z.object({ isFilled: z.boolean().optional().default(false), fillColor: z.string().optional(), isDashed: z.boolean().optional().default(false), - cornerRadius: distance.optional(), }) export interface SchematicRectProps { schX?: Distance @@ -3483,7 +3482,6 @@ export interface SchematicRectProps { isFilled?: boolean fillColor?: string isDashed?: boolean - cornerRadius?: Distance } ``` diff --git a/generated/PROPS_OVERVIEW.md b/generated/PROPS_OVERVIEW.md index 392abdc9..3f83ef7b 100644 --- a/generated/PROPS_OVERVIEW.md +++ b/generated/PROPS_OVERVIEW.md @@ -1942,7 +1942,6 @@ export interface SchematicRectProps { isFilled?: boolean fillColor?: string isDashed?: boolean - cornerRadius?: Distance } diff --git a/lib/components/schematic-rect.ts b/lib/components/schematic-rect.ts index 8bd97e2f..98260363 100644 --- a/lib/components/schematic-rect.ts +++ b/lib/components/schematic-rect.ts @@ -1,4 +1,4 @@ -import { distance, point, rotation } from "circuit-json" +import { distance, rotation } from "circuit-json" import { z } from "zod" import { expectTypesMatch } from "lib/typecheck" import type { Distance } from "lib/common/distance" @@ -14,7 +14,6 @@ export const schematicRectProps = z.object({ isFilled: z.boolean().optional().default(false), fillColor: z.string().optional(), isDashed: z.boolean().optional().default(false), - cornerRadius: distance.optional(), }) export interface SchematicRectProps { @@ -28,7 +27,6 @@ export interface SchematicRectProps { isFilled?: boolean fillColor?: string isDashed?: boolean - cornerRadius?: Distance } export type InferredSchematicRectProps = z.input diff --git a/tests/schematic-rect.test.ts b/tests/schematic-rect.test.ts index 61d25ff1..570b9f5b 100644 --- a/tests/schematic-rect.test.ts +++ b/tests/schematic-rect.test.ts @@ -47,3 +47,15 @@ test("schematic rect allows styling overrides", () => { expect(parsed.fillColor).toBe("#cccccc") expect(parsed.isDashed).toBe(true) }) + +test("schematic rect does not expose corner radius", () => { + const parsed = schematicRectProps.parse({ + schX: 0, + schY: 0, + width: 5, + height: 3, + cornerRadius: 2, + } as any) + + expect((parsed as any).cornerRadius).toBeUndefined() +}) From ac9f1af527147b694c59c3aae6337207f444030d Mon Sep 17 00:00:00 2001 From: Rushabh Patil Date: Sun, 31 May 2026 23:41:43 +0530 Subject: [PATCH 2/2] update --- tests/schematic-rect.test.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tests/schematic-rect.test.ts b/tests/schematic-rect.test.ts index 570b9f5b..61d25ff1 100644 --- a/tests/schematic-rect.test.ts +++ b/tests/schematic-rect.test.ts @@ -47,15 +47,3 @@ test("schematic rect allows styling overrides", () => { expect(parsed.fillColor).toBe("#cccccc") expect(parsed.isDashed).toBe(true) }) - -test("schematic rect does not expose corner radius", () => { - const parsed = schematicRectProps.parse({ - schX: 0, - schY: 0, - width: 5, - height: 3, - cornerRadius: 2, - } as any) - - expect((parsed as any).cornerRadius).toBeUndefined() -})