@tscircuit/props 0.0.638 → 0.0.639

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1912,6 +1912,10 @@ export interface SchematicSheetProps {
1912
1912
  sheetIndex?: number;
1913
1913
  /** Sheet size used to render the schematic. Defaults to A4. */
1914
1914
  sheetSize?: SchematicSheetSize;
1915
+ /** Explicit schematic sheet width. Overrides the width from sheetSize. */
1916
+ sheetWidth?: Distance;
1917
+ /** Explicit schematic sheet height. Overrides the height from sheetSize. */
1918
+ sheetHeight?: Distance;
1915
1919
  children?: any;
1916
1920
  }
1917
1921
  ```
package/dist/index.d.ts CHANGED
@@ -217979,6 +217979,10 @@ interface SchematicSheetProps {
217979
217979
  sheetIndex?: number;
217980
217980
  /** Sheet size used to render the schematic. Defaults to A4. */
217981
217981
  sheetSize?: SchematicSheetSize;
217982
+ /** Explicit schematic sheet width. Overrides the width from sheetSize. */
217983
+ sheetWidth?: Distance;
217984
+ /** Explicit schematic sheet height. Overrides the height from sheetSize. */
217985
+ sheetHeight?: Distance;
217982
217986
  children?: any;
217983
217987
  }
217984
217988
  declare const schematicSheetProps: z.ZodObject<{
@@ -217986,6 +217990,8 @@ declare const schematicSheetProps: z.ZodObject<{
217986
217990
  displayName: z.ZodString;
217987
217991
  sheetIndex: z.ZodOptional<z.ZodNumber>;
217988
217992
  sheetSize: z.ZodDefault<z.ZodEnum<["A4", "ANSI_B"]>>;
217993
+ sheetWidth: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
217994
+ sheetHeight: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
217989
217995
  children: z.ZodOptional<z.ZodAny>;
217990
217996
  }, "strip", z.ZodTypeAny, {
217991
217997
  name: string;
@@ -217993,12 +217999,16 @@ declare const schematicSheetProps: z.ZodObject<{
217993
217999
  sheetSize: "A4" | "ANSI_B";
217994
218000
  children?: any;
217995
218001
  sheetIndex?: number | undefined;
218002
+ sheetWidth?: number | undefined;
218003
+ sheetHeight?: number | undefined;
217996
218004
  }, {
217997
218005
  name: string;
217998
218006
  displayName: string;
217999
218007
  children?: any;
218000
218008
  sheetIndex?: number | undefined;
218001
218009
  sheetSize?: "A4" | "ANSI_B" | undefined;
218010
+ sheetWidth?: string | number | undefined;
218011
+ sheetHeight?: string | number | undefined;
218002
218012
  }>;
218003
218013
  type InferredSchematicSheetProps = z.input<typeof schematicSheetProps>;
218004
218014
 
package/dist/index.js CHANGED
@@ -18827,11 +18827,14 @@ expectTypesMatch(
18827
18827
 
18828
18828
  // lib/components/schematic-sheet.ts
18829
18829
  import { z as z132 } from "zod";
18830
+ import { distance as distance43 } from "circuit-json";
18830
18831
  var schematicSheetProps = z132.object({
18831
18832
  name: z132.string(),
18832
18833
  displayName: z132.string(),
18833
18834
  sheetIndex: z132.number().optional(),
18834
18835
  sheetSize: z132.enum(["A4", "ANSI_B"]).default("A4"),
18836
+ sheetWidth: distance43.pipe(z132.number().positive()).optional(),
18837
+ sheetHeight: distance43.pipe(z132.number().positive()).optional(),
18835
18838
  children: z132.any().optional()
18836
18839
  });
18837
18840
  expectTypesMatch(true);
@@ -18888,7 +18891,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
18888
18891
  });
18889
18892
 
18890
18893
  // lib/components/silkscreen-line.ts
18891
- import { distance as distance43 } from "circuit-json";
18894
+ import { distance as distance44 } from "circuit-json";
18892
18895
  var silkscreenLineProps = pcbLayoutProps.omit({
18893
18896
  pcbX: true,
18894
18897
  pcbY: true,
@@ -18896,33 +18899,33 @@ var silkscreenLineProps = pcbLayoutProps.omit({
18896
18899
  pcbOffsetY: true,
18897
18900
  pcbRotation: true
18898
18901
  }).extend({
18899
- strokeWidth: distance43,
18900
- x1: distance43,
18901
- y1: distance43,
18902
- x2: distance43,
18903
- y2: distance43
18902
+ strokeWidth: distance44,
18903
+ x1: distance44,
18904
+ y1: distance44,
18905
+ x2: distance44,
18906
+ y2: distance44
18904
18907
  });
18905
18908
 
18906
18909
  // lib/components/silkscreen-rect.ts
18907
- import { distance as distance44 } from "circuit-json";
18910
+ import { distance as distance45 } from "circuit-json";
18908
18911
  import { z as z136 } from "zod";
18909
18912
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18910
18913
  filled: z136.boolean().default(true).optional(),
18911
18914
  stroke: z136.enum(["dashed", "solid", "none"]).optional(),
18912
- strokeWidth: distance44.optional(),
18913
- width: distance44,
18914
- height: distance44,
18915
- cornerRadius: distance44.optional()
18915
+ strokeWidth: distance45.optional(),
18916
+ width: distance45,
18917
+ height: distance45,
18918
+ cornerRadius: distance45.optional()
18916
18919
  });
18917
18920
 
18918
18921
  // lib/components/silkscreen-circle.ts
18919
- import { distance as distance45 } from "circuit-json";
18922
+ import { distance as distance46 } from "circuit-json";
18920
18923
  import { z as z137 } from "zod";
18921
18924
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18922
18925
  isFilled: z137.boolean().optional(),
18923
18926
  isOutline: z137.boolean().optional(),
18924
- strokeWidth: distance45.optional(),
18925
- radius: distance45
18927
+ strokeWidth: distance46.optional(),
18928
+ radius: distance46
18926
18929
  });
18927
18930
 
18928
18931
  // lib/components/silkscreen-graphic.ts
@@ -18937,11 +18940,11 @@ var silkscreenGraphicProps = pcbLayoutProps.omit({ layer: true, pcbStyle: true,
18937
18940
  expectTypesMatch(true);
18938
18941
 
18939
18942
  // lib/components/trace-hint.ts
18940
- import { distance as distance46, layer_ref as layer_ref14, route_hint_point as route_hint_point6 } from "circuit-json";
18943
+ import { distance as distance47, layer_ref as layer_ref14, route_hint_point as route_hint_point6 } from "circuit-json";
18941
18944
  import { z as z139 } from "zod";
18942
18945
  var routeHintPointProps = z139.object({
18943
- x: distance46,
18944
- y: distance46,
18946
+ x: distance47,
18947
+ y: distance47,
18945
18948
  via: z139.boolean().optional(),
18946
18949
  toLayer: layer_ref14.optional()
18947
18950
  });
@@ -18956,14 +18959,14 @@ var traceHintProps = z139.object({
18956
18959
  });
18957
18960
 
18958
18961
  // lib/components/port.ts
18959
- import { distance as distance47 } from "circuit-json";
18962
+ import { distance as distance48 } from "circuit-json";
18960
18963
  import { z as z140 } from "zod";
18961
18964
  var portProps = commonLayoutProps.extend({
18962
18965
  name: z140.string().optional(),
18963
18966
  pinNumber: z140.number().optional(),
18964
18967
  schStemLength: z140.number().optional(),
18965
18968
  schPinLabelFontSize: z140.enum(["default", "sm"]).or(
18966
- distance47.refine((value) => Number.isFinite(value) && value > 0, {
18969
+ distance48.refine((value) => Number.isFinite(value) && value > 0, {
18967
18970
  message: "Schematic pin-label font size must be positive and finite"
18968
18971
  })
18969
18972
  ).optional(),
@@ -18991,17 +18994,17 @@ var pcbNoteTextProps = pcbLayoutProps.extend({
18991
18994
  expectTypesMatch(true);
18992
18995
 
18993
18996
  // lib/components/pcb-note-rect.ts
18994
- import { distance as distance48 } from "circuit-json";
18997
+ import { distance as distance49 } from "circuit-json";
18995
18998
  import { z as z142 } from "zod";
18996
18999
  var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
18997
- width: distance48,
18998
- height: distance48,
18999
- strokeWidth: distance48.optional(),
19000
+ width: distance49,
19001
+ height: distance49,
19002
+ strokeWidth: distance49.optional(),
19000
19003
  isFilled: z142.boolean().optional(),
19001
19004
  hasStroke: z142.boolean().optional(),
19002
19005
  isStrokeDashed: z142.boolean().optional(),
19003
19006
  color: z142.string().optional(),
19004
- cornerRadius: distance48.optional()
19007
+ cornerRadius: distance49.optional()
19005
19008
  });
19006
19009
  expectTypesMatch(true);
19007
19010
 
@@ -19029,7 +19032,7 @@ var pcbNotePathProps = pcbLayoutProps.omit({
19029
19032
  expectTypesMatch(true);
19030
19033
 
19031
19034
  // lib/components/pcb-note-line.ts
19032
- import { distance as distance49 } from "circuit-json";
19035
+ import { distance as distance50 } from "circuit-json";
19033
19036
  import { z as z144 } from "zod";
19034
19037
  var pcbNoteLineProps = pcbLayoutProps.omit({
19035
19038
  pcbLeftEdgeX: true,
@@ -19042,18 +19045,18 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
19042
19045
  pcbOffsetY: true,
19043
19046
  pcbRotation: true
19044
19047
  }).extend({
19045
- x1: distance49,
19046
- y1: distance49,
19047
- x2: distance49,
19048
- y2: distance49,
19049
- strokeWidth: distance49.optional(),
19048
+ x1: distance50,
19049
+ y1: distance50,
19050
+ x2: distance50,
19051
+ y2: distance50,
19052
+ strokeWidth: distance50.optional(),
19050
19053
  color: z144.string().optional(),
19051
19054
  isDashed: z144.boolean().optional()
19052
19055
  });
19053
19056
  expectTypesMatch(true);
19054
19057
 
19055
19058
  // lib/components/pcb-note-dimension.ts
19056
- import { distance as distance50, length as length13 } from "circuit-json";
19059
+ import { distance as distance51, length as length13 } from "circuit-json";
19057
19060
  import { z as z145 } from "zod";
19058
19061
  var dimensionTarget2 = z145.union([z145.string(), point]);
19059
19062
  var pcbNoteDimensionProps = pcbLayoutProps.omit({
@@ -19070,11 +19073,11 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
19070
19073
  from: dimensionTarget2,
19071
19074
  to: dimensionTarget2,
19072
19075
  text: z145.string().optional(),
19073
- offset: distance50.optional(),
19076
+ offset: distance51.optional(),
19074
19077
  font: z145.enum(["tscircuit2024"]).optional(),
19075
19078
  fontSize: length13.optional(),
19076
19079
  color: z145.string().optional(),
19077
- arrowSize: distance50.optional(),
19080
+ arrowSize: distance51.optional(),
19078
19081
  units: z145.enum(["in", "mm"]).optional(),
19079
19082
  outerEdgeToEdge: z145.literal(true).optional(),
19080
19083
  centerToCenter: z145.literal(true).optional(),