@tscircuit/core 0.0.786 → 0.0.788

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/dist/index.d.ts CHANGED
@@ -33049,16 +33049,16 @@ declare class SchematicLine extends PrimitiveComponent<typeof schematicLineProps
33049
33049
  x2: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
33050
33050
  y2: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
33051
33051
  strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
33052
- color: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
33052
+ color: zod.ZodOptional<zod.ZodString>;
33053
33053
  isDashed: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
33054
33054
  }, "strip", zod.ZodTypeAny, {
33055
- color: string;
33056
33055
  isDashed: boolean;
33057
33056
  x1: number;
33058
33057
  y1: number;
33059
33058
  x2: number;
33060
33059
  y2: number;
33061
33060
  strokeWidth?: number | undefined;
33061
+ color?: string | undefined;
33062
33062
  }, {
33063
33063
  x1: string | number;
33064
33064
  y1: string | number;
@@ -33084,20 +33084,20 @@ declare class SchematicRect extends PrimitiveComponent<typeof schematicRectProps
33084
33084
  height: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
33085
33085
  rotation: zod.ZodDefault<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
33086
33086
  strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
33087
- color: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
33087
+ color: zod.ZodOptional<zod.ZodString>;
33088
33088
  isFilled: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
33089
33089
  fillColor: zod.ZodOptional<zod.ZodString>;
33090
33090
  isDashed: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
33091
33091
  }, "strip", zod.ZodTypeAny, {
33092
33092
  width: number;
33093
33093
  height: number;
33094
- color: string;
33095
33094
  isFilled: boolean;
33096
33095
  isDashed: boolean;
33097
33096
  rotation: number;
33098
33097
  schX?: number | undefined;
33099
33098
  schY?: number | undefined;
33100
33099
  strokeWidth?: number | undefined;
33100
+ color?: string | undefined;
33101
33101
  fillColor?: string | undefined;
33102
33102
  }, {
33103
33103
  width: string | number;
@@ -33136,7 +33136,7 @@ declare class SchematicArc extends PrimitiveComponent<typeof schematicArcProps>
33136
33136
  endAngleDegrees: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
33137
33137
  direction: zod.ZodDefault<zod.ZodEnum<["clockwise", "counterclockwise"]>>;
33138
33138
  strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
33139
- color: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
33139
+ color: zod.ZodOptional<zod.ZodString>;
33140
33140
  isDashed: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
33141
33141
  }, "strip", zod.ZodTypeAny, {
33142
33142
  direction: "clockwise" | "counterclockwise";
@@ -33145,11 +33145,11 @@ declare class SchematicArc extends PrimitiveComponent<typeof schematicArcProps>
33145
33145
  y: number;
33146
33146
  };
33147
33147
  radius: number;
33148
- color: string;
33149
33148
  startAngleDegrees: number;
33150
33149
  endAngleDegrees: number;
33151
33150
  isDashed: boolean;
33152
33151
  strokeWidth?: number | undefined;
33152
+ color?: string | undefined;
33153
33153
  }, {
33154
33154
  center: {
33155
33155
  x: string | number;
@@ -33185,7 +33185,7 @@ declare class SchematicCircle extends PrimitiveComponent<typeof schematicCircleP
33185
33185
  }>;
33186
33186
  radius: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
33187
33187
  strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
33188
- color: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
33188
+ color: zod.ZodOptional<zod.ZodString>;
33189
33189
  isFilled: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
33190
33190
  fillColor: zod.ZodOptional<zod.ZodString>;
33191
33191
  isDashed: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
@@ -33195,10 +33195,10 @@ declare class SchematicCircle extends PrimitiveComponent<typeof schematicCircleP
33195
33195
  y: number;
33196
33196
  };
33197
33197
  radius: number;
33198
- color: string;
33199
33198
  isFilled: boolean;
33200
33199
  isDashed: boolean;
33201
33200
  strokeWidth?: number | undefined;
33201
+ color?: string | undefined;
33202
33202
  fillColor?: string | undefined;
