@tscircuit/core 0.0.1335 → 0.0.1337
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.js +260 -27
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -981,10 +981,15 @@ var transformFootprintInsertionDirection = (params) => {
|
|
|
981
981
|
function convertPcbStyleToPcbSx(pcbStyle) {
|
|
982
982
|
if (!pcbStyle) return void 0;
|
|
983
983
|
const sx = {};
|
|
984
|
+
const silkscreenTextSx = {};
|
|
984
985
|
if (pcbStyle.silkscreenFontSize !== void 0) {
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
986
|
+
silkscreenTextSx.fontSize = pcbStyle.silkscreenFontSize;
|
|
987
|
+
}
|
|
988
|
+
if (pcbStyle.silkscreenTextVisibility !== void 0) {
|
|
989
|
+
silkscreenTextSx.visibility = pcbStyle.silkscreenTextVisibility;
|
|
990
|
+
}
|
|
991
|
+
if (Object.keys(silkscreenTextSx).length > 0) {
|
|
992
|
+
sx["& silkscreentext"] = silkscreenTextSx;
|
|
988
993
|
}
|
|
989
994
|
if (Object.keys(sx).length === 0) return void 0;
|
|
990
995
|
return sx;
|
|
@@ -8648,6 +8653,13 @@ var SilkscreenText = class extends PrimitiveComponent2 {
|
|
|
8648
8653
|
pathFromAmpersand: "silkscreentext",
|
|
8649
8654
|
component: this
|
|
8650
8655
|
});
|
|
8656
|
+
const resolvedPcbSxVisibility = resolvePcbProperty({
|
|
8657
|
+
propertyName: "visibility",
|
|
8658
|
+
resolvedPcbSx: this.getResolvedPcbSx(),
|
|
8659
|
+
pathFromAmpersand: "silkscreentext",
|
|
8660
|
+
component: this
|
|
8661
|
+
});
|
|
8662
|
+
if (resolvedPcbSxVisibility === "hidden") return;
|
|
8651
8663
|
const fontSize = props.fontSize ?? resolvedPcbSxFontSize ?? this.getInheritedProperty("pcbStyle")?.silkscreenFontSize ?? this._footprinterFontSize ?? 1;
|
|
8652
8664
|
const hasResolvedPcbSxPosition = resolvedPcbSxPcbX !== void 0 || resolvedPcbSxPcbY !== void 0;
|
|
8653
8665
|
const position = hasResolvedPcbSxPosition && this._footprinterFontSize !== void 0 ? applyToPoint20(
|
|
@@ -18045,6 +18057,141 @@ import { getCircuitJsonTree as getCircuitJsonTree2 } from "@tscircuit/circuit-js
|
|
|
18045
18057
|
import "@tscircuit/circuit-json-util";
|
|
18046
18058
|
import { LayoutPipelineSolver } from "@tscircuit/matchpack";
|
|
18047
18059
|
import Debug8 from "debug";
|
|
18060
|
+
|
|
18061
|
+
// lib/utils/schematic/getSchematicComponentWithTextBounds.ts
|
|
18062
|
+
import { getBoundFromCenteredRect } from "@tscircuit/math-utils";
|
|
18063
|
+
import { symbols as symbols3 } from "schematic-symbols";
|
|
18064
|
+
var SYMBOL_TEXT_FONT_SIZE = 0.18;
|
|
18065
|
+
var TEXT_BOX_ENABLED_FTYPES = /* @__PURE__ */ new Set(["simple_resistor"]);
|
|
18066
|
+
function getTextBounds({
|
|
18067
|
+
text,
|
|
18068
|
+
position,
|
|
18069
|
+
anchor,
|
|
18070
|
+
fontSize
|
|
18071
|
+
}) {
|
|
18072
|
+
const width = getSchematicNetLabelTextWidth({ text, font_size: fontSize });
|
|
18073
|
+
const height = fontSize;
|
|
18074
|
+
let relMinX;
|
|
18075
|
+
let relMaxX;
|
|
18076
|
+
if (anchor.includes("left")) {
|
|
18077
|
+
relMinX = 0;
|
|
18078
|
+
relMaxX = width;
|
|
18079
|
+
} else if (anchor.includes("right")) {
|
|
18080
|
+
relMinX = -width;
|
|
18081
|
+
relMaxX = 0;
|
|
18082
|
+
} else {
|
|
18083
|
+
relMinX = -width / 2;
|
|
18084
|
+
relMaxX = width / 2;
|
|
18085
|
+
}
|
|
18086
|
+
let relMinY;
|
|
18087
|
+
let relMaxY;
|
|
18088
|
+
if (anchor.includes("top")) {
|
|
18089
|
+
relMinY = -height;
|
|
18090
|
+
relMaxY = 0;
|
|
18091
|
+
} else if (anchor.includes("bottom")) {
|
|
18092
|
+
relMinY = 0;
|
|
18093
|
+
relMaxY = height;
|
|
18094
|
+
} else {
|
|
18095
|
+
relMinY = -height / 2;
|
|
18096
|
+
relMaxY = height / 2;
|
|
18097
|
+
}
|
|
18098
|
+
return {
|
|
18099
|
+
minX: position.x + relMinX,
|
|
18100
|
+
maxX: position.x + relMaxX,
|
|
18101
|
+
minY: position.y + relMinY,
|
|
18102
|
+
maxY: position.y + relMaxY
|
|
18103
|
+
};
|
|
18104
|
+
}
|
|
18105
|
+
function getSymbolTextBounds({
|
|
18106
|
+
schematicComponent,
|
|
18107
|
+
sourceComponent
|
|
18108
|
+
}) {
|
|
18109
|
+
if (!schematicComponent.symbol_name) return [];
|
|
18110
|
+
const symbol = symbols3[schematicComponent.symbol_name];
|
|
18111
|
+
if (!symbol?.primitives || !symbol.center) return [];
|
|
18112
|
+
const textBounds = [];
|
|
18113
|
+
for (const primitive of symbol.primitives) {
|
|
18114
|
+
if (primitive.type !== "text") continue;
|
|
18115
|
+
let value;
|
|
18116
|
+
if (primitive.text === "{REF}") {
|
|
18117
|
+
value = sourceComponent?.display_name ?? sourceComponent?.name ?? "";
|
|
18118
|
+
} else if (primitive.text === "{VAL}") {
|
|
18119
|
+
value = schematicComponent.symbol_display_value ?? "";
|
|
18120
|
+
} else {
|
|
18121
|
+
value = primitive.text ?? "";
|
|
18122
|
+
}
|
|
18123
|
+
if (!value) continue;
|
|
18124
|
+
textBounds.push(
|
|
18125
|
+
getTextBounds({
|
|
18126
|
+
text: value,
|
|
18127
|
+
position: {
|
|
18128
|
+
x: primitive.x - symbol.center.x + schematicComponent.center.x,
|
|
18129
|
+
y: primitive.y - symbol.center.y + schematicComponent.center.y
|
|
18130
|
+
},
|
|
18131
|
+
anchor: primitive.anchor ?? "center",
|
|
18132
|
+
fontSize: SYMBOL_TEXT_FONT_SIZE
|
|
18133
|
+
})
|
|
18134
|
+
);
|
|
18135
|
+
}
|
|
18136
|
+
return textBounds;
|
|
18137
|
+
}
|
|
18138
|
+
function getSymbolBoxBounds(schematicComponent) {
|
|
18139
|
+
return getBoundFromCenteredRect({
|
|
18140
|
+
center: schematicComponent.center,
|
|
18141
|
+
width: schematicComponent.size.width,
|
|
18142
|
+
height: schematicComponent.size.height
|
|
18143
|
+
});
|
|
18144
|
+
}
|
|
18145
|
+
function getSchematicComponentTextInclusiveBounds(db, schematicComponent) {
|
|
18146
|
+
if (!schematicComponent.center || !schematicComponent.size) return null;
|
|
18147
|
+
const sourceComponent = schematicComponent.source_component_id ? db.source_component.get(schematicComponent.source_component_id) : void 0;
|
|
18148
|
+
if (!sourceComponent || !TEXT_BOX_ENABLED_FTYPES.has(sourceComponent.ftype)) {
|
|
18149
|
+
return null;
|
|
18150
|
+
}
|
|
18151
|
+
const textBounds = getSymbolTextBounds({
|
|
18152
|
+
schematicComponent,
|
|
18153
|
+
sourceComponent
|
|
18154
|
+
});
|
|
18155
|
+
if (textBounds.length === 0) return null;
|
|
18156
|
+
const boxBounds = getSymbolBoxBounds(schematicComponent);
|
|
18157
|
+
const bounds = { ...boxBounds };
|
|
18158
|
+
for (const textBound of textBounds) {
|
|
18159
|
+
bounds.minX = Math.min(bounds.minX, textBound.minX);
|
|
18160
|
+
bounds.maxX = Math.max(bounds.maxX, textBound.maxX);
|
|
18161
|
+
bounds.minY = Math.min(bounds.minY, textBound.minY);
|
|
18162
|
+
bounds.maxY = Math.max(bounds.maxY, textBound.maxY);
|
|
18163
|
+
}
|
|
18164
|
+
if (bounds.minX === boxBounds.minX && bounds.maxX === boxBounds.maxX && bounds.minY === boxBounds.minY && bounds.maxY === boxBounds.maxY) {
|
|
18165
|
+
return null;
|
|
18166
|
+
}
|
|
18167
|
+
return bounds;
|
|
18168
|
+
}
|
|
18169
|
+
function getSchematicComponentWithTextBounds(db, schematicComponent) {
|
|
18170
|
+
const textBounds = getSchematicComponentTextInclusiveBounds(
|
|
18171
|
+
db,
|
|
18172
|
+
schematicComponent
|
|
18173
|
+
);
|
|
18174
|
+
if (!textBounds) return null;
|
|
18175
|
+
const boxBounds = getSymbolBoxBounds(schematicComponent);
|
|
18176
|
+
const isVertical = schematicComponent.size.height > schematicComponent.size.width;
|
|
18177
|
+
if (isVertical) return textBounds;
|
|
18178
|
+
const padX = Math.max(
|
|
18179
|
+
boxBounds.minX - textBounds.minX,
|
|
18180
|
+
textBounds.maxX - boxBounds.maxX
|
|
18181
|
+
);
|
|
18182
|
+
const padY = Math.max(
|
|
18183
|
+
textBounds.maxY - boxBounds.maxY,
|
|
18184
|
+
boxBounds.minY - textBounds.minY
|
|
18185
|
+
);
|
|
18186
|
+
return getBoundFromCenteredRect({
|
|
18187
|
+
center: schematicComponent.center,
|
|
18188
|
+
width: schematicComponent.size.width + 2 * padX,
|
|
18189
|
+
height: schematicComponent.size.height + 2 * padY
|
|
18190
|
+
});
|
|
18191
|
+
}
|
|
18192
|
+
|
|
18193
|
+
// lib/components/primitive-components/Group/applySchematicMatchPackLayoutToTree.ts
|
|
18194
|
+
import { getBoundFromCenteredRect as getBoundFromCenteredRect2 } from "@tscircuit/math-utils";
|
|
18048
18195
|
var debug6 = Debug8("Group_doInitialSchematicLayoutMatchpack");
|
|
18049
18196
|
var DEFAULT_AVAILABLE_ROTATIONS = [0, 90, 180, 270];
|
|
18050
18197
|
var ROTATION_TO_PLACE_SIDE_ON_TOP = {
|
|
@@ -18184,10 +18331,26 @@ function convertTreeToMatchPackInputProblem(tree, db, group) {
|
|
|
18184
18331
|
if (component?.componentName === "Chip") {
|
|
18185
18332
|
availableRotations = [0];
|
|
18186
18333
|
}
|
|
18187
|
-
const
|
|
18188
|
-
|
|
18189
|
-
|
|
18190
|
-
|
|
18334
|
+
const componentWithTextBounds = getSchematicComponentWithTextBounds(
|
|
18335
|
+
db,
|
|
18336
|
+
schematicComponent
|
|
18337
|
+
);
|
|
18338
|
+
let textPadLeft = 0;
|
|
18339
|
+
let textPadRight = 0;
|
|
18340
|
+
let textPadTop = 0;
|
|
18341
|
+
let textPadBottom = 0;
|
|
18342
|
+
if (componentWithTextBounds && schematicComponent.center) {
|
|
18343
|
+
const halfWidth = (schematicComponent.size?.width ?? 0) / 2;
|
|
18344
|
+
const halfHeight = (schematicComponent.size?.height ?? 0) / 2;
|
|
18345
|
+
textPadLeft = schematicComponent.center.x - halfWidth - componentWithTextBounds.minX;
|
|
18346
|
+
textPadRight = componentWithTextBounds.maxX - (schematicComponent.center.x + halfWidth);
|
|
18347
|
+
textPadTop = componentWithTextBounds.maxY - (schematicComponent.center.y + halfHeight);
|
|
18348
|
+
textPadBottom = schematicComponent.center.y - halfHeight - componentWithTextBounds.minY;
|
|
18349
|
+
}
|
|
18350
|
+
const marginLeft = (component?._parsedProps?.schMarginLeft ?? component?._parsedProps?.schMarginX ?? 0) + textPadLeft;
|
|
18351
|
+
const marginRight = (component?._parsedProps?.schMarginRight ?? component?._parsedProps?.schMarginX ?? 0) + textPadRight;
|
|
18352
|
+
let marginTop = (component?._parsedProps?.schMarginTop ?? component?._parsedProps?.schMarginY ?? 0) + textPadTop;
|
|
18353
|
+
let marginBottom = (component?._parsedProps?.schMarginBottom ?? component?._parsedProps?.schMarginY ?? 0) + textPadBottom;
|
|
18191
18354
|
if (component?.config.shouldRenderAsSchematicBox) {
|
|
18192
18355
|
marginTop += 0.4;
|
|
18193
18356
|
marginBottom += 0.4;
|
|
@@ -18257,12 +18420,15 @@ function convertTreeToMatchPackInputProblem(tree, db, group) {
|
|
|
18257
18420
|
for (const comp of groupComponents) {
|
|
18258
18421
|
if (comp.center && comp.size) {
|
|
18259
18422
|
hasValidBounds = true;
|
|
18260
|
-
const
|
|
18261
|
-
|
|
18262
|
-
|
|
18263
|
-
|
|
18264
|
-
|
|
18265
|
-
|
|
18423
|
+
const compBounds = getSchematicComponentWithTextBounds(db, comp) ?? getBoundFromCenteredRect2({
|
|
18424
|
+
center: comp.center,
|
|
18425
|
+
width: comp.size.width,
|
|
18426
|
+
height: comp.size.height
|
|
18427
|
+
});
|
|
18428
|
+
minX = Math.min(minX, compBounds.minX);
|
|
18429
|
+
maxX = Math.max(maxX, compBounds.maxX);
|
|
18430
|
+
minY = Math.min(minY, compBounds.minY);
|
|
18431
|
+
maxY = Math.max(maxY, compBounds.maxY);
|
|
18266
18432
|
}
|
|
18267
18433
|
}
|
|
18268
18434
|
const marginLeft = groupInstance?._parsedProps?.schMarginLeft ?? groupInstance?._parsedProps?.schMarginX ?? 0;
|
|
@@ -19026,6 +19192,10 @@ import Debug12 from "debug";
|
|
|
19026
19192
|
|
|
19027
19193
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/createSchematicTraceSolverInputProblem.ts
|
|
19028
19194
|
import "@tscircuit/schematic-trace-solver";
|
|
19195
|
+
import {
|
|
19196
|
+
getBoundFromCenteredRect as getBoundFromCenteredRect3,
|
|
19197
|
+
getBoundsCenter
|
|
19198
|
+
} from "@tscircuit/math-utils";
|
|
19029
19199
|
var DEFAULT_MAX_MSP_PAIR_DISTANCE = 2.4;
|
|
19030
19200
|
function createSchematicTraceSolverInputProblem(group) {
|
|
19031
19201
|
const { db } = group.root;
|
|
@@ -19075,11 +19245,16 @@ function createSchematicTraceSolverInputProblem(group) {
|
|
|
19075
19245
|
if (sourceComponent?.name) {
|
|
19076
19246
|
sectionId = componentNameToSectionId.get(sourceComponent.name);
|
|
19077
19247
|
}
|
|
19078
|
-
|
|
19079
|
-
chipId,
|
|
19248
|
+
const layoutBounds = getSchematicComponentWithTextBounds(db, schematicComponent) ?? getBoundFromCenteredRect3({
|
|
19080
19249
|
center: schematicComponent.center,
|
|
19081
19250
|
width: schematicComponent.size.width,
|
|
19082
|
-
height: schematicComponent.size.height
|
|
19251
|
+
height: schematicComponent.size.height
|
|
19252
|
+
});
|
|
19253
|
+
chips.push({
|
|
19254
|
+
chipId,
|
|
19255
|
+
center: getBoundsCenter(layoutBounds),
|
|
19256
|
+
width: layoutBounds.maxX - layoutBounds.minX,
|
|
19257
|
+
height: layoutBounds.maxY - layoutBounds.minY,
|
|
19083
19258
|
pins,
|
|
19084
19259
|
sectionId
|
|
19085
19260
|
});
|
|
@@ -19590,6 +19765,45 @@ function computeJunctions(traces, opts = {}) {
|
|
|
19590
19765
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/applyTracesFromSolverOutput.ts
|
|
19591
19766
|
import Debug10 from "debug";
|
|
19592
19767
|
var debug8 = Debug10("Group_doInitialSchematicTraceRender");
|
|
19768
|
+
var MAX_PIN_SNAP_GAP = 1.5;
|
|
19769
|
+
function extendTraceEndpointsToReachPinsInsideExpandedBoundingBox(params, db) {
|
|
19770
|
+
const { points, schematicPortIds, eligiblePortIds } = params;
|
|
19771
|
+
const centers = schematicPortIds.filter((id) => eligiblePortIds.has(id)).map((id) => db.schematic_port.get(id)?.center).filter((c) => Boolean(c));
|
|
19772
|
+
if (centers.length === 0) return points;
|
|
19773
|
+
const result = points.map((p) => ({ x: p.x, y: p.y }));
|
|
19774
|
+
const d2 = (a, b) => (a.x - b.x) ** 2 + (a.y - b.y) ** 2;
|
|
19775
|
+
const usedCenters = /* @__PURE__ */ new Set();
|
|
19776
|
+
const snap = (endpoint) => {
|
|
19777
|
+
const pt = endpoint === "start" ? result[0] : result[result.length - 1];
|
|
19778
|
+
let bestIndex = -1;
|
|
19779
|
+
let bestDist = Number.POSITIVE_INFINITY;
|
|
19780
|
+
for (let i = 0; i < centers.length; i++) {
|
|
19781
|
+
if (usedCenters.has(i)) continue;
|
|
19782
|
+
const dist = d2(centers[i], pt);
|
|
19783
|
+
if (dist < bestDist) {
|
|
19784
|
+
bestDist = dist;
|
|
19785
|
+
bestIndex = i;
|
|
19786
|
+
}
|
|
19787
|
+
}
|
|
19788
|
+
if (bestIndex < 0) return;
|
|
19789
|
+
if (bestDist <= 1e-12) {
|
|
19790
|
+
usedCenters.add(bestIndex);
|
|
19791
|
+
return;
|
|
19792
|
+
}
|
|
19793
|
+
if (bestDist > MAX_PIN_SNAP_GAP ** 2) return;
|
|
19794
|
+
const c = centers[bestIndex];
|
|
19795
|
+
const ALIGN_EPS = 1e-3;
|
|
19796
|
+
if (Math.abs(c.x - pt.x) > ALIGN_EPS && Math.abs(c.y - pt.y) > ALIGN_EPS) {
|
|
19797
|
+
return;
|
|
19798
|
+
}
|
|
19799
|
+
usedCenters.add(bestIndex);
|
|
19800
|
+
if (endpoint === "start") result.unshift({ x: c.x, y: c.y });
|
|
19801
|
+
else result.push({ x: c.x, y: c.y });
|
|
19802
|
+
};
|
|
19803
|
+
snap("start");
|
|
19804
|
+
snap("end");
|
|
19805
|
+
return result;
|
|
19806
|
+
}
|
|
19593
19807
|
function applyTracesFromSolverOutput(args) {
|
|
19594
19808
|
const {
|
|
19595
19809
|
group,
|
|
@@ -19599,6 +19813,17 @@ function applyTracesFromSolverOutput(args) {
|
|
|
19599
19813
|
schematicPortIdsWithPreExistingNetLabels
|
|
19600
19814
|
} = args;
|
|
19601
19815
|
const { db } = group.root;
|
|
19816
|
+
const eligiblePortIds = /* @__PURE__ */ new Set();
|
|
19817
|
+
for (const schematicComponent of db.schematic_component.list()) {
|
|
19818
|
+
if (!getSchematicComponentWithTextBounds(db, schematicComponent)) {
|
|
19819
|
+
continue;
|
|
19820
|
+
}
|
|
19821
|
+
for (const port of db.schematic_port.list({
|
|
19822
|
+
schematic_component_id: schematicComponent.schematic_component_id
|
|
19823
|
+
})) {
|
|
19824
|
+
eligiblePortIds.add(port.schematic_port_id);
|
|
19825
|
+
}
|
|
19826
|
+
}
|
|
19602
19827
|
const traces = solver.netLabelTraceCollisionSolver?.getOutput().traces ?? solver.traceCleanupSolver?.getOutput().traces ?? solver.traceLabelOverlapAvoidanceSolver?.getOutput().traces ?? solver.schematicTraceLinesSolver?.solvedTracePaths;
|
|
19603
19828
|
const pendingTraces = [];
|
|
19604
19829
|
debug8(`Traces inside SchematicTraceSolver output: ${(traces ?? []).length}`);
|
|
@@ -19621,11 +19846,19 @@ function applyTracesFromSolverOutput(args) {
|
|
|
19621
19846
|
);
|
|
19622
19847
|
continue;
|
|
19623
19848
|
}
|
|
19849
|
+
const snappedPoints = extendTraceEndpointsToReachPinsInsideExpandedBoundingBox(
|
|
19850
|
+
{
|
|
19851
|
+
points,
|
|
19852
|
+
schematicPortIds: solvedTraceSchematicPortIds,
|
|
19853
|
+
eligiblePortIds
|
|
19854
|
+
},
|
|
19855
|
+
db
|
|
19856
|
+
);
|
|
19624
19857
|
const edges = [];
|
|
19625
|
-
for (let i = 0; i <
|
|
19858
|
+
for (let i = 0; i < snappedPoints.length - 1; i++) {
|
|
19626
19859
|
edges.push({
|
|
19627
|
-
from: { x:
|
|
19628
|
-
to: { x:
|
|
19860
|
+
from: { x: snappedPoints[i].x, y: snappedPoints[i].y },
|
|
19861
|
+
to: { x: snappedPoints[i + 1].x, y: snappedPoints[i + 1].y }
|
|
19629
19862
|
});
|
|
19630
19863
|
}
|
|
19631
19864
|
const source_trace_id = String(solvedTracePath?.mspPairId);
|
|
@@ -22978,7 +23211,7 @@ function inflateSourcePort(sourcePort, inflatorContext) {
|
|
|
22978
23211
|
|
|
22979
23212
|
// lib/components/normal-components/PushButton.ts
|
|
22980
23213
|
import { pushButtonProps } from "@tscircuit/props";
|
|
22981
|
-
import { symbols as
|
|
23214
|
+
import { symbols as symbols4 } from "schematic-symbols";
|
|
22982
23215
|
var PushButton = class extends NormalComponent3 {
|
|
22983
23216
|
get config() {
|
|
22984
23217
|
return {
|
|
@@ -22996,7 +23229,7 @@ var PushButton = class extends NormalComponent3 {
|
|
|
22996
23229
|
pinCount: 2,
|
|
22997
23230
|
ignoreSymbolPorts: true
|
|
22998
23231
|
});
|
|
22999
|
-
const symbol =
|
|
23232
|
+
const symbol = symbols4[this._getSchematicSymbolNameOrThrow()];
|
|
23000
23233
|
const symPort1 = symbol.ports.find((p) => p.labels.includes("1"));
|
|
23001
23234
|
const symPort2 = symbol.ports.find((p) => p.labels.includes("2"));
|
|
23002
23235
|
const ports = this.selectAll("port");
|
|
@@ -23785,7 +24018,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
23785
24018
|
var package_default = {
|
|
23786
24019
|
name: "@tscircuit/core",
|
|
23787
24020
|
type: "module",
|
|
23788
|
-
version: "0.0.
|
|
24021
|
+
version: "0.0.1336",
|
|
23789
24022
|
types: "dist/index.d.ts",
|
|
23790
24023
|
main: "dist/index.js",
|
|
23791
24024
|
module: "dist/index.js",
|
|
@@ -23836,8 +24069,8 @@ var package_default = {
|
|
|
23836
24069
|
"@tscircuit/props": "^0.0.549",
|
|
23837
24070
|
"@tscircuit/ngspice-spice-engine": "^0.0.16",
|
|
23838
24071
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
23839
|
-
"@tscircuit/schematic-trace-solver": "^0.0.69",
|
|
23840
24072
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
24073
|
+
"@tscircuit/schematic-trace-solver": "^0.0.70",
|
|
23841
24074
|
"@tscircuit/soup-util": "^0.0.41",
|
|
23842
24075
|
"@types/bun": "^1.2.16",
|
|
23843
24076
|
"@types/debug": "^4.1.12",
|
|
@@ -26844,7 +27077,7 @@ import { distance as distance17 } from "@tscircuit/math-utils";
|
|
|
26844
27077
|
// node_modules/@tscircuit/breakout-point-solver/lib/pad/breakout-pad-collisions.ts
|
|
26845
27078
|
import {
|
|
26846
27079
|
doesSegmentIntersectRect,
|
|
26847
|
-
getBoundFromCenteredRect
|
|
27080
|
+
getBoundFromCenteredRect as getBoundFromCenteredRect4
|
|
26848
27081
|
} from "@tscircuit/math-utils";
|
|
26849
27082
|
var degreesToRadians = (degrees) => degrees * Math.PI / 180;
|
|
26850
27083
|
var rotatePoint = (point6, radians) => {
|
|
@@ -26867,7 +27100,7 @@ var getLocalPadPoint = (point6, pad) => {
|
|
|
26867
27100
|
};
|
|
26868
27101
|
var getInflatedPadRect = (pad) => {
|
|
26869
27102
|
const clearance = pad.clearance ?? 0;
|
|
26870
|
-
return
|
|
27103
|
+
return getBoundFromCenteredRect4({
|
|
26871
27104
|
center: { x: 0, y: 0 },
|
|
26872
27105
|
width: pad.width + clearance * 2,
|
|
26873
27106
|
height: pad.height + clearance * 2
|
|
@@ -28766,7 +28999,7 @@ var convertCircuitJsonToUsbCStandardCircuitJson = (partCircuitJson) => {
|
|
|
28766
28999
|
};
|
|
28767
29000
|
|
|
28768
29001
|
// lib/components/normal-components/Connector.ts
|
|
28769
|
-
import { symbols as
|
|
29002
|
+
import { symbols as symbols5 } from "schematic-symbols";
|
|
28770
29003
|
|
|
28771
29004
|
// lib/components/normal-components/Connector_insertInnerSymbolInSchematicBox.ts
|
|
28772
29005
|
var INNER_SYMBOL_SCALE_FACTOR = 0.5;
|
|
@@ -29148,7 +29381,7 @@ var Connector = class extends Chip {
|
|
|
29148
29381
|
doInitialSchematicComponentRender() {
|
|
29149
29382
|
super.doInitialSchematicComponentRender();
|
|
29150
29383
|
if (!this.root?.schematicDisabled && this.schematic_component_id && this._getConnectorProps().standard === "usb_c") {
|
|
29151
|
-
const usbcSymbol =
|
|
29384
|
+
const usbcSymbol = symbols5.usbc;
|
|
29152
29385
|
if (usbcSymbol) {
|
|
29153
29386
|
insertInnerSymbolInSchematicBox(this, usbcSymbol);
|
|
29154
29387
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.1337",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@tscircuit/props": "^0.0.549",
|
|
53
53
|
"@tscircuit/ngspice-spice-engine": "^0.0.16",
|
|
54
54
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
55
|
-
"@tscircuit/schematic-trace-solver": "^0.0.69",
|
|
56
55
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
56
|
+
"@tscircuit/schematic-trace-solver": "^0.0.70",
|
|
57
57
|
"@tscircuit/soup-util": "^0.0.41",
|
|
58
58
|
"@types/bun": "^1.2.16",
|
|
59
59
|
"@types/debug": "^4.1.12",
|