@tscircuit/core 0.0.723 → 0.0.724
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 +3 -1
- package/dist/index.js +116 -27
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { CircuitJsonUtilObjects } from '@tscircuit/circuit-json-util';
|
|
|
13
13
|
import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
|
|
14
14
|
import { GraphicsObject } from 'graphics-debug';
|
|
15
15
|
|
|
16
|
-
declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "SourceNameDuplicateComponentRemoval", "PcbFootprintStringRender", "InitializePortsFromChildren", "CreateNetsFromProps", "AssignFallbackProps", "CreateTracesFromProps", "CreateTracesFromNetLabels", "CreateTraceHintsFromProps", "SourceGroupRender", "AssignNameToUnnamedComponents", "SourceRender", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SourceDesignRuleChecks", "SimulationRender", "SchematicComponentRender", "SchematicPortRender", "SchematicPrimitiveRender", "SchematicLayout", "SchematicTraceRender", "SchematicReplaceNetLabelsWithSymbols", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbComponentSizeCalculation", "PcbLayout", "PcbBoardAutoSize", "PcbTraceHintRender", "PcbManualTraceRender", "PcbTraceRender", "PcbRouteNetIslands", "PcbDesignRuleChecks", "SilkscreenOverlapAdjustment", "CadModelRender", "PartsEngineRender"];
|
|
16
|
+
declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "SourceNameDuplicateComponentRemoval", "PcbFootprintStringRender", "InitializePortsFromChildren", "CreateNetsFromProps", "AssignFallbackProps", "CreateTracesFromProps", "CreateTracesFromNetLabels", "CreateTraceHintsFromProps", "SourceGroupRender", "AssignNameToUnnamedComponents", "SourceRender", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SourceDesignRuleChecks", "SimulationRender", "SchematicComponentRender", "SchematicPortRender", "SchematicPrimitiveRender", "SchematicLayout", "SchematicTraceRender", "SchematicReplaceNetLabelsWithSymbols", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbComponentSizeCalculation", "PcbComponentAnchorAlignment", "PcbLayout", "PcbBoardAutoSize", "PcbTraceHintRender", "PcbManualTraceRender", "PcbTraceRender", "PcbRouteNetIslands", "PcbDesignRuleChecks", "SilkscreenOverlapAdjustment", "CadModelRender", "PartsEngineRender"];
|
|
17
17
|
type RenderPhase = (typeof orderedRenderPhases)[number];
|
|
18
18
|
type RenderPhaseFn<K extends RenderPhase = RenderPhase> = `doInitial${K}` | `update${K}` | `remove${K}`;
|
|
19
19
|
type RenderPhaseStates = Record<RenderPhase, {
|
|
@@ -1094,6 +1094,8 @@ declare class NormalComponent<ZodProps extends z.ZodType = any, PortNames extend
|
|
|
1094
1094
|
*/
|
|
1095
1095
|
doInitialPcbComponentSizeCalculation(): void;
|
|
1096
1096
|
updatePcbComponentSizeCalculation(): void;
|
|
1097
|
+
doInitialPcbComponentAnchorAlignment(): void;
|
|
1098
|
+
updatePcbComponentAnchorAlignment(): void;
|
|
1097
1099
|
_renderReactSubtree(element: ReactElement): ReactSubtree;
|
|
1098
1100
|
doInitialInitializePortsFromChildren(): void;
|
|
1099
1101
|
doInitialReactSubtreesRender(): void;
|
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ __export(components_exports, {
|
|
|
32
32
|
Mosfet: () => Mosfet,
|
|
33
33
|
Net: () => Net,
|
|
34
34
|
NetLabel: () => NetLabel,
|
|
35
|
-
NormalComponent: () =>
|
|
35
|
+
NormalComponent: () => NormalComponent3,
|
|
36
36
|
PcbTrace: () => PcbTrace,
|
|
37
37
|
PinHeader: () => PinHeader,
|
|
38
38
|
Pinout: () => Pinout,
|
|
@@ -117,6 +117,7 @@ var orderedRenderPhases = [
|
|
|
117
117
|
"PcbPortRender",
|
|
118
118
|
"PcbPortAttachment",
|
|
119
119
|
"PcbComponentSizeCalculation",
|
|
120
|
+
"PcbComponentAnchorAlignment",
|
|
120
121
|
"PcbLayout",
|
|
121
122
|
"PcbBoardAutoSize",
|
|
122
123
|
"PcbTraceHintRender",
|
|
@@ -140,7 +141,8 @@ var asyncPhaseDependencies = {
|
|
|
140
141
|
PcbDesignRuleChecks: ["PcbFootprintStringRender"],
|
|
141
142
|
SilkscreenOverlapAdjustment: ["PcbFootprintStringRender"],
|
|
142
143
|
CadModelRender: ["PcbFootprintStringRender"],
|
|
143
|
-
PartsEngineRender: ["PcbFootprintStringRender"]
|
|
144
|
+
PartsEngineRender: ["PcbFootprintStringRender"],
|
|
145
|
+
PcbComponentAnchorAlignment: ["PcbFootprintStringRender"]
|
|
144
146
|
};
|
|
145
147
|
var globalRenderCounter = 0;
|
|
146
148
|
var Renderable = class {
|
|
@@ -6830,6 +6832,87 @@ function NormalComponent_doInitialPcbFootprintStringRender(component, queueAsync
|
|
|
6830
6832
|
}
|
|
6831
6833
|
}
|
|
6832
6834
|
|
|
6835
|
+
// lib/components/base-components/NormalComponent/NormalComponent_doInitialPcbComponentAnchorAlignment.ts
|
|
6836
|
+
function NormalComponent_doInitialPcbComponentAnchorAlignment(component) {
|
|
6837
|
+
if (component.root?.pcbDisabled) return;
|
|
6838
|
+
if (!component.pcb_component_id) return;
|
|
6839
|
+
const { pcbX, pcbY } = component._parsedProps;
|
|
6840
|
+
const pcbPositionAnchor = component.props?.pcbPositionAnchor;
|
|
6841
|
+
if (!pcbPositionAnchor) return;
|
|
6842
|
+
if (pcbX === void 0 && pcbY === void 0) return;
|
|
6843
|
+
const bounds = getBoundsOfPcbComponents(component.children);
|
|
6844
|
+
if (bounds.width === 0 || bounds.height === 0) return;
|
|
6845
|
+
const center = {
|
|
6846
|
+
x: (bounds.minX + bounds.maxX) / 2,
|
|
6847
|
+
y: (bounds.minY + bounds.maxY) / 2
|
|
6848
|
+
};
|
|
6849
|
+
const currentCenter = { ...center };
|
|
6850
|
+
let anchorPos = null;
|
|
6851
|
+
const ninePointAnchors = /* @__PURE__ */ new Set([
|
|
6852
|
+
"center",
|
|
6853
|
+
"top_left",
|
|
6854
|
+
"top_center",
|
|
6855
|
+
"top_right",
|
|
6856
|
+
"center_left",
|
|
6857
|
+
"center_right",
|
|
6858
|
+
"bottom_left",
|
|
6859
|
+
"bottom_center",
|
|
6860
|
+
"bottom_right"
|
|
6861
|
+
]);
|
|
6862
|
+
if (ninePointAnchors.has(pcbPositionAnchor)) {
|
|
6863
|
+
const b = {
|
|
6864
|
+
left: bounds.minX,
|
|
6865
|
+
right: bounds.maxX,
|
|
6866
|
+
top: bounds.minY,
|
|
6867
|
+
bottom: bounds.maxY
|
|
6868
|
+
};
|
|
6869
|
+
switch (pcbPositionAnchor) {
|
|
6870
|
+
case "center":
|
|
6871
|
+
anchorPos = currentCenter;
|
|
6872
|
+
break;
|
|
6873
|
+
case "top_left":
|
|
6874
|
+
anchorPos = { x: b.left, y: b.top };
|
|
6875
|
+
break;
|
|
6876
|
+
case "top_center":
|
|
6877
|
+
anchorPos = { x: currentCenter.x, y: b.top };
|
|
6878
|
+
break;
|
|
6879
|
+
case "top_right":
|
|
6880
|
+
anchorPos = { x: b.right, y: b.top };
|
|
6881
|
+
break;
|
|
6882
|
+
case "center_left":
|
|
6883
|
+
anchorPos = { x: b.left, y: currentCenter.y };
|
|
6884
|
+
break;
|
|
6885
|
+
case "center_right":
|
|
6886
|
+
anchorPos = { x: b.right, y: currentCenter.y };
|
|
6887
|
+
break;
|
|
6888
|
+
case "bottom_left":
|
|
6889
|
+
anchorPos = { x: b.left, y: b.bottom };
|
|
6890
|
+
break;
|
|
6891
|
+
case "bottom_center":
|
|
6892
|
+
anchorPos = { x: currentCenter.x, y: b.bottom };
|
|
6893
|
+
break;
|
|
6894
|
+
case "bottom_right":
|
|
6895
|
+
anchorPos = { x: b.right, y: b.bottom };
|
|
6896
|
+
break;
|
|
6897
|
+
}
|
|
6898
|
+
} else {
|
|
6899
|
+
try {
|
|
6900
|
+
const port = component.portMap[pcbPositionAnchor];
|
|
6901
|
+
if (port) {
|
|
6902
|
+
anchorPos = port._getGlobalPcbPositionBeforeLayout();
|
|
6903
|
+
}
|
|
6904
|
+
} catch {
|
|
6905
|
+
}
|
|
6906
|
+
}
|
|
6907
|
+
if (!anchorPos) return;
|
|
6908
|
+
const newCenter = { ...currentCenter };
|
|
6909
|
+
if (pcbX !== void 0) newCenter.x += pcbX - anchorPos.x;
|
|
6910
|
+
if (pcbY !== void 0) newCenter.y += pcbY - anchorPos.y;
|
|
6911
|
+
if (Math.abs(newCenter.x - currentCenter.x) > 1e-6 || Math.abs(newCenter.y - currentCenter.y) > 1e-6) {
|
|
6912
|
+
component._repositionOnPcb(newCenter);
|
|
6913
|
+
}
|
|
6914
|
+
}
|
|
6915
|
+
|
|
6833
6916
|
// lib/components/base-components/NormalComponent/NormalComponent.ts
|
|
6834
6917
|
var debug3 = Debug4("tscircuit:core");
|
|
6835
6918
|
var rotation32 = z9.object({
|
|
@@ -6837,7 +6920,7 @@ var rotation32 = z9.object({
|
|
|
6837
6920
|
y: rotation2,
|
|
6838
6921
|
z: rotation2
|
|
6839
6922
|
});
|
|
6840
|
-
var
|
|
6923
|
+
var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
6841
6924
|
reactSubtrees = [];
|
|
6842
6925
|
_impliedFootprint;
|
|
6843
6926
|
isPrimitiveContainer = true;
|
|
@@ -7363,6 +7446,12 @@ var NormalComponent2 = class extends PrimitiveComponent2 {
|
|
|
7363
7446
|
updatePcbComponentSizeCalculation() {
|
|
7364
7447
|
this.doInitialPcbComponentSizeCalculation();
|
|
7365
7448
|
}
|
|
7449
|
+
doInitialPcbComponentAnchorAlignment() {
|
|
7450
|
+
NormalComponent_doInitialPcbComponentAnchorAlignment(this);
|
|
7451
|
+
}
|
|
7452
|
+
updatePcbComponentAnchorAlignment() {
|
|
7453
|
+
this.doInitialPcbComponentAnchorAlignment();
|
|
7454
|
+
}
|
|
7366
7455
|
_renderReactSubtree(element) {
|
|
7367
7456
|
const component = createInstanceFromReactElement(element);
|
|
7368
7457
|
return {
|
|
@@ -11365,7 +11454,7 @@ var Group_doInitialSchematicTraceRender = (group) => {
|
|
|
11365
11454
|
};
|
|
11366
11455
|
|
|
11367
11456
|
// lib/components/primitive-components/Group/Group.ts
|
|
11368
|
-
var Group6 = class extends
|
|
11457
|
+
var Group6 = class extends NormalComponent3 {
|
|
11369
11458
|
pcb_group_id = null;
|
|
11370
11459
|
schematic_group_id = null;
|
|
11371
11460
|
subcircuit_id = null;
|
|
@@ -12413,7 +12502,7 @@ var FTYPE = stringProxy;
|
|
|
12413
12502
|
|
|
12414
12503
|
// lib/components/normal-components/Capacitor.ts
|
|
12415
12504
|
import { formatSiUnit } from "format-si-unit";
|
|
12416
|
-
var Capacitor = class extends
|
|
12505
|
+
var Capacitor = class extends NormalComponent3 {
|
|
12417
12506
|
_adjustSilkscreenTextAutomatically = true;
|
|
12418
12507
|
// @ts-ignore (cause the symbolName is string and not fixed)
|
|
12419
12508
|
get config() {
|
|
@@ -12489,7 +12578,7 @@ var Capacitor = class extends NormalComponent2 {
|
|
|
12489
12578
|
|
|
12490
12579
|
// lib/components/normal-components/Chip.ts
|
|
12491
12580
|
import { chipProps as chipProps2 } from "@tscircuit/props";
|
|
12492
|
-
var Chip = class extends
|
|
12581
|
+
var Chip = class extends NormalComponent3 {
|
|
12493
12582
|
schematicBoxDimensions = null;
|
|
12494
12583
|
constructor(props) {
|
|
12495
12584
|
super(props);
|
|
@@ -12661,7 +12750,7 @@ var Pinout = class extends Chip {
|
|
|
12661
12750
|
|
|
12662
12751
|
// lib/components/normal-components/Diode.ts
|
|
12663
12752
|
import { diodeProps } from "@tscircuit/props";
|
|
12664
|
-
var Diode = class extends
|
|
12753
|
+
var Diode = class extends NormalComponent3 {
|
|
12665
12754
|
// @ts-ignore
|
|
12666
12755
|
get config() {
|
|
12667
12756
|
const symbolMap = {
|
|
@@ -12708,7 +12797,7 @@ var Diode = class extends NormalComponent2 {
|
|
|
12708
12797
|
// lib/components/normal-components/Fuse.ts
|
|
12709
12798
|
import { fuseProps } from "@tscircuit/props";
|
|
12710
12799
|
import { formatSiUnit as formatSiUnit2 } from "format-si-unit";
|
|
12711
|
-
var Fuse = class extends
|
|
12800
|
+
var Fuse = class extends NormalComponent3 {
|
|
12712
12801
|
get config() {
|
|
12713
12802
|
return {
|
|
12714
12803
|
componentName: "fuse",
|
|
@@ -12743,7 +12832,7 @@ var Fuse = class extends NormalComponent2 {
|
|
|
12743
12832
|
|
|
12744
12833
|
// lib/components/normal-components/Jumper.ts
|
|
12745
12834
|
import { jumperProps } from "@tscircuit/props";
|
|
12746
|
-
var Jumper = class extends
|
|
12835
|
+
var Jumper = class extends NormalComponent3 {
|
|
12747
12836
|
schematicDimensions = null;
|
|
12748
12837
|
get config() {
|
|
12749
12838
|
return {
|
|
@@ -12842,7 +12931,7 @@ var Jumper = class extends NormalComponent2 {
|
|
|
12842
12931
|
|
|
12843
12932
|
// lib/components/normal-components/SolderJumper.ts
|
|
12844
12933
|
import { solderjumperProps } from "@tscircuit/props";
|
|
12845
|
-
var SolderJumper = class extends
|
|
12934
|
+
var SolderJumper = class extends NormalComponent3 {
|
|
12846
12935
|
schematicDimensions = null;
|
|
12847
12936
|
_getPinNumberFromBridgedPinName(pinName) {
|
|
12848
12937
|
const port = this.selectOne(`port.${pinName}`, {
|
|
@@ -12996,7 +13085,7 @@ var SolderJumper = class extends NormalComponent2 {
|
|
|
12996
13085
|
|
|
12997
13086
|
// lib/components/normal-components/Led.ts
|
|
12998
13087
|
import { ledProps } from "@tscircuit/props";
|
|
12999
|
-
var Led = class extends
|
|
13088
|
+
var Led = class extends NormalComponent3 {
|
|
13000
13089
|
get config() {
|
|
13001
13090
|
const symbolMap = {
|
|
13002
13091
|
laser: "laser_diode"
|
|
@@ -13044,7 +13133,7 @@ var Led = class extends NormalComponent2 {
|
|
|
13044
13133
|
|
|
13045
13134
|
// lib/components/normal-components/PowerSource.ts
|
|
13046
13135
|
import { powerSourceProps } from "@tscircuit/props";
|
|
13047
|
-
var PowerSource = class extends
|
|
13136
|
+
var PowerSource = class extends NormalComponent3 {
|
|
13048
13137
|
// @ts-ignore
|
|
13049
13138
|
get config() {
|
|
13050
13139
|
return {
|
|
@@ -13095,7 +13184,7 @@ var voltageSourceProps = commonComponentProps.extend({
|
|
|
13095
13184
|
phase: rotation4.optional(),
|
|
13096
13185
|
dutyCycle: z13.number().optional()
|
|
13097
13186
|
});
|
|
13098
|
-
var VoltageSource = class extends
|
|
13187
|
+
var VoltageSource = class extends NormalComponent3 {
|
|
13099
13188
|
get config() {
|
|
13100
13189
|
const isSquare = this.props.waveShape === "square";
|
|
13101
13190
|
return {
|
|
@@ -13166,7 +13255,7 @@ var VoltageSource = class extends NormalComponent2 {
|
|
|
13166
13255
|
// lib/components/normal-components/Resistor.ts
|
|
13167
13256
|
import { resistorProps } from "@tscircuit/props";
|
|
13168
13257
|
import { formatSiUnit as formatSiUnit3 } from "format-si-unit";
|
|
13169
|
-
var Resistor = class extends
|
|
13258
|
+
var Resistor = class extends NormalComponent3 {
|
|
13170
13259
|
_adjustSilkscreenTextAutomatically = true;
|
|
13171
13260
|
get config() {
|
|
13172
13261
|
return {
|
|
@@ -13960,7 +14049,7 @@ var Via = class extends PrimitiveComponent2 {
|
|
|
13960
14049
|
|
|
13961
14050
|
// lib/components/normal-components/Battery.ts
|
|
13962
14051
|
import { batteryProps } from "@tscircuit/props";
|
|
13963
|
-
var Battery = class extends
|
|
14052
|
+
var Battery = class extends NormalComponent3 {
|
|
13964
14053
|
get config() {
|
|
13965
14054
|
return {
|
|
13966
14055
|
componentName: "Battery",
|
|
@@ -13993,7 +14082,7 @@ var Battery = class extends NormalComponent2 {
|
|
|
13993
14082
|
|
|
13994
14083
|
// lib/components/normal-components/PinHeader.ts
|
|
13995
14084
|
import { pinHeaderProps } from "@tscircuit/props";
|
|
13996
|
-
var PinHeader = class extends
|
|
14085
|
+
var PinHeader = class extends NormalComponent3 {
|
|
13997
14086
|
_getPcbRotationBeforeLayout() {
|
|
13998
14087
|
const orientationRotation = this.props.pcbOrientation === "vertical" ? -90 : 0;
|
|
13999
14088
|
const baseRotation = super._getPcbRotationBeforeLayout() ?? 0;
|
|
@@ -14107,7 +14196,7 @@ function getResonatorSymbolName(variant) {
|
|
|
14107
14196
|
return "crystal";
|
|
14108
14197
|
}
|
|
14109
14198
|
}
|
|
14110
|
-
var Resonator = class extends
|
|
14199
|
+
var Resonator = class extends NormalComponent3 {
|
|
14111
14200
|
get config() {
|
|
14112
14201
|
return {
|
|
14113
14202
|
componentName: "Resonator",
|
|
@@ -14143,7 +14232,7 @@ var Resonator = class extends NormalComponent2 {
|
|
|
14143
14232
|
// lib/components/normal-components/Inductor.ts
|
|
14144
14233
|
import { inductorProps } from "@tscircuit/props";
|
|
14145
14234
|
import { formatSiUnit as formatSiUnit5 } from "format-si-unit";
|
|
14146
|
-
var Inductor = class extends
|
|
14235
|
+
var Inductor = class extends NormalComponent3 {
|
|
14147
14236
|
_adjustSilkscreenTextAutomatically = true;
|
|
14148
14237
|
get config() {
|
|
14149
14238
|
return {
|
|
@@ -14191,7 +14280,7 @@ function getPotentiometerSymbolName(variant) {
|
|
|
14191
14280
|
return "potentiometer2";
|
|
14192
14281
|
}
|
|
14193
14282
|
}
|
|
14194
|
-
var Potentiometer = class extends
|
|
14283
|
+
var Potentiometer = class extends NormalComponent3 {
|
|
14195
14284
|
get config() {
|
|
14196
14285
|
return {
|
|
14197
14286
|
componentName: "Potentiometer",
|
|
@@ -14221,7 +14310,7 @@ var Potentiometer = class extends NormalComponent2 {
|
|
|
14221
14310
|
// lib/components/normal-components/PushButton.ts
|
|
14222
14311
|
import { pushButtonProps } from "@tscircuit/props";
|
|
14223
14312
|
import { symbols as symbols3 } from "schematic-symbols";
|
|
14224
|
-
var PushButton = class extends
|
|
14313
|
+
var PushButton = class extends NormalComponent3 {
|
|
14225
14314
|
get config() {
|
|
14226
14315
|
return {
|
|
14227
14316
|
componentName: "PushButton",
|
|
@@ -14286,7 +14375,7 @@ var PushButton = class extends NormalComponent2 {
|
|
|
14286
14375
|
// lib/components/normal-components/Crystal.ts
|
|
14287
14376
|
import { crystalProps } from "@tscircuit/props";
|
|
14288
14377
|
import { formatSiUnit as formatSiUnit7 } from "format-si-unit";
|
|
14289
|
-
var Crystal = class extends
|
|
14378
|
+
var Crystal = class extends NormalComponent3 {
|
|
14290
14379
|
// @ts-ignore
|
|
14291
14380
|
get config() {
|
|
14292
14381
|
const symbolName = this.props.symbolName ?? (this.props.pinVariant === "four_pin" ? "crystal_4pin" : "crystal");
|
|
@@ -14337,7 +14426,7 @@ var Crystal = class extends NormalComponent2 {
|
|
|
14337
14426
|
|
|
14338
14427
|
// lib/components/normal-components/Transistor.ts
|
|
14339
14428
|
import { transistorProps } from "@tscircuit/props";
|
|
14340
|
-
var Transistor = class extends
|
|
14429
|
+
var Transistor = class extends NormalComponent3 {
|
|
14341
14430
|
get config() {
|
|
14342
14431
|
const baseSymbolName = this.props.type === "npn" ? "npn_bipolar_transistor" : "pnp_bipolar_transistor";
|
|
14343
14432
|
return {
|
|
@@ -14382,7 +14471,7 @@ var Transistor = class extends NormalComponent2 {
|
|
|
14382
14471
|
|
|
14383
14472
|
// lib/components/normal-components/Mosfet.ts
|
|
14384
14473
|
import { mosfetProps } from "@tscircuit/props";
|
|
14385
|
-
var Mosfet = class extends
|
|
14474
|
+
var Mosfet = class extends NormalComponent3 {
|
|
14386
14475
|
get config() {
|
|
14387
14476
|
const mosfetMode = this.props.mosfetMode === "depletion" ? "d" : "e";
|
|
14388
14477
|
const channelType = this.props.channelType;
|
|
@@ -14409,7 +14498,7 @@ var Mosfet = class extends NormalComponent2 {
|
|
|
14409
14498
|
|
|
14410
14499
|
// lib/components/normal-components/Switch.ts
|
|
14411
14500
|
import { switchProps } from "@tscircuit/props";
|
|
14412
|
-
var Switch = class extends
|
|
14501
|
+
var Switch = class extends NormalComponent3 {
|
|
14413
14502
|
_getSwitchType() {
|
|
14414
14503
|
const { spst, spdt, dpst, dpdt, type } = this._parsedProps ?? {};
|
|
14415
14504
|
if (dpdt) return "dpdt";
|
|
@@ -14456,7 +14545,7 @@ var TESTPOINT_DEFAULTS = {
|
|
|
14456
14545
|
SMT_CIRCLE_DIAMETER: 1.2,
|
|
14457
14546
|
SMT_RECT_SIZE: 2
|
|
14458
14547
|
};
|
|
14459
|
-
var TestPoint = class extends
|
|
14548
|
+
var TestPoint = class extends NormalComponent3 {
|
|
14460
14549
|
get config() {
|
|
14461
14550
|
return {
|
|
14462
14551
|
componentName: "TestPoint",
|
|
@@ -14937,7 +15026,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
14937
15026
|
var package_default = {
|
|
14938
15027
|
name: "@tscircuit/core",
|
|
14939
15028
|
type: "module",
|
|
14940
|
-
version: "0.0.
|
|
15029
|
+
version: "0.0.723",
|
|
14941
15030
|
types: "dist/index.d.ts",
|
|
14942
15031
|
main: "dist/index.js",
|
|
14943
15032
|
module: "dist/index.js",
|
|
@@ -15466,7 +15555,7 @@ export {
|
|
|
15466
15555
|
Mosfet,
|
|
15467
15556
|
Net,
|
|
15468
15557
|
NetLabel,
|
|
15469
|
-
|
|
15558
|
+
NormalComponent3 as NormalComponent,
|
|
15470
15559
|
PcbTrace,
|
|
15471
15560
|
PinHeader,
|
|
15472
15561
|
Pinout,
|