33203
33203
  }, {
33204
33204
  center: {
package/dist/index.js CHANGED
@@ -13014,7 +13014,11 @@ import {
13014
13014
  } from "@tscircuit/checks";
13015
13015
  var getRoundedRectOutline = (width, height, radius) => {
13016
13016
  const r = Math.min(radius, width / 2, height / 2);
13017
- const segments = Math.max(1, Math.ceil(Math.PI / 2 * r));
13017
+ const maxArcLengthPerSegment = 0.1;
13018
+ const segments = Math.max(
13019
+ 1,
13020
+ Math.ceil(Math.PI / 2 * r / maxArcLengthPerSegment)
13021
+ );
13018
13022
  const step = Math.PI / 2 / segments;
13019
13023
  const w2 = width / 2;
13020
13024
  const h2 = height / 2;
@@ -16122,8 +16126,8 @@ var SchematicLine = class extends PrimitiveComponent2 {
16122
16126
  y1: props.y1 + globalPos.y,
16123
16127
  x2: props.x2 + globalPos.x,
16124
16128
  y2: props.y2 + globalPos.y,
16125
- stroke_width: SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
16126
- color: SCHEMATIC_COMPONENT_OUTLINE_COLOR,
16129
+ stroke_width: props.strokeWidth ?? SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
16130
+ color: props.color ?? SCHEMATIC_COMPONENT_OUTLINE_COLOR,
16127
16131
  is_dashed: false,
16128
16132
  subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0
16129
16133
  });
@@ -16155,8 +16159,8 @@ var SchematicRect = class extends PrimitiveComponent2 {
16155
16159
  },
16156
16160
  width: props.width,
16157
16161
  height: props.height,
16158
- stroke_width: SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
16159
- color: SCHEMATIC_COMPONENT_OUTLINE_COLOR,
16162
+ stroke_width: props.strokeWidth ?? SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
16163
+ color: props.color ?? SCHEMATIC_COMPONENT_OUTLINE_COLOR,
16160
16164
  is_filled: props.isFilled,
16161
16165
  schematic_component_id,
16162
16166
  is_dashed: props.isDashed,
@@ -16194,8 +16198,8 @@ var SchematicArc = class extends PrimitiveComponent2 {
16194
16198
  start_angle_degrees: props.startAngleDegrees,
16195
16199
  end_angle_degrees: props.endAngleDegrees,
16196
16200
  direction: props.direction,
16197
- stroke_width: SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
16198
- color: SCHEMATIC_COMPONENT_OUTLINE_COLOR,
16201
+ stroke_width: props.strokeWidth ?? SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
16202
+ color: props.color ?? SCHEMATIC_COMPONENT_OUTLINE_COLOR,
16199
16203
  is_dashed: props.isDashed,
16200
16204
  subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0
16201
16205
  });
@@ -16227,8 +16231,8 @@ var SchematicCircle = class extends PrimitiveComponent2 {
16227
16231
  y: props.center.y + globalPos.y
16228
16232
  },
16229
16233
  radius: props.radius,
16230
- stroke_width: SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
16231
- color: SCHEMATIC_COMPONENT_OUTLINE_COLOR,
16234
+ stroke_width: props.strokeWidth ?? SCHEMATIC_COMPONENT_OUTLINE_STROKE_WIDTH,
16235
+ color: props.color ?? SCHEMATIC_COMPONENT_OUTLINE_COLOR,
16232
16236
  is_filled: props.isFilled,
16233
16237
  fill_color: props.fillColor,
16234
16238
  is_dashed: props.isDashed,
@@ -16686,7 +16690,7 @@ import { identity as identity6 } from "transformation-matrix";
16686
16690
  var package_default = {
16687
16691
  name: "@tscircuit/core",
16688
16692
  type: "module",
16689
- version: "0.0.785",
16693
+ version: "0.0.787",
16690
16694
  types: "dist/index.d.ts",
16691
16695
  main: "dist/index.js",
16692
16696
  module: "dist/index.js",
@@ -16726,7 +16730,7 @@ var package_default = {
16726
16730
  "@tscircuit/matchpack": "^0.0.16",
16727
16731
  "@tscircuit/math-utils": "^0.0.21",
16728
16732
  "@tscircuit/miniflex": "^0.0.4",
16729
- "@tscircuit/props": "0.0.360",
16733
+ "@tscircuit/props": "0.0.361",
16730
16734
  "@tscircuit/schematic-autolayout": "^0.0.6",
16731
16735
  "@tscircuit/schematic-match-adapt": "^0.0.16",
16732
16736
  "@tscircuit/schematic-trace-solver": "^0.0.41",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.786",
4
+ "version": "0.0.788",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -41,7 +41,7 @@
41
41
  "@tscircuit/matchpack": "^0.0.16",
42
42
  "@tscircuit/math-utils": "^0.0.21",
43
43
  "@tscircuit/miniflex": "^0.0.4",
44
- "@tscircuit/props": "0.0.360",
44
+ "@tscircuit/props": "0.0.361",
45
45
  "@tscircuit/schematic-autolayout": "^0.0.6",
46
46
  "@tscircuit/schematic-match-adapt": "^0.0.16",
47
47
  "@tscircuit/schematic-trace-solver": "^0.0.41",