From 1440b4890ed4705c9fe9eaa64616f248d905c235 Mon Sep 17 00:00:00 2001 From: Severin Ibarluzea Date: Fri, 18 Oct 2024 11:56:30 -0700 Subject: [PATCH] add support for schAutoLayoutEnabled prop on (#65) * add support for schematic autolayout prop on groups * formatbot: Automatically format code --------- Co-authored-by: tscircuitbot --- lib/components/group.ts | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/components/group.ts b/lib/components/group.ts index de22a91..06b5e8b 100644 --- a/lib/components/group.ts +++ b/lib/components/group.ts @@ -15,6 +15,13 @@ export interface SubcircuitGroupProps extends BaseGroupProps { layout?: LayoutBuilder routingDisabled?: boolean defaultTraceWidth?: Distance + + /** + * If true, we'll automatically layout the schematic for this group. Must be + * a subcircuit (currently). This is eventually going to be replaced with more + * sophisticated layout options/modes and will be enabled by default. + */ + schAutoLayoutEnabled?: boolean } export type GroupProps = SubcircuitGroupProps | BaseGroupProps @@ -27,6 +34,7 @@ export const baseGroupProps = commonLayoutProps.extend({ export const subcircuitGroupProps = baseGroupProps.extend({ subcircuit: z.literal(true), layout: z.custom((v) => true).optional(), + schAutoLayoutEnabled: z.boolean().optional(), routingDisabled: z.boolean().optional(), defaultTraceWidth: length.optional(), }) diff --git a/package.json b/package.json index afc2a1b..9087723 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "author": "", "license": "ISC", "devDependencies": { - "@biomejs/biome": "^1.9.3", + "@biomejs/biome": "^1.9.4", "@tscircuit/layout": "^0.0.11", "@tscircuit/soup": "^0.0.69", "@types/bun": "^1.1.8",