@tscircuit/core 0.0.1116 → 0.0.1118
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 +7 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7289,6 +7289,7 @@ var SilkscreenText = class extends PrimitiveComponent2 {
|
|
|
7289
7289
|
top: props.knockoutPaddingTop ?? uniformPadding,
|
|
7290
7290
|
bottom: props.knockoutPaddingBottom ?? uniformPadding
|
|
7291
7291
|
} : void 0;
|
|
7292
|
+
const text = this._resolveText();
|
|
7292
7293
|
for (const layer of targetLayers) {
|
|
7293
7294
|
const pcb_silkscreen_text = db.pcb_silkscreen_text.insert({
|
|
7294
7295
|
anchor_alignment: props.anchorAlignment,
|
|
@@ -7299,7 +7300,7 @@ var SilkscreenText = class extends PrimitiveComponent2 {
|
|
|
7299
7300
|
font: props.font ?? "tscircuit2024",
|
|
7300
7301
|
font_size: fontSize,
|
|
7301
7302
|
layer: maybeFlipLayer(layer),
|
|
7302
|
-
text: normalizeTextForCircuitJson(
|
|
7303
|
+
text: normalizeTextForCircuitJson(text),
|
|
7303
7304
|
ccw_rotation: rotation4,
|
|
7304
7305
|
pcb_component_id: container.pcb_component_id,
|
|
7305
7306
|
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
@@ -7321,7 +7322,7 @@ var SilkscreenText = class extends PrimitiveComponent2 {
|
|
|
7321
7322
|
component: this
|
|
7322
7323
|
});
|
|
7323
7324
|
const fontSize = props.fontSize ?? resolvedPcbSxFontSize ?? this.getInheritedProperty("pcbStyle")?.silkscreenFontSize ?? this._footprinterFontSize ?? 1;
|
|
7324
|
-
const text =
|
|
7325
|
+
const text = this._resolveText();
|
|
7325
7326
|
const textWidth = text.length * fontSize;
|
|
7326
7327
|
const textHeight = fontSize;
|
|
7327
7328
|
return { width: textWidth * fontSize, height: textHeight * fontSize };
|
|
@@ -11315,9 +11316,11 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
11315
11316
|
cadModel.zOffsetFromSurface
|
|
11316
11317
|
) : 0 : 0;
|
|
11317
11318
|
const computedLayer = this.props.layer === "bottom" ? "bottom" : "top";
|
|
11319
|
+
const pcbComponent = db.pcb_component.get(this.pcb_component_id);
|
|
11318
11320
|
const globalTransform = this._computePcbGlobalTransformBeforeLayout();
|
|
11319
11321
|
const decomposedTransform = decomposeTSR8(globalTransform);
|
|
11320
|
-
const
|
|
11322
|
+
const preLayoutRotation = decomposedTransform.rotation.angle * 180 / Math.PI;
|
|
11323
|
+
const totalRotation = pcbComponent?.position_mode === "packed" ? pcbComponent.rotation ?? preLayoutRotation : preLayoutRotation;
|
|
11321
11324
|
const isBottomLayer = computedLayer === "bottom";
|
|
11322
11325
|
const rotationWithOffset = totalRotation + (rotationOffset.z ?? 0);
|
|
11323
11326
|
const cadRotationZ = normalizeDegrees(rotationWithOffset);
|
|
@@ -18673,7 +18676,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
18673
18676
|
var package_default = {
|
|
18674
18677
|
name: "@tscircuit/core",
|
|
18675
18678
|
type: "module",
|
|
18676
|
-
version: "0.0.
|
|
18679
|
+
version: "0.0.1117",
|
|
18677
18680
|
types: "dist/index.d.ts",
|
|
18678
18681
|
main: "dist/index.js",
|
|
18679
18682
|
module: "dist/index.js",
|