@tscircuit/core 0.0.282 → 0.0.283
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 +202 -7
- package/dist/index.js +12 -13
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2051,8 +2051,108 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
2051
2051
|
}>, {
|
|
2052
2052
|
manufacturerPartNumber: zod.ZodOptional<zod.ZodString>;
|
|
2053
2053
|
pinLabels: zod.ZodOptional<zod.ZodRecord<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>>>;
|
|
2054
|
-
|
|
2055
|
-
|
|
2054
|
+
internallyConnectedPins: zod.ZodOptional<zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">>;
|
|
2055
|
+
externallyConnectedPins: zod.ZodOptional<zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">>;
|
|
2056
|
+
schPinArrangement: zod.ZodOptional<zod.ZodObject<{
|
|
2057
|
+
leftSize: zod.ZodOptional<zod.ZodNumber>;
|
|
2058
|
+
topSize: zod.ZodOptional<zod.ZodNumber>;
|
|
2059
|
+
rightSize: zod.ZodOptional<zod.ZodNumber>;
|
|
2060
|
+
bottomSize: zod.ZodOptional<zod.ZodNumber>;
|
|
2061
|
+
leftPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
2062
|
+
rightPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
2063
|
+
topPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
2064
|
+
bottomPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
2065
|
+
leftSide: zod.ZodOptional<zod.ZodObject<{
|
|
2066
|
+
pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
|
|
2067
|
+
direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
|
|
2068
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2069
|
+
pins: (string | number)[];
|
|
2070
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2071
|
+
}, {
|
|
2072
|
+
pins: (string | number)[];
|
|
2073
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2074
|
+
}>>;
|
|
2075
|
+
rightSide: zod.ZodOptional<zod.ZodObject<{
|
|
2076
|
+
pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
|
|
2077
|
+
direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
|
|
2078
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2079
|
+
pins: (string | number)[];
|
|
2080
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2081
|
+
}, {
|
|
2082
|
+
pins: (string | number)[];
|
|
2083
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2084
|
+
}>>;
|
|
2085
|
+
topSide: zod.ZodOptional<zod.ZodObject<{
|
|
2086
|
+
pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
|
|
2087
|
+
direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
|
|
2088
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2089
|
+
pins: (string | number)[];
|
|
2090
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2091
|
+
}, {
|
|
2092
|
+
pins: (string | number)[];
|
|
2093
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2094
|
+
}>>;
|
|
2095
|
+
bottomSide: zod.ZodOptional<zod.ZodObject<{
|
|
2096
|
+
pins: zod.ZodArray<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, "many">;
|
|
2097
|
+
direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
|
|
2098
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2099
|
+
pins: (string | number)[];
|
|
2100
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2101
|
+
}, {
|
|
2102
|
+
pins: (string | number)[];
|
|
2103
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2104
|
+
}>>;
|
|
2105
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2106
|
+
leftSize?: number | undefined;
|
|
2107
|
+
topSize?: number | undefined;
|
|
2108
|
+
rightSize?: number | undefined;
|
|
2109
|
+
bottomSize?: number | undefined;
|
|
2110
|
+
leftSide?: {
|
|
2111
|
+
pins: (string | number)[];
|
|
2112
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2113
|
+
} | undefined;
|
|
2114
|
+
topSide?: {
|
|
2115
|
+
pins: (string | number)[];
|
|
2116
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2117
|
+
} | undefined;
|
|
2118
|
+
rightSide?: {
|
|
2119
|
+
pins: (string | number)[];
|
|
2120
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2121
|
+
} | undefined;
|
|
2122
|
+
bottomSide?: {
|
|
2123
|
+
pins: (string | number)[];
|
|
2124
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2125
|
+
} | undefined;
|
|
2126
|
+
leftPinCount?: number | undefined;
|
|
2127
|
+
rightPinCount?: number | undefined;
|
|
2128
|
+
topPinCount?: number | undefined;
|
|
2129
|
+
bottomPinCount?: number | undefined;
|
|
2130
|
+
}, {
|
|
2131
|
+
leftSize?: number | undefined;
|
|
2132
|
+
topSize?: number | undefined;
|
|
2133
|
+
rightSize?: number | undefined;
|
|
2134
|
+
bottomSize?: number | undefined;
|
|
2135
|
+
leftSide?: {
|
|
2136
|
+
pins: (string | number)[];
|
|
2137
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2138
|
+
} | undefined;
|
|
2139
|
+
topSide?: {
|
|
2140
|
+
pins: (string | number)[];
|
|
2141
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2142
|
+
} | undefined;
|
|
2143
|
+
rightSide?: {
|
|
2144
|
+
pins: (string | number)[];
|
|
2145
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2146
|
+
} | undefined;
|
|
2147
|
+
bottomSide?: {
|
|
2148
|
+
pins: (string | number)[];
|
|
2149
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2150
|
+
} | undefined;
|
|
2151
|
+
leftPinCount?: number | undefined;
|
|
2152
|
+
rightPinCount?: number | undefined;
|
|
2153
|
+
topPinCount?: number | undefined;
|
|
2154
|
+
bottomPinCount?: number | undefined;
|
|
2155
|
+
}>>;
|
|
2056
2156
|
schPortArrangement: zod.ZodOptional<zod.ZodObject<{
|
|
2057
2157
|
leftSize: zod.ZodOptional<zod.ZodNumber>;
|
|
2058
2158
|
topSize: zod.ZodOptional<zod.ZodNumber>;
|
|
@@ -2242,8 +2342,34 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
2242
2342
|
symbolName?: string | undefined;
|
|
2243
2343
|
manufacturerPartNumber?: string | undefined;
|
|
2244
2344
|
pinLabels?: Record<string | number, string | readonly string[]> | undefined;
|
|
2245
|
-
|
|
2246
|
-
|
|
2345
|
+
internallyConnectedPins?: string[][] | undefined;
|
|
2346
|
+
externallyConnectedPins?: string[][] | undefined;
|
|
2347
|
+
schPinArrangement?: {
|
|
2348
|
+
leftSize?: number | undefined;
|
|
2349
|
+
topSize?: number | undefined;
|
|
2350
|
+
rightSize?: number | undefined;
|
|
2351
|
+
bottomSize?: number | undefined;
|
|
2352
|
+
leftSide?: {
|
|
2353
|
+
pins: (string | number)[];
|
|
2354
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2355
|
+
} | undefined;
|
|
2356
|
+
topSide?: {
|
|
2357
|
+
pins: (string | number)[];
|
|
2358
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2359
|
+
} | undefined;
|
|
2360
|
+
rightSide?: {
|
|
2361
|
+
pins: (string | number)[];
|
|
2362
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2363
|
+
} | undefined;
|
|
2364
|
+
bottomSide?: {
|
|
2365
|
+
pins: (string | number)[];
|
|
2366
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2367
|
+
} | undefined;
|
|
2368
|
+
leftPinCount?: number | undefined;
|
|
2369
|
+
rightPinCount?: number | undefined;
|
|
2370
|
+
topPinCount?: number | undefined;
|
|
2371
|
+
bottomPinCount?: number | undefined;
|
|
2372
|
+
} | undefined;
|
|
2247
2373
|
schPortArrangement?: {
|
|
2248
2374
|
leftSize?: number | undefined;
|
|
2249
2375
|
topSize?: number | undefined;
|
|
@@ -2351,8 +2477,34 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
2351
2477
|
symbolName?: string | undefined;
|
|
2352
2478
|
manufacturerPartNumber?: string | undefined;
|
|
2353
2479
|
pinLabels?: Record<string | number, string | readonly string[]> | undefined;
|
|
2354
|
-
|
|
2355
|
-
|
|
2480
|
+
internallyConnectedPins?: string[][] | undefined;
|
|
2481
|
+
externallyConnectedPins?: string[][] | undefined;
|
|
2482
|
+
schPinArrangement?: {
|
|
2483
|
+
leftSize?: number | undefined;
|
|
2484
|
+
topSize?: number | undefined;
|
|
2485
|
+
rightSize?: number | undefined;
|
|
2486
|
+
bottomSize?: number | undefined;
|
|
2487
|
+
leftSide?: {
|
|
2488
|
+
pins: (string | number)[];
|
|
2489
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2490
|
+
} | undefined;
|
|
2491
|
+
topSide?: {
|
|
2492
|
+
pins: (string | number)[];
|
|
2493
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2494
|
+
} | undefined;
|
|
2495
|
+
rightSide?: {
|
|
2496
|
+
pins: (string | number)[];
|
|
2497
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2498
|
+
} | undefined;
|
|
2499
|
+
bottomSide?: {
|
|
2500
|
+
pins: (string | number)[];
|
|
2501
|
+
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2502
|
+
} | undefined;
|
|
2503
|
+
leftPinCount?: number | undefined;
|
|
2504
|
+
rightPinCount?: number | undefined;
|
|
2505
|
+
topPinCount?: number | undefined;
|
|
2506
|
+
bottomPinCount?: number | undefined;
|
|
2507
|
+
} | undefined;
|
|
2356
2508
|
schPortArrangement?: {
|
|
2357
2509
|
leftSize?: number | undefined;
|
|
2358
2510
|
topSize?: number | undefined;
|
|
@@ -5607,6 +5759,45 @@ declare class SmtPad extends PrimitiveComponent<typeof smtPadProps> {
|
|
|
5607
5759
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5608
5760
|
} | undefined;
|
|
5609
5761
|
portHints?: (string | number)[] | undefined;
|
|
5762
|
+
}>, zod.ZodObject<zod.objectUtil.extendShape<Omit<{
|
|
5763
|
+
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
5764
|
+
pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
5765
|
+
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
5766
|
+
layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
|
|
5767
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
5768
|
+
}, "strip", zod.ZodTypeAny, {
|
|
5769
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5770
|
+
}, {
|
|
5771
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5772
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
5773
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5774
|
+
}>>;
|
|
5775
|
+
}, "pcbRotation">, {
|
|
5776
|
+
shape: zod.ZodLiteral<"pill">;
|
|
5777
|
+
width: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
5778
|
+
height: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
5779
|
+
radius: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
5780
|
+
portHints: zod.ZodOptional<zod.ZodArray<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, "many">>;
|
|
5781
|
+
}>, "strip", zod.ZodTypeAny, {
|
|
5782
|
+
shape: "pill";
|
|
5783
|
+
width: number;
|
|
5784
|
+
height: number;
|
|
5785
|
+
radius: number;
|
|
5786
|
+
pcbX?: number | undefined;
|
|
5787
|
+
pcbY?: number | undefined;
|
|
5788
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
5789
|
+
portHints?: (string | number)[] | undefined;
|
|
5790
|
+
}, {
|
|
5791
|
+
shape: "pill";
|
|
5792
|
+
width: string | number;
|
|
5793
|
+
height: string | number;
|
|
5794
|
+
radius: string | number;
|
|
5795
|
+
pcbX?: string | number | undefined;
|
|
5796
|
+
pcbY?: string | number | undefined;
|
|
5797
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
5798
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5799
|
+
} | undefined;
|
|
5800
|
+
portHints?: (string | number)[] | undefined;
|
|
5610
5801
|
}>]>;
|
|
5611
5802
|
};
|
|
5612
5803
|
getPcbSize(): {
|
|
@@ -8253,7 +8444,9 @@ declare class PushButton extends NormalComponent<typeof pushButtonProps, Passive
|
|
|
8253
8444
|
}>]>>;
|
|
8254
8445
|
children: zod.ZodOptional<zod.ZodAny>;
|
|
8255
8446
|
symbolName: zod.ZodOptional<zod.ZodString>;
|
|
8256
|
-
}>, {
|
|
8447
|
+
}>, {
|
|
8448
|
+
internallyConnectedPins: zod.ZodOptional<zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">>;
|
|
8449
|
+
}>, "strip", zod.ZodTypeAny, {
|
|
8257
8450
|
name: string;
|
|
8258
8451
|
pcbX?: number | undefined;
|
|
8259
8452
|
pcbY?: number | undefined;
|
|
@@ -8320,6 +8513,7 @@ declare class PushButton extends NormalComponent<typeof pushButtonProps, Passive
|
|
|
8320
8513
|
} | undefined;
|
|
8321
8514
|
children?: any;
|
|
8322
8515
|
symbolName?: string | undefined;
|
|
8516
|
+
internallyConnectedPins?: string[][] | undefined;
|
|
8323
8517
|
}, {
|
|
8324
8518
|
name: string;
|
|
8325
8519
|
pcbX?: string | number | undefined;
|
|
@@ -8389,6 +8583,7 @@ declare class PushButton extends NormalComponent<typeof pushButtonProps, Passive
|
|
|
8389
8583
|
} | undefined;
|
|
8390
8584
|
children?: any;
|
|
8391
8585
|
symbolName?: string | undefined;
|
|
8586
|
+
internallyConnectedPins?: string[][] | undefined;
|
|
8392
8587
|
}>;
|
|
8393
8588
|
sourceFtype: "simple_push_button";
|
|
8394
8589
|
};
|
package/dist/index.js
CHANGED
|
@@ -2906,7 +2906,7 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
2906
2906
|
if (this.root?.schematicDisabled) return;
|
|
2907
2907
|
const { config } = this;
|
|
2908
2908
|
const portsToCreate = [];
|
|
2909
|
-
const schPortArrangement = this.
|
|
2909
|
+
const schPortArrangement = this._getSchematicPortArrangement();
|
|
2910
2910
|
if (schPortArrangement && !this._parsedProps.pinLabels) {
|
|
2911
2911
|
for (const side in schPortArrangement) {
|
|
2912
2912
|
const pins = schPortArrangement[side].pins;
|
|
@@ -2998,7 +2998,7 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
2998
2998
|
}
|
|
2999
2999
|
this.addAll(portsToCreate);
|
|
3000
3000
|
}
|
|
3001
|
-
if (!this.
|
|
3001
|
+
if (!this._getSchematicPortArrangement()) {
|
|
3002
3002
|
const portsFromFootprint = this.getPortsFromFootprint(opts);
|
|
3003
3003
|
for (const port of portsFromFootprint) {
|
|
3004
3004
|
if (!portsToCreate.some(
|
|
@@ -3009,13 +3009,13 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
3009
3009
|
}
|
|
3010
3010
|
}
|
|
3011
3011
|
for (let pn = 1; pn <= (opts.pinCount ?? this._getPinCount()); pn++) {
|
|
3012
|
-
if (!
|
|
3012
|
+
if (!schPortArrangement) continue;
|
|
3013
3013
|
if (portsToCreate.find((p) => p._parsedProps.pinNumber === pn)) continue;
|
|
3014
3014
|
let explicitlyListedPinNumbersInSchPortArrangement = [
|
|
3015
|
-
...
|
|
3016
|
-
...
|
|
3017
|
-
...
|
|
3018
|
-
...
|
|
3015
|
+
...schPortArrangement.leftSide?.pins ?? [],
|
|
3016
|
+
...schPortArrangement.rightSide?.pins ?? [],
|
|
3017
|
+
...schPortArrangement.topSide?.pins ?? [],
|
|
3018
|
+
...schPortArrangement.bottomSide?.pins ?? []
|
|
3019
3019
|
].map(
|
|
3020
3020
|
(pn2) => parsePinNumberFromLabelsOrThrow(pn2, this._parsedProps.pinLabels)
|
|
3021
3021
|
);
|
|
@@ -3028,7 +3028,7 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
3028
3028
|
"rightPinCount",
|
|
3029
3029
|
"topPinCount",
|
|
3030
3030
|
"bottomPinCount"
|
|
3031
|
-
].some((key) => key in
|
|
3031
|
+
].some((key) => key in schPortArrangement)) {
|
|
3032
3032
|
explicitlyListedPinNumbersInSchPortArrangement = Array.from(
|
|
3033
3033
|
{ length: this._getPinCount() },
|
|
3034
3034
|
(_, i) => i + 1
|
|
@@ -3171,6 +3171,7 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
3171
3171
|
}
|
|
3172
3172
|
}
|
|
3173
3173
|
const center = this._getGlobalSchematicPositionBeforeLayout();
|
|
3174
|
+
const schPortArrangement = this._getSchematicPortArrangement();
|
|
3174
3175
|
const schematic_component2 = db.schematic_component.insert({
|
|
3175
3176
|
center,
|
|
3176
3177
|
rotation: props.schRotation ?? 0,
|
|
@@ -3179,16 +3180,14 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
3179
3180
|
// uses the schematic_component size to draw boxes instead of the
|
|
3180
3181
|
// schematic_box size
|
|
3181
3182
|
// size: dimensions.getSizeIncludingPins(),
|
|
3182
|
-
port_arrangement: underscorifyPortArrangement(
|
|
3183
|
-
props.schPortArrangement
|
|
3184
|
-
),
|
|
3183
|
+
port_arrangement: underscorifyPortArrangement(schPortArrangement),
|
|
3185
3184
|
pin_spacing: props.schPinSpacing ?? 0.2,
|
|
3186
3185
|
// @ts-ignore soup needs to support distance for pin_styles
|
|
3187
3186
|
pin_styles: underscorifyPinStyles(props.schPinStyle, props.pinLabels),
|
|
3188
3187
|
port_labels: primaryPortLabels,
|
|
3189
3188
|
source_component_id: this.source_component_id
|
|
3190
3189
|
});
|
|
3191
|
-
const hasTopOrBottomPins =
|
|
3190
|
+
const hasTopOrBottomPins = schPortArrangement?.topSide !== void 0 || schPortArrangement?.bottomSide !== void 0;
|
|
3192
3191
|
const schematic_box_width = dimensions?.getSize().width;
|
|
3193
3192
|
const schematic_box_height = dimensions?.getSize().height;
|
|
3194
3193
|
const manufacturer_part_number_schematic_text = db.schematic_text.insert({
|
|
@@ -3436,7 +3435,7 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
3436
3435
|
* appear on a schematic box, e.g. for a pin header
|
|
3437
3436
|
*/
|
|
3438
3437
|
_getSchematicPortArrangement() {
|
|
3439
|
-
return this._parsedProps.schPortArrangement;
|
|
3438
|
+
return this._parsedProps.schPinArrangement ?? this._parsedProps.schPortArrangement;
|
|
3440
3439
|
}
|
|
3441
3440
|
_getSchematicBoxDimensions() {
|
|
3442
3441
|
if (this.getSchematicSymbol()) return null;
|
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.283",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@tscircuit/footprinter": "^0.0.97",
|
|
56
56
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
57
57
|
"@tscircuit/math-utils": "^0.0.9",
|
|
58
|
-
"@tscircuit/props": "^0.0.
|
|
58
|
+
"@tscircuit/props": "^0.0.136",
|
|
59
59
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
60
60
|
"@tscircuit/soup-util": "^0.0.41",
|
|
61
61
|
"circuit-json": "^0.0.134",
|