@tscircuit/core 0.0.926 → 0.0.928

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
@@ -1,7 +1,7 @@
1
1
  import * as circuit_json from 'circuit-json';
2
2
  import { PcbTraceError, PcbPlacementError, PcbManualEditConflictWarning, PcbViaClearanceError, LayerRef, AnyCircuitElement, Size, AnySourceComponent, PcbTraceRoutePoint, PcbTrace as PcbTrace$1, PcbVia, SchematicPort, SchematicComponent, RouteHintPoint, CircuitJson } from 'circuit-json';
3
3
  import * as _tscircuit_props from '@tscircuit/props';
4
- import { PlatformConfig, subcircuitGroupProps, AutorouterConfig, traceProps, SupplierPartNumbers, CadModelProp, SchematicPortArrangement, groupProps, boardProps, panelProps, capacitorProps, chipProps, pinoutProps, diodeProps, fuseProps, jumperProps, interconnectProps, solderjumperProps, ledProps, powerSourceProps, voltageSourceProps, resistorProps, constraintProps, fabricationNoteRectProps, fabricationNotePathProps, fabricationNoteTextProps, fabricationNoteDimensionProps, pcbNoteLineProps, pcbNoteRectProps, pcbNoteTextProps, pcbNotePathProps, pcbNoteDimensionProps, footprintProps, subcircuitProps, breakoutProps, breakoutPointProps, holeProps, pcbKeepoutProps, netLabelProps, cadmodelProps, cadassemblyProps, platedHoleProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, silkscreenLineProps, smtPadProps, traceHintProps, viaProps, copperPourProps, cutoutProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, transistorProps, mosfetProps, switchProps, SwitchProps, testpointProps, schematicTextProps, schematicLineProps, schematicRectProps, schematicArcProps, schematicCircleProps, schematicBoxProps, schematicTableProps, schematicRowProps, schematicCellProps, symbolProps, analogSimulationProps, voltageProbeProps, CapacitorProps, ChipProps, DiodeProps, ResistorProps, ManualEditEvent, ManualEditsFile, ChipConnections, manual_edits_file } from '@tscircuit/props';
4
+ import { PlatformConfig, subcircuitGroupProps, AutorouterConfig, traceProps, SupplierPartNumbers, CadModelProp, SchematicPortArrangement, groupProps, boardProps, panelProps, capacitorProps, chipProps, pinoutProps, diodeProps, fuseProps, jumperProps, interconnectProps, solderjumperProps, ledProps, powerSourceProps, voltageSourceProps, resistorProps, constraintProps, fabricationNoteRectProps, fabricationNotePathProps, fabricationNoteTextProps, fabricationNoteDimensionProps, pcbNoteLineProps, pcbNoteRectProps, pcbNoteTextProps, pcbNotePathProps, pcbNoteDimensionProps, footprintProps, subcircuitProps, breakoutProps, breakoutPointProps, holeProps, pcbKeepoutProps, netLabelProps, cadmodelProps, cadassemblyProps, platedHoleProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, silkscreenLineProps, smtPadProps, traceHintProps, viaProps, copperPourProps, copperTextProps, cutoutProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, transistorProps, mosfetProps, switchProps, SwitchProps, testpointProps, schematicTextProps, schematicLineProps, schematicRectProps, schematicArcProps, schematicCircleProps, schematicBoxProps, schematicTableProps, schematicRowProps, schematicCellProps, symbolProps, analogSimulationProps, voltageProbeProps, CapacitorProps, ChipProps, DiodeProps, ResistorProps, ManualEditEvent, ManualEditsFile, ChipConnections, manual_edits_file } from '@tscircuit/props';
5
5
  import * as react from 'react';
6
6
  import react__default, { ReactElement, DetailedHTMLProps, SVGProps } from 'react';
7
7
  export { createElement } from 'react';
@@ -26750,6 +26750,174 @@ declare class CopperPour extends PrimitiveComponent<typeof copperPourProps> {
26750
26750
  doInitialPcbCopperPourRender(): void;
26751
26751
  }
26752
26752
 
