@tscircuit/core 0.0.475 → 0.0.476

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 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: string;
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: symbolName,
8185
+ schematicSymbolName: void 0,
8188
8186
  componentName: "Jumper",
8189
8187
  zodProps: jumperProps,
8190
8188
  shouldRenderAsSchematicBox: true
@@ -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 (this.props.pinCount)
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}`;
@@ -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.474",
9899
+ version: "0.0.475",
9891
9900
  types: "dist/index.d.ts",
9892
9901
  main: "dist/index.js",
9893
9902
  module: "dist/index.js",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.475",
4
+ "version": "0.0.476",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",