@tscircuit/core 0.0.1336 → 0.0.1338
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 +30 -4
- package/package.json +1 -1
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(
|
|
@@ -10197,6 +10209,20 @@ var createComponentsFromCircuitJson = ({
|
|
|
10197
10209
|
layer: elm.layer
|
|
10198
10210
|
})
|
|
10199
10211
|
);
|
|
10212
|
+
} else if (elm.type === "pcb_smtpad" && elm.shape === "rotated_rect") {
|
|
10213
|
+
components.push(
|
|
10214
|
+
new SmtPad({
|
|
10215
|
+
pcbX: elm.x,
|
|
10216
|
+
pcbY: elm.y,
|
|
10217
|
+
layer: elm.layer,
|
|
10218
|
+
shape: "rotated_rect",
|
|
10219
|
+
height: elm.height,
|
|
10220
|
+
width: elm.width,
|
|
10221
|
+
ccwRotation: elm.ccw_rotation,
|
|
10222
|
+
cornerRadius: elm.corner_radius,
|
|
10223
|
+
portHints: elm.port_hints
|
|
10224
|
+
})
|
|
10225
|
+
);
|
|
10200
10226
|
} else if (elm.type === "pcb_smtpad" && elm.shape === "polygon") {
|
|
10201
10227
|
components.push(
|
|
10202
10228
|
new SmtPad({
|
|
@@ -24006,7 +24032,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
24006
24032
|
var package_default = {
|
|
24007
24033
|
name: "@tscircuit/core",
|
|
24008
24034
|
type: "module",
|
|
24009
|
-
version: "0.0.
|
|
24035
|
+
version: "0.0.1337",
|
|
24010
24036
|
types: "dist/index.d.ts",
|
|
24011
24037
|
main: "dist/index.js",
|
|
24012
24038
|
module: "dist/index.js",
|