@tscircuit/props 0.0.703 → 0.0.704

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
@@ -2479,6 +2479,20 @@ export interface SymbolProps {
2479
2479
  originalFacingDirection?: "up" | "down" | "left" | "right";
2480
2480
  width?: string | number;
2481
2481
  height?: string | number;
2482
+ /** CSS-style fill (default) and stretch resize axes independently; contain preserves proportions. */
2483
+ fit?: "fill" | "contain" | "stretch";
2484
+ /**
2485
+ * Source sizing bounds in the local symbol coordinate space (mm, +X right, +Y up).
2486
+ * With width/height, maps the bounds center to the symbol position; all artwork
2487
+ * and ports use the same transform. Omitted uses automatic bounds including ports.
2488
+ * maxX must exceed minX and maxY must exceed minY. No aliases; no change to existing defaults.
2489
+ */
2490
+ viewbox?: {
2491
+ minX: number | string;
2492
+ maxX: number | string;
2493
+ minY: number | string;
2494
+ maxY: number | string;
2495
+ };
2482
2496
  name?: string;
2483
2497
  }
2484
2498
  ```
package/dist/index.d.ts CHANGED
@@ -166924,23 +166924,88 @@ interface SymbolProps {
166924
166924
  originalFacingDirection?: "up" | "down" | "left" | "right";
166925
166925
  width?: string | number;
166926
166926
  height?: string | number;
166927
+ /** CSS-style fill (default) and stretch resize axes independently; contain preserves proportions. */
166928
+ fit?: "fill" | "contain" | "stretch";
166929
+ /**
166930
+ * Source sizing bounds in the local symbol coordinate space (mm, +X right, +Y up).
166931
+ * With width/height, maps the bounds center to the symbol position; all artwork
166932
+ * and ports use the same transform. Omitted uses automatic bounds including ports.
166933
+ * maxX must exceed minX and maxY must exceed minY. No aliases; no change to existing defaults.
166934
+ */
166935
+ viewbox?: {
166936
+ minX: number | string;
166937
+ maxX: number | string;
166938
+ minY: number | string;
166939
+ maxY: number | string;
166940
+ };
166927
166941
  name?: string;
166928
166942
  }
166929
166943
  declare const symbolProps: z.ZodObject<{
166930
166944
  originalFacingDirection: z.ZodOptional<z.ZodDefault<z.ZodEnum<["up", "down", "left", "right"]>>>;
166931
166945
  width: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
166932
166946
  height: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
166947
+ fit: z.ZodOptional<z.ZodEnum<["fill", "contain", "stretch"]>>;
166948
+ viewbox: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodObject<{
166949
+ minX: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
166950
+ maxX: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
166951
+ minY: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
166952
+ maxY: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
166953
+ }, "strip", z.ZodTypeAny, {
166954
+ minX: number;
166955
+ maxX: number;
166956
+ minY: number;
166957
+ maxY: number;
166958
+ }, {
166959
+ minX: string | number;
166960
+ maxX: string | number;
166961
+ minY: string | number;
166962
+ maxY: string | number;
166963
+ }>, {
166964
+ minX: number;
166965
+ maxX: number;
166966
+ minY: number;
166967
+ maxY: number;
166968
+ }, {
166969
+ minX: string | number;
166970
+ maxX: string | number;
166971
+ minY: string | number;
166972
+ maxY: string | number;
166973
+ }>, {
166974
+ minX: number;
166975
+ maxX: number;
166976
+ minY: number;
166977
+ maxY: number;
166978
+ }, {
166979
+ minX: string | number;
166980
+ maxX: string | number;
166981
+ minY: string | number;
166982
+ maxY: string | number;
166983
+ }>>;
166933
166984
  name: z.ZodOptional<z.ZodString>;
166934
166985
  }, "strip", z.ZodTypeAny, {
166935
166986
  width?: number | undefined;
166936
166987
  height?: number | undefined;
166937
166988
  name?: string | undefined;
166938
166989
  originalFacingDirection?: "up" | "down" | "left" | "right" | undefined;
166990
+ fit?: "fill" | "stretch" | "contain" | undefined;
166991
+ viewbox?: {
166992
+ minX: number;
166993
+ maxX: number;
166994
+ minY: number;
166995
+ maxY: number;
166996
+ } | undefined;
166939
166997
  }, {
166940
166998
  width?: string | number | undefined;
166941
166999
  height?: string | number | undefined;
166942
167000
  name?: string | undefined;
166943
167001
  originalFacingDirection?: "up" | "down" | "left" | "right" | undefined;
167002
+ fit?: "fill" | "stretch" | "contain" | undefined;
167003
+ viewbox?: {
167004
+ minX: string | number;
167005
+ maxX: string | number;
167006
+ minY: string | number;
167007
+ maxY: string | number;
167008
+ } | undefined;
166944
167009
  }>;
166945
167010
  type SymbolPropsInput = z.input<typeof symbolProps>;
166946
167011
 
package/dist/index.js CHANGED
@@ -18491,6 +18491,19 @@ var symbolProps = z93.object({
18491
18491
  originalFacingDirection: z93.enum(["up", "down", "left", "right"]).default("right").optional(),
18492
18492
  width: distance.optional(),
18493
18493
  height: distance.optional(),
18494
+ fit: z93.enum(["fill", "contain", "stretch"]).optional(),
18495
+ viewbox: z93.object({
18496
+ minX: distance,
18497
+ maxX: distance,
18498
+ minY: distance,
18499
+ maxY: distance
18500
+ }).refine((bounds) => bounds.maxX > bounds.minX, {
18501
+ message: "viewbox maxX must exceed minX",
18502
+ path: ["maxX"]
18503
+ }).refine((bounds) => bounds.maxY > bounds.minY, {
18504
+ message: "viewbox maxY must exceed minY",
18505
+ path: ["maxY"]
18506
+ }).optional(),
18494
18507
  name: z93.string().optional()
18495
18508
  });
18496
18509
  expectTypesMatch(true);