@tscircuit/core 0.0.970 → 0.0.971

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, currentSourceProps, 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, fiducialProps, traceHintProps, viaProps, copperPourProps, copperTextProps, cutoutProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, transistorProps, mosfetProps, opampProps, OpAmpPinLabels, 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, currentSourceProps, 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, fiducialProps, traceHintProps, viaProps, copperPourProps, copperTextProps, cutoutProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, transistorProps, mosfetProps, opampProps, OpAmpPinLabels, switchProps, SwitchProps, testpointProps, schematicTextProps, schematicLineProps, schematicRectProps, schematicArcProps, schematicCircleProps, schematicPathProps, 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';
@@ -45048,6 +45048,42 @@ declare class SchematicCircle extends PrimitiveComponent<typeof schematicCircleP
45048
45048
  doInitialSchematicPrimitiveRender(): void;
45049
45049
  }
45050
45050
 
45051
+ declare class SchematicPath extends PrimitiveComponent<typeof schematicPathProps> {
45052
+ isSchematicPrimitive: boolean;
45053
+ get config(): {
45054
+ componentName: string;
45055
+ zodProps: zod.ZodObject<{
45056
+ points: zod.ZodArray<zod.ZodObject<{
45057
+ x: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
45058
+ y: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
45059
+ }, "strip", zod.ZodTypeAny, {
45060
+ x: number;
45061
+ y: number;
45062
+ }, {
45063
+ x: string | number;
45064
+ y: string | number;
45065
+ }>, "many">;
45066
+ isFilled: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
45067
+ fillColor: zod.ZodOptional<zod.ZodEnum<["red", "blue"]>>;
45068
+ }, "strip", zod.ZodTypeAny, {
45069
+ points: {
45070
+ x: number;
45071
+ y: number;
45072
+ }[];
45073
+ isFilled: boolean;
45074
+ fillColor?: "red" | "blue" | undefined;
45075
+ }, {
45076
+ points: {
45077
+ x: string | number;
45078
+ y: string | number;
45079
+ }[];
45080
+ isFilled?: boolean | undefined;
45081
+ fillColor?: "red" | "blue" | undefined;
45082
+ }>;
45083
+ };
45084
+ doInitialSchematicPrimitiveRender(): void;
45085
+ }
45086
+
45051
45087
  declare class SchematicBox extends PrimitiveComponent<typeof schematicBoxProps> {
45052
45088
  isSchematicPrimitive: boolean;
45053
45089
  get config(): {
@@ -47161,4 +47197,4 @@ declare module "react/jsx-runtime" {
47161
47197
  }
47162
47198
  }
47163
47199
 
47164
- 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, CurrentSource, Cutout, type DebugLogOutputEvent, Diode, FabricationNoteDimension, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Fiducial, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IRenderable, Inductor, Interconnect, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, Net, NetLabel, NormalComponent, type Obstacle, OpAmp, 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 };
47200
+ 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, CurrentSource, Cutout, type DebugLogOutputEvent, Diode, FabricationNoteDimension, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Fiducial, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IRenderable, Inductor, Interconnect, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, Net, NetLabel, NormalComponent, type Obstacle, OpAmp, 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, SchematicPath, 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
@@ -65,6 +65,7 @@ __export(components_exports, {
65
65
  SchematicCell: () => SchematicCell,
66
66
  SchematicCircle: () => SchematicCircle,
67
67
  SchematicLine: () => SchematicLine,
68
+ SchematicPath: () => SchematicPath,
68
69
  SchematicRect: () => SchematicRect,
69
70
  SchematicRow: () => SchematicRow,
70
71
  SchematicTable: () => SchematicTable,
@@ -20139,6 +20140,35 @@ var SchematicCircle = class extends PrimitiveComponent2 {
20139
20140
  }
20140
20141
  };
20141
20142
 
20143
+ // lib/components/primitive-components/SchematicPath.ts
20144
+ import { schematicPathProps } from "@tscircuit/props";
20145
+ var SchematicPath = class extends PrimitiveComponent2 {
20146
+ isSchematicPrimitive = true;
20147
+ get config() {
20148
+ return {
20149
+ componentName: "SchematicPath",
20150
+ zodProps: schematicPathProps
20151
+ };
20152
+ }
20153
+ doInitialSchematicPrimitiveRender() {
20154
+ if (this.root?.schematicDisabled) return;
20155
+ const { db } = this.root;
20156
+ const { _parsedProps: props } = this;
20157
+ const globalPos = this._getGlobalSchematicPositionBeforeLayout();
20158
+ const schematic_component_id = this.getPrimitiveContainer()?.parent?.schematic_component_id;
20159
+ db.schematic_path.insert({
20160
+ schematic_component_id,
20161
+ points: props.points.map((point2) => ({
20162
+ x: point2.x + globalPos.x,
20163
+ y: point2.y + globalPos.y
20164
+ })),
20165
+ is_filled: props.isFilled,
20166
+ fill_color: props.fillColor,
20167
+ subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0
20168
+ });
20169
+ }
20170
+ };
20171
+
20142
20172
  // lib/components/primitive-components/SchematicBox.ts
20143
20173
  import { schematicBoxProps } from "@tscircuit/props";
20144
20174
 
@@ -20805,7 +20835,7 @@ import { identity as identity5 } from "transformation-matrix";
20805
20835
  var package_default = {
20806
20836
  name: "@tscircuit/core",
20807
20837
  type: "module",
20808
- version: "0.0.969",
20838
+ version: "0.0.970",
20809
20839
  types: "dist/index.d.ts",
20810
20840
  main: "dist/index.js",
20811
20841
  module: "dist/index.js",
@@ -20867,7 +20897,7 @@ var package_default = {
20867
20897
  "circuit-json-to-gltf": "^0.0.31",
20868
20898
  "circuit-json-to-simple-3d": "^0.0.9",
20869
20899
  "circuit-json-to-spice": "^0.0.33",
20870
- "circuit-to-svg": "^0.0.313",
20900
+ "circuit-to-svg": "^0.0.314",
20871
20901
  concurrently: "^9.1.2",
20872
20902
  "connectivity-map": "^1.0.0",
20873
20903
  debug: "^4.3.6",
@@ -21404,6 +21434,7 @@ export {
21404
21434
  SchematicCell,
21405
21435
  SchematicCircle,
21406
21436
  SchematicLine,
21437
+ SchematicPath,
21407
21438
  SchematicRect,
21408
21439
  SchematicRow,
21409
21440
  SchematicTable,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.970",
4
+ "version": "0.0.971",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -63,7 +63,7 @@
63
63
  "circuit-json-to-gltf": "^0.0.31",
64
64
  "circuit-json-to-simple-3d": "^0.0.9",
65
65
  "circuit-json-to-spice": "^0.0.33",
66
- "circuit-to-svg": "^0.0.313",
66
+ "circuit-to-svg": "^0.0.314",
67
67
  "concurrently": "^9.1.2",
68
68
  "connectivity-map": "^1.0.0",
69
69
  "debug": "^4.3.6",