26753
+ declare class CopperText extends PrimitiveComponent<typeof copperTextProps> {
26754
+ isPcbPrimitive: boolean;
26755
+ get config(): {
26756
+ componentName: string;
26757
+ zodProps: zod.ZodObject<{
26758
+ pcbX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
26759
+ pcbY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
26760
+ pcbLeftEdgeX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
26761
+ pcbRightEdgeX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
26762
+ pcbTopEdgeY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
26763
+ pcbBottomEdgeY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
26764
+ pcbOffsetX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
26765
+ pcbOffsetY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
26766
+ pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
26767
+ pcbPositionAnchor: zod.ZodOptional<zod.ZodString>;
26768
+ pcbPositionMode: zod.ZodOptional<zod.ZodEnum<["relative_to_group_anchor", "auto", "relative_to_board_anchor", "relative_to_component_anchor"]>>;
26769
+ layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
26770
+ name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
26771
+ }, "strip", zod.ZodTypeAny, {
26772
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
26773
+ }, {
26774
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
26775
+ }>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
26776
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
26777
+ }>>;
26778
+ pcbMarginTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
26779
+ pcbMarginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
26780
+ pcbMarginBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
26781
+ pcbMarginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
26782
+ pcbMarginX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
26783
+ pcbMarginY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
26784
+ pcbStyle: zod.ZodOptional<zod.ZodObject<{
26785
+ silkscreenFontSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
26786
+ viaPadDiameter: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
26787
+ viaHoleDiameter: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
26788
+ silkscreenTextPosition: zod.ZodOptional<zod.ZodUnion<[zod.ZodEnum<["centered", "outside", "none"]>, zod.ZodObject<{
26789
+ offsetX: zod.ZodNumber;
26790
+ offsetY: zod.ZodNumber;
26791
+ }, "strip", zod.ZodTypeAny, {
26792
+ offsetX: number;
26793
+ offsetY: number;
26794
+ }, {
26795
+ offsetX: number;
26796
+ offsetY: number;
26797
+ }>]>>;
26798
+ silkscreenTextVisibility: zod.ZodOptional<zod.ZodEnum<["hidden", "visible", "inherit"]>>;
26799
+ }, "strip", zod.ZodTypeAny, {
26800
+ silkscreenFontSize?: number | undefined;
26801
+ viaPadDiameter?: number | undefined;
26802
+ viaHoleDiameter?: number | undefined;
26803
+ silkscreenTextPosition?: "centered" | "outside" | "none" | {
26804
+ offsetX: number;
26805
+ offsetY: number;
26806
+ } | undefined;
26807
+ silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
26808
+ }, {
26809
+ silkscreenFontSize?: string | number | undefined;
26810
+ viaPadDiameter?: string | number | undefined;
26811
+ viaHoleDiameter?: string | number | undefined;
26812
+ silkscreenTextPosition?: "centered" | "outside" | "none" | {
26813
+ offsetX: number;
26814
+ offsetY: number;
26815
+ } | undefined;
26816
+ silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
26817
+ }>>;
26818
+ pcbRelative: zod.ZodOptional<zod.ZodBoolean>;
26819
+ relative: zod.ZodOptional<zod.ZodBoolean>;
26820
+ } & {
26821
+ text: zod.ZodString;
26822
+ anchorAlignment: zod.ZodDefault<zod.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
26823
+ font: zod.ZodOptional<zod.ZodEnum<["tscircuit2024"]>>;
26824
+ fontSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
26825
+ layers: zod.ZodOptional<zod.ZodArray<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
26826
+ name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
26827
+ }, "strip", zod.ZodTypeAny, {
26828
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
26829
+ }, {
26830
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
26831
+ }>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
26832
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
26833
+ }>, "many">>;
26834
+ knockout: zod.ZodOptional<zod.ZodBoolean>;
26835
+ mirrored: zod.ZodOptional<zod.ZodBoolean>;
26836
+ }, "strip", zod.ZodTypeAny, {
26837
+ anchorAlignment: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right";
26838
+ text: string;
26839
+ pcbX?: string | number | undefined;
26840
+ pcbY?: string | number | undefined;
26841
+ pcbLeftEdgeX?: string | number | undefined;
26842
+ pcbRightEdgeX?: string | number | undefined;
26843
+ pcbTopEdgeY?: string | number | undefined;
26844
+ pcbBottomEdgeY?: string | number | undefined;
26845
+ pcbOffsetX?: number | undefined;
26846
+ pcbOffsetY?: number | undefined;
26847
+ pcbRotation?: number | undefined;
26848
+ pcbPositionAnchor?: string | undefined;
26849
+ pcbPositionMode?: "relative_to_group_anchor" | "auto" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
26850
+ layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
26851
+ pcbMarginTop?: number | undefined;
26852
+ pcbMarginRight?: number | undefined;
26853
+ pcbMarginBottom?: number | undefined;
26854
+ pcbMarginLeft?: number | undefined;
26855
+ pcbMarginX?: number | undefined;
26856
+ pcbMarginY?: number | undefined;
26857
+ pcbStyle?: {
26858
+ silkscreenFontSize?: number | undefined;
26859
+ viaPadDiameter?: number | undefined;
26860
+ viaHoleDiameter?: number | undefined;
26861
+ silkscreenTextPosition?: "centered" | "outside" | "none" | {
26862
+ offsetX: number;
26863
+ offsetY: number;
26864
+ } | undefined;
26865
+ silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
26866
+ } | undefined;
26867
+ pcbRelative?: boolean | undefined;
26868
+ relative?: boolean | undefined;
26869
+ layers?: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[] | undefined;
26870
+ font?: "tscircuit2024" | undefined;
26871
+ fontSize?: number | undefined;
26872
+ knockout?: boolean | undefined;
26873
+ mirrored?: boolean | undefined;
26874
+ }, {
26875
+ text: string;
26876
+ pcbX?: string | number | undefined;
26877
+ pcbY?: string | number | undefined;
26878
+ pcbLeftEdgeX?: string | number | undefined;
26879
+ pcbRightEdgeX?: string | number | undefined;
26880
+ pcbTopEdgeY?: string | number | undefined;
26881
+ pcbBottomEdgeY?: string | number | undefined;
26882
+ pcbOffsetX?: string | number | undefined;
26883
+ pcbOffsetY?: string | number | undefined;
26884
+ pcbRotation?: string | number | undefined;
26885
+ pcbPositionAnchor?: string | undefined;
26886
+ pcbPositionMode?: "relative_to_group_anchor" | "auto" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
26887
+ layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
26888
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
26889
+ } | undefined;
26890
+ pcbMarginTop?: string | number | undefined;
26891
+ pcbMarginRight?: string | number | undefined;
26892
+ pcbMarginBottom?: string | number | undefined;
26893
+ pcbMarginLeft?: string | number | undefined;
26894
+ pcbMarginX?: string | number | undefined;
26895
+ pcbMarginY?: string | number | undefined;
26896
+ pcbStyle?: {
26897
+ silkscreenFontSize?: string | number | undefined;
26898
+ viaPadDiameter?: string | number | undefined;
26899
+ viaHoleDiameter?: string | number | undefined;
26900
+ silkscreenTextPosition?: "centered" | "outside" | "none" | {
26901
+ offsetX: number;
26902
+ offsetY: number;
26903
+ } | undefined;
26904
+ silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
26905
+ } | undefined;
26906
+ pcbRelative?: boolean | undefined;
26907
+ relative?: boolean | undefined;
26908
+ layers?: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
26909
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
26910
+ })[] | undefined;
26911
+ anchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
26912
+ font?: "tscircuit2024" | undefined;
26913
+ fontSize?: string | number | undefined;
26914
+ knockout?: boolean | undefined;
26915
+ mirrored?: boolean | undefined;
26916
+ }>;
26917
+ };
26918
+ doInitialPcbPrimitiveRender(): void;
26919
+ }
26920
+
26753
26921
  declare class Cutout extends PrimitiveComponent<typeof cutoutProps> {
26754
26922
  pcb_cutout_id: string | null;
26755
26923
  isPcbPrimitive: boolean;
@@ -43291,6 +43459,7 @@ interface TscircuitElements {
43291
43459
  name?: string;
43292
43460
  };
43293
43461
  silkscreentext: _tscircuit_props.SilkscreenTextProps;
43462
+ coppertext: _tscircuit_props.CopperTextProps;
43294
43463
  cutout: _tscircuit_props.CutoutProps;
43295
43464
  silkscreenpath: _tscircuit_props.SilkscreenPathProps;
43296
43465
  silkscreenline: _tscircuit_props.SilkscreenLineProps;
@@ -43337,4 +43506,4 @@ declare module "react/jsx-runtime" {
43337
43506
  }
43338
43507
  }
