@tscircuit/core 0.0.475 → 0.0.477
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 +1 -1
- package/dist/index.js +18 -9
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -4241,7 +4241,7 @@ declare class Fuse extends NormalComponent<typeof fuseProps, PassivePorts> {
|
|
|
4241
4241
|
declare class Jumper<PinLabels extends string = never> extends NormalComponent<typeof jumperProps, PinLabels> {
|
|
4242
4242
|
schematicDimensions: SchematicBoxDimensions | null;
|
|
4243
4243
|
get config(): {
|
|
4244
|
-
schematicSymbolName:
|
|
4244
|
+
schematicSymbolName: undefined;
|
|
4245
4245
|
componentName: string;
|
|
4246
4246
|
zodProps: zod.ZodObject<{
|
|
4247
4247
|
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
package/dist/index.js
CHANGED
|
@@ -8181,10 +8181,8 @@ import { jumperProps } from "@tscircuit/props";
|
|
|
8181
8181
|
var Jumper = class extends NormalComponent {
|
|
8182
8182
|
schematicDimensions = null;
|
|
8183
8183
|
get config() {
|
|
8184
|
-
let symbolName = "";
|
|
8185
|
-
if (this.props.pinCount) symbolName += `pinrow${this.props.pinCount || 2}`;
|
|
8186
8184
|
return {
|
|
8187
|
-
schematicSymbolName:
|
|
8185
|
+
schematicSymbolName: void 0,
|
|
8188
8186
|
componentName: "Jumper",
|
|
8189
8187
|
zodProps: jumperProps,
|
|
8190
8188
|
shouldRenderAsSchematicBox: true
|
|
@@ -8192,7 +8190,7 @@ var Jumper = class extends NormalComponent {
|
|
|
8192
8190
|
}
|
|
8193
8191
|
_getSchematicPortArrangement() {
|
|
8194
8192
|
const arrangement = super._getSchematicPortArrangement();
|
|
8195
|
-
if (arrangement) return arrangement;
|
|
8193
|
+
if (arrangement && Object.keys(arrangement).length > 0) return arrangement;
|
|
8196
8194
|
const pinCount = this._parsedProps.pinCount ?? (Array.isArray(this._parsedProps.pinLabels) ? this._parsedProps.pinLabels.length : this._parsedProps.pinLabels ? Object.keys(this._parsedProps.pinLabels).length : this.getPortsFromFootprint().length);
|
|
8197
8195
|
const direction = this._parsedProps.schDirection ?? "right";
|
|
8198
8196
|
return {
|
|
@@ -8285,9 +8283,20 @@ var SolderJumper = class extends NormalComponent {
|
|
|
8285
8283
|
return this._parsedProps.bridgedPins ?? [];
|
|
8286
8284
|
}
|
|
8287
8285
|
get config() {
|
|
8286
|
+
let resolvedPinCount = this.props.pinCount;
|
|
8287
|
+
if (!resolvedPinCount) {
|
|
8288
|
+
const nums = (this.props.bridgedPins ?? []).flat().map((p) => {
|
|
8289
|
+
if (typeof p === "number") return p;
|
|
8290
|
+
if (p.startsWith("pin")) return Number(p.slice(3));
|
|
8291
|
+
return Number(p);
|
|
8292
|
+
}).filter((n) => !Number.isNaN(n));
|
|
8293
|
+
const maxPin = nums.length > 0 ? Math.max(...nums) : 0;
|
|
8294
|
+
if (maxPin === 2 || maxPin === 3) {
|
|
8295
|
+
resolvedPinCount = maxPin;
|
|
8296
|
+
}
|
|
8297
|
+
}
|
|
8288
8298
|
let symbolName = "";
|
|
8289
|
-
if (
|
|
8290
|
-
symbolName += `solderjumper${this.props.pinCount || 2}`;
|
|
8299
|
+
if (resolvedPinCount) symbolName += `solderjumper${resolvedPinCount}`;
|
|
8291
8300
|
if (Array.isArray(this.props.bridgedPins) && this.props.bridgedPins.length > 0) {
|
|
8292
8301
|
const pins = Array.from(new Set(this.props.bridgedPins.flat())).sort().join("");
|
|
8293
8302
|
symbolName += `_bridged${pins}`;
|
|
@@ -8301,7 +8310,7 @@ var SolderJumper = class extends NormalComponent {
|
|
|
8301
8310
|
}
|
|
8302
8311
|
_getSchematicPortArrangement() {
|
|
8303
8312
|
const arrangement = super._getSchematicPortArrangement();
|
|
8304
|
-
if (arrangement) return arrangement;
|
|
8313
|
+
if (arrangement && Object.keys(arrangement).length > 0) return arrangement;
|
|
8305
8314
|
const pinCount = this._parsedProps.pinCount ?? (Array.isArray(this._parsedProps.pinLabels) ? this._parsedProps.pinLabels.length : this._parsedProps.pinLabels ? Object.keys(this._parsedProps.pinLabels).length : this.getPortsFromFootprint().length);
|
|
8306
8315
|
const direction = this._parsedProps.schDirection ?? "right";
|
|
8307
8316
|
return {
|
|
@@ -9887,7 +9896,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
9887
9896
|
var package_default = {
|
|
9888
9897
|
name: "@tscircuit/core",
|
|
9889
9898
|
type: "module",
|
|
9890
|
-
version: "0.0.
|
|
9899
|
+
version: "0.0.476",
|
|
9891
9900
|
types: "dist/index.d.ts",
|
|
9892
9901
|
main: "dist/index.js",
|
|
9893
9902
|
module: "dist/index.js",
|
|
@@ -9923,7 +9932,7 @@ var package_default = {
|
|
|
9923
9932
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
9924
9933
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
9925
9934
|
"@tscircuit/simple-3d-svg": "^0.0.6",
|
|
9926
|
-
"@types/bun": "
|
|
9935
|
+
"@types/bun": "^1.2.16",
|
|
9927
9936
|
"@types/debug": "^4.1.12",
|
|
9928
9937
|
"@types/react": "^19.0.1",
|
|
9929
9938
|
"@types/react-dom": "^19.0.2",
|
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.477",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
38
38
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
39
39
|
"@tscircuit/simple-3d-svg": "^0.0.6",
|
|
40
|
-
"@types/bun": "
|
|
40
|
+
"@types/bun": "^1.2.16",
|
|
41
41
|
"@types/debug": "^4.1.12",
|
|
42
42
|
"@types/react": "^19.0.1",
|
|
43
43
|
"@types/react-dom": "^19.0.2",
|