@tscircuit/core 0.0.1279 → 0.0.1281
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 +16 -0
- package/dist/index.js +17 -6
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -78583,6 +78583,7 @@ declare class SmtPad extends PrimitiveComponent<typeof smtPadProps> {
|
|
|
78583
78583
|
doInitialPortMatching(): void;
|
|
78584
78584
|
doInitialPcbPrimitiveRender(): void;
|
|
78585
78585
|
doInitialPcbPortAttachment(): void;
|
|
78586
|
+
getAvailablePcbLayers(): string[];
|
|
78586
78587
|
_getPcbCircuitJsonBounds(): {
|
|
78587
78588
|
center: {
|
|
78588
78589
|
x: number;
|
|
@@ -147408,6 +147409,8 @@ declare class SchematicLine extends PrimitiveComponent<typeof schematicLineProps
|
|
|
147408
147409
|
strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
147409
147410
|
color: zod.ZodOptional<zod.ZodString>;
|
|
147410
147411
|
isDashed: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
147412
|
+
dashLength: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
147413
|
+
dashGap: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
147411
147414
|
}, "strip", zod.ZodTypeAny, {
|
|
147412
147415
|
isDashed: boolean;
|
|
147413
147416
|
x1: number;
|
|
@@ -147416,6 +147419,8 @@ declare class SchematicLine extends PrimitiveComponent<typeof schematicLineProps
|
|
|
147416
147419
|
y2: number;
|
|
147417
147420
|
strokeWidth?: number | undefined;
|
|
147418
147421
|
color?: string | undefined;
|
|
147422
|
+
dashLength?: number | undefined;
|
|
147423
|
+
dashGap?: number | undefined;
|
|
147419
147424
|
}, {
|
|
147420
147425
|
x1: string | number;
|
|
147421
147426
|
y1: string | number;
|
|
@@ -147424,6 +147429,8 @@ declare class SchematicLine extends PrimitiveComponent<typeof schematicLineProps
|
|
|
147424
147429
|
strokeWidth?: string | number | undefined;
|
|
147425
147430
|
color?: string | undefined;
|
|
147426
147431
|
isDashed?: boolean | undefined;
|
|
147432
|
+
dashLength?: string | number | undefined;
|
|
147433
|
+
dashGap?: string | number | undefined;
|
|
147427
147434
|
}>;
|
|
147428
147435
|
};
|
|
147429
147436
|
schematic_line_id?: string;
|
|
@@ -147600,6 +147607,8 @@ declare class SchematicPath extends PrimitiveComponent<typeof schematicPathProps
|
|
|
147600
147607
|
svgPath: zod.ZodOptional<zod.ZodString>;
|
|
147601
147608
|
strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
147602
147609
|
strokeColor: zod.ZodOptional<zod.ZodString>;
|
|
147610
|
+
dashLength: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
147611
|
+
dashGap: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
147603
147612
|
isFilled: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
147604
147613
|
fillColor: zod.ZodOptional<zod.ZodString>;
|
|
147605
147614
|
}, "strip", zod.ZodTypeAny, {
|
|
@@ -147610,6 +147619,8 @@ declare class SchematicPath extends PrimitiveComponent<typeof schematicPathProps
|
|
|
147610
147619
|
y: number;
|
|
147611
147620
|
}[] | undefined;
|
|
147612
147621
|
fillColor?: string | undefined;
|
|
147622
|
+
dashLength?: number | undefined;
|
|
147623
|
+
dashGap?: number | undefined;
|
|
147613
147624
|
svgPath?: string | undefined;
|
|
147614
147625
|
strokeColor?: string | undefined;
|
|
147615
147626
|
}, {
|
|
@@ -147620,6 +147631,8 @@ declare class SchematicPath extends PrimitiveComponent<typeof schematicPathProps
|
|
|
147620
147631
|
}[] | undefined;
|
|
147621
147632
|
isFilled?: boolean | undefined;
|
|
147622
147633
|
fillColor?: string | undefined;
|
|
147634
|
+
dashLength?: string | number | undefined;
|
|
147635
|
+
dashGap?: string | number | undefined;
|
|
147623
147636
|
svgPath?: string | undefined;
|
|
147624
147637
|
strokeColor?: string | undefined;
|
|
147625
147638
|
}>;
|
|
@@ -147764,12 +147777,15 @@ declare class SchematicSection extends PrimitiveComponent<typeof schematicSectio
|
|
|
147764
147777
|
zodProps: zod.ZodObject<{
|
|
147765
147778
|
displayName: zod.ZodOptional<zod.ZodString>;
|
|
147766
147779
|
name: zod.ZodString;
|
|
147780
|
+
sectionTitleFontSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
147767
147781
|
}, "strip", zod.ZodTypeAny, {
|
|
147768
147782
|
name: string;
|
|
147769
147783
|
displayName?: string | undefined;
|
|
147784
|
+
sectionTitleFontSize?: number | undefined;
|
|
147770
147785
|
}, {
|
|
147771
147786
|
name: string;
|
|
147772
147787
|
displayName?: string | undefined;
|
|
147788
|
+
sectionTitleFontSize?: string | number | undefined;
|
|
147773
147789
|
}>;
|
|
147774
147790
|
};
|
|
147775
147791
|
_computeSectionBounds(board: PrimitiveComponent): Bounds | null;
|
package/dist/index.js
CHANGED
|
@@ -8191,7 +8191,10 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
8191
8191
|
const isRotated90Degrees = Math.abs(normalizedRotationDegrees - 90) < rotationTolerance || Math.abs(normalizedRotationDegrees - 270) < rotationTolerance;
|
|
8192
8192
|
let finalRotationDegrees = Math.abs(normalizedRotationDegrees - 360) < rotationTolerance ? 0 : normalizedRotationDegrees;
|
|
8193
8193
|
const transformRotationBeforeFlip = finalRotationDegrees;
|
|
8194
|
-
const { maybeFlipLayer, isFlipped } = this._getPcbPrimitiveFlippedHelpers();
|
|
8194
|
+
const { maybeFlipLayer: maybeFlipDefaultLayer, isFlipped } = this._getPcbPrimitiveFlippedHelpers();
|
|
8195
|
+
const primitiveContainer = this.getPrimitiveContainer();
|
|
8196
|
+
const primitiveContainerLayer = primitiveContainer?.props?.layer !== void 0 ? primitiveContainer?._parsedProps.layer : void 0;
|
|
8197
|
+
const maybeFlipLayer = (layer) => primitiveContainerLayer ?? maybeFlipDefaultLayer(layer);
|
|
8195
8198
|
if (isFlipped) {
|
|
8196
8199
|
finalRotationDegrees = (360 - finalRotationDegrees + 360) % 360;
|
|
8197
8200
|
}
|
|
@@ -8403,6 +8406,14 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
8403
8406
|
pcb_port_id: this.matchedPort?.pcb_port_id
|
|
8404
8407
|
});
|
|
8405
8408
|
}
|
|
8409
|
+
getAvailablePcbLayers() {
|
|
8410
|
+
const { maybeFlipLayer } = this._getPcbPrimitiveFlippedHelpers();
|
|
8411
|
+
const primitiveContainer = this.getPrimitiveContainer();
|
|
8412
|
+
const primitiveContainerLayer = primitiveContainer?.props?.layer !== void 0 ? primitiveContainer?._parsedProps.layer : void 0;
|
|
8413
|
+
return [
|
|
8414
|
+
primitiveContainerLayer ?? maybeFlipLayer(this._parsedProps.layer ?? "top")
|
|
8415
|
+
];
|
|
8416
|
+
}
|
|
8406
8417
|
_getPcbCircuitJsonBounds() {
|
|
8407
8418
|
const { db } = this.root;
|
|
8408
8419
|
const smtpad = db.pcb_smtpad.get(this.pcb_smtpad_id);
|
|
@@ -21856,7 +21867,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
21856
21867
|
var package_default = {
|
|
21857
21868
|
name: "@tscircuit/core",
|
|
21858
21869
|
type: "module",
|
|
21859
|
-
version: "0.0.
|
|
21870
|
+
version: "0.0.1280",
|
|
21860
21871
|
types: "dist/index.d.ts",
|
|
21861
21872
|
main: "dist/index.js",
|
|
21862
21873
|
module: "dist/index.js",
|
|
@@ -21904,7 +21915,7 @@ var package_default = {
|
|
|
21904
21915
|
"@tscircuit/math-utils": "^0.0.36",
|
|
21905
21916
|
"@tscircuit/miniflex": "^0.0.4",
|
|
21906
21917
|
"@tscircuit/ngspice-spice-engine": "^0.0.8",
|
|
21907
|
-
"@tscircuit/props": "^0.0.
|
|
21918
|
+
"@tscircuit/props": "^0.0.542",
|
|
21908
21919
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
21909
21920
|
"@tscircuit/schematic-trace-solver": "^0.0.60",
|
|
21910
21921
|
"@tscircuit/solver-utils": "^0.0.3",
|
|
@@ -21918,7 +21929,7 @@ var package_default = {
|
|
|
21918
21929
|
"bun-match-svg": "0.0.12",
|
|
21919
21930
|
"calculate-elbow": "^0.0.12",
|
|
21920
21931
|
"chokidar-cli": "^3.0.0",
|
|
21921
|
-
"circuit-json": "^0.0.
|
|
21932
|
+
"circuit-json": "^0.0.431",
|
|
21922
21933
|
"circuit-json-to-bpc": "^0.0.13",
|
|
21923
21934
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
21924
21935
|
"circuit-json-to-gltf": "^0.0.102",
|
|
@@ -27717,7 +27728,7 @@ var SchematicSection = class _SchematicSection extends PrimitiveComponent2 {
|
|
|
27717
27728
|
(l) => Math.abs(l.start.x - l.end.x) < TOL3
|
|
27718
27729
|
);
|
|
27719
27730
|
for (const { section, cell, rawBounds } of sectionData) {
|
|
27720
|
-
const { displayName } = section._parsedProps;
|
|
27731
|
+
const { displayName, sectionTitleFontSize } = section._parsedProps;
|
|
27721
27732
|
if (!displayName) continue;
|
|
27722
27733
|
const dividersAbove = hDividers.map((l) => l.start.y).filter((y) => y > cell.minY);
|
|
27723
27734
|
const topBoundary = dividersAbove.length > 0 ? Math.min(...dividersAbove) : outer.maxY;
|
|
@@ -27726,7 +27737,7 @@ var SchematicSection = class _SchematicSection extends PrimitiveComponent2 {
|
|
|
27726
27737
|
db.schematic_text.insert({
|
|
27727
27738
|
anchor: "top_left",
|
|
27728
27739
|
text: displayName,
|
|
27729
|
-
font_size: 0.18,
|
|
27740
|
+
font_size: sectionTitleFontSize ?? 0.18,
|
|
27730
27741
|
color: "#000000",
|
|
27731
27742
|
position: {
|
|
27732
27743
|
x: leftBoundary + LABEL_PADDING,
|
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.1281",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@tscircuit/math-utils": "^0.0.36",
|
|
50
50
|
"@tscircuit/miniflex": "^0.0.4",
|
|
51
51
|
"@tscircuit/ngspice-spice-engine": "^0.0.8",
|
|
52
|
-
"@tscircuit/props": "^0.0.
|
|
52
|
+
"@tscircuit/props": "^0.0.542",
|
|
53
53
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
54
54
|
"@tscircuit/schematic-trace-solver": "^0.0.60",
|
|
55
55
|
"@tscircuit/solver-utils": "^0.0.3",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"bun-match-svg": "0.0.12",
|
|
64
64
|
"calculate-elbow": "^0.0.12",
|
|
65
65
|
"chokidar-cli": "^3.0.0",
|
|
66
|
-
"circuit-json": "^0.0.
|
|
66
|
+
"circuit-json": "^0.0.431",
|
|
67
67
|
"circuit-json-to-bpc": "^0.0.13",
|
|
68
68
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
69
69
|
"circuit-json-to-gltf": "^0.0.102",
|