43339
43508
 
43340
- export { AnalogSimulation, type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingEndEvent, type AutoroutingErrorEvent, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Breakout, BreakoutPoint, CadAssembly, CadModel, Capacitor, Chip, Circuit, type ComponentWithPins, Constraint, CopperPour, Crystal, Cutout, type DebugLogOutputEvent, Diode, FabricationNoteDimension, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IRenderable, Inductor, Interconnect, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, Net, NetLabel, NormalComponent, type Obstacle, type PackingEndEvent, type PackingErrorEvent, type PackingStartEvent, Panel, PcbNoteDimension, PcbNoteLine, PcbNotePath, PcbNoteRect, PcbNoteText, PcbTrace, PinHeader, type PinLabelSpec, Pinout, PlatedHole, Port, Potentiometer, PowerSource, PrimitiveComponent, Project, PushButton, type RenderPhase, type RenderPhaseFn, type RenderPhaseFunctions, type RenderPhaseStates, Renderable, Resistor, Resonator, RootCircuit, type RootCircuitEventName, SOLVERS, SchematicArc, SchematicBox, SchematicCell, SchematicCircle, SchematicLine, SchematicRect, SchematicRow, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, SolderJumper, type SolverName, type SolverStartedEvent, Subcircuit, Switch, SymbolComponent as Symbol, TestPoint, Trace, TraceHint, Transistor, Via, VoltageProbe, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, resolveStaticFileImport, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
43509
+ export { AnalogSimulation, type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingEndEvent, type AutoroutingErrorEvent, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Breakout, BreakoutPoint, CadAssembly, CadModel, Capacitor, Chip, Circuit, type ComponentWithPins, Constraint, CopperPour, CopperText, Crystal, Cutout, type DebugLogOutputEvent, Diode, FabricationNoteDimension, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IRenderable, Inductor, Interconnect, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, Net, NetLabel, NormalComponent, type Obstacle, type PackingEndEvent, type PackingErrorEvent, type PackingStartEvent, Panel, PcbNoteDimension, PcbNoteLine, PcbNotePath, PcbNoteRect, PcbNoteText, PcbTrace, PinHeader, type PinLabelSpec, Pinout, PlatedHole, Port, Potentiometer, PowerSource, PrimitiveComponent, Project, PushButton, type RenderPhase, type RenderPhaseFn, type RenderPhaseFunctions, type RenderPhaseStates, Renderable, Resistor, Resonator, RootCircuit, type RootCircuitEventName, SOLVERS, SchematicArc, SchematicBox, SchematicCell, SchematicCircle, SchematicLine, SchematicRect, SchematicRow, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, SolderJumper, type SolverName, type SolverStartedEvent, Subcircuit, Switch, SymbolComponent as Symbol, TestPoint, Trace, TraceHint, Transistor, Via, VoltageProbe, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, resolveStaticFileImport, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
package/dist/index.js CHANGED
@@ -18,6 +18,7 @@ __export(components_exports, {
18
18
  Chip: () => Chip,
19
19
  Constraint: () => Constraint3,
20
20
  CopperPour: () => CopperPour,
21
+ CopperText: () => CopperText,
21
22
  Crystal: () => Crystal,
22
23
  Cutout: () => Cutout,
23
24
  Diode: () => Diode,
@@ -15992,8 +15993,20 @@ var generateCutoutsAndMousebitesForOutline = (outline, options) => {
15992
15993
  const vec_out_p2 = Flatten.vector(p2, Flatten.point(p_next_.x, p_next_.y));
15993
15994
  const p2_cross = segmentVec.cross(vec_out_p2);
15994
15995
  const is_p2_convex = is_ccw ? p2_cross > 1e-9 : p2_cross < -1e-9;
15995
- start_ext = is_p1_convex ? cutoutWidth : 0;
15996
- end_ext = is_p2_convex ? cutoutWidth : 0;
15996
+ if (is_p1_convex) {
15997
+ let angle = vec_in_p1.angleTo(segmentVec);
15998
+ if (angle > Math.PI) angle = 2 * Math.PI - angle;
15999
+ start_ext = cutoutWidth * Math.tan(angle / 2);
16000
+ } else {
16001
+ start_ext = 0;
16002
+ }
16003
+ if (is_p2_convex) {
16004
+ let angle = segmentVec.angleTo(vec_out_p2);
16005
+ if (angle > Math.PI) angle = 2 * Math.PI - angle;
16006
+ end_ext = cutoutWidth * Math.tan(angle / 2);
16007
+ } else {
16008
+ end_ext = 0;
16009
+ }
15997
16010
  }
15998
16011
  const cutoutParts = [
15999
16012
  { start: 0 - start_ext, end: gapStartDist },
@@ -18119,6 +18132,43 @@ var CopperPour = class extends PrimitiveComponent2 {
18119
18132
  }
18120
18133
  };
18121
18134
 
18135
+ // lib/components/primitive-components/CopperText.ts
18136
+ import { copperTextProps } from "@tscircuit/props";
18137
+ var CopperText = class extends PrimitiveComponent2 {
18138
+ isPcbPrimitive = true;
18139
+ get config() {
18140
+ return {
18141
+ componentName: "CopperText",
18142
+ zodProps: copperTextProps
18143
+ };
18144
+ }
18145
+ doInitialPcbPrimitiveRender() {
18146
+ if (this.root?.pcbDisabled) return;
18147
+ const { db } = this.root;
18148
+ const { _parsedProps: props } = this;
18149
+ const container = this.getPrimitiveContainer();
18150
+ const position = this._getGlobalPcbPositionBeforeLayout();
18151
+ const subcircuit = this.getSubcircuit();
18152
+ db.pcb_copper_text.insert({
18153
+ anchor_alignment: props.anchorAlignment,
18154
+ anchor_position: {
18155
+ x: position.x,
18156
+ y: position.y
18157
+ },
18158
+ font: "tscircuit2024",
18159
+ font_size: props.fontSize,
18160
+ layer: props.layer ?? "top",
18161
+ text: normalizeTextForCircuitJson(props.text),
18162
+ ccw_rotation: props.pcbRotation,
18163
+ is_mirrored: props.mirrored,
18164
+ is_knockout: props.knockout,
18165
+ pcb_component_id: container.pcb_component_id,
18166
+ subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
18167
+ pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
18168
+ });
18169
+ }
18170
+ };
18171
+
18122
18172
  // lib/components/normal-components/Battery.ts
18123
18173
  import { batteryProps } from "@tscircuit/props";
18124
18174
  var Battery = class extends NormalComponent3 {
@@ -19496,7 +19546,7 @@ import { identity as identity5 } from "transformation-matrix";
19496
19546
  var package_default = {
19497
19547
  name: "@tscircuit/core",
19498
19548
  type: "module",
19499
- version: "0.0.925",
19549
+ version: "0.0.927",
19500
19550
  types: "dist/index.d.ts",
19501
19551
  main: "dist/index.js",
19502
19552
  module: "dist/index.js",
@@ -19540,7 +19590,7 @@ var package_default = {
19540
19590
  "@tscircuit/math-utils": "^0.0.29",
19541
19591
  "@tscircuit/miniflex": "^0.0.4",
19542
19592
  "@tscircuit/ngspice-spice-engine": "^0.0.8",
19543
- "@tscircuit/props": "^0.0.427",
19593
+ "@tscircuit/props": "^0.0.428",
19544
19594
  "@tscircuit/schematic-autolayout": "^0.0.6",
19545
19595
  "@tscircuit/schematic-match-adapt": "^0.0.16",
19546
19596
  "@tscircuit/schematic-trace-solver": "^v0.0.45",
@@ -19560,7 +19610,7 @@ var package_default = {
19560
19610
  "circuit-json-to-gltf": "^0.0.31",
19561
19611
  "circuit-json-to-simple-3d": "^0.0.9",
19562
19612
  "circuit-json-to-spice": "^0.0.30",
19563
- "circuit-to-svg": "^0.0.294",
19613
+ "circuit-to-svg": "^0.0.296",
19564
19614
  concurrently: "^9.1.2",
19565
19615
  "connectivity-map": "^1.0.0",
19566
19616
  debug: "^4.3.6",
@@ -20059,6 +20109,7 @@ export {
20059
20109
  Circuit,
20060
20110
  Constraint3 as Constraint,
20061
20111
  CopperPour,
20112
+ CopperText,
20062
20113
  Crystal,
20063
20114
  Cutout,
20064
20115
  Diode,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.926",
4
+ "version": "0.0.928",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -45,7 +45,7 @@
45
45
  "@tscircuit/math-utils": "^0.0.29",
46
46
  "@tscircuit/miniflex": "^0.0.4",
47
47
  "@tscircuit/ngspice-spice-engine": "^0.0.8",
48
- "@tscircuit/props": "^0.0.427",
48
+ "@tscircuit/props": "^0.0.428",
49
49
  "@tscircuit/schematic-autolayout": "^0.0.6",
50
50
  "@tscircuit/schematic-match-adapt": "^0.0.16",
51
51
  "@tscircuit/schematic-trace-solver": "^v0.0.45",
@@ -59,13 +59,13 @@
59
59
  "bun-match-svg": "0.0.12",
60
60
  "calculate-elbow": "^0.0.12",
61
61
  "chokidar-cli": "^3.0.0",
62
- "circuit-json": "^0.0.333",
62
+ "circuit-json": "^0.0.335",
63
63
  "circuit-json-to-bpc": "^0.0.13",
64
64
  "circuit-json-to-connectivity-map": "^0.0.23",
65
65
  "circuit-json-to-gltf": "^0.0.31",
66
66
  "circuit-json-to-simple-3d": "^0.0.9",
67
67
  "circuit-json-to-spice": "^0.0.30",
68
- "circuit-to-svg": "^0.0.294",
68
+ "circuit-to-svg": "^0.0.296",
69
69
  "concurrently": "^9.1.2",
70
70
  "connectivity-map": "^1.0.0",
71
71
  "debug": "^4.3.6",