@tscircuit/core 0.0.914 → 0.0.915
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 +11 -0
- package/dist/index.js +32 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -13917,8 +13917,19 @@ declare class Interconnect extends NormalComponent<typeof interconnectProps> {
|
|
|
13917
13917
|
shouldRenderAsSchematicBox: boolean;
|
|
13918
13918
|
sourceFtype: Ftype;
|
|
13919
13919
|
};
|
|
13920
|
+
/**
|
|
13921
|
+
* For standard footprints (0402, 0603, 0805, 1206), the interconnect acts as
|
|
13922
|
+
* a 0-ohm jumper where both pins are internally connected.
|
|
13923
|
+
*/
|
|
13924
|
+
get defaultInternallyConnectedPinNames(): string[][];
|
|
13920
13925
|
_getImpliedFootprintString(): string | null;
|
|
13921
13926
|
doInitialSourceRender(): void;
|
|
13927
|
+
/**
|
|
13928
|
+
* After ports have their source_component_id assigned, create the
|
|
13929
|
+
* source_component_internal_connection to indicate which pins are
|
|
13930
|
+
* internally connected (for 0-ohm jumper behavior).
|
|
13931
|
+
*/
|
|
13932
|
+
doInitialSourceParentAttachment(): void;
|
|
13922
13933
|
}
|
|
13923
13934
|
|
|
13924
13935
|
declare class SolderJumper<PinLabels extends string = never> extends NormalComponent<typeof solderjumperProps, PinLabels> {
|
package/dist/index.js
CHANGED
|
@@ -16313,6 +16313,7 @@ var Jumper = class extends NormalComponent3 {
|
|
|
16313
16313
|
// lib/components/normal-components/Interconnect.ts
|
|
16314
16314
|
import { interconnectProps } from "@tscircuit/props";
|
|
16315
16315
|
var INTERCONNECT_STANDARD_FOOTPRINTS = {
|
|
16316
|
+
"0402": "0402",
|
|
16316
16317
|
"0603": "0603",
|
|
16317
16318
|
"0805": "0805",
|
|
16318
16319
|
"1206": "1206"
|
|
@@ -16326,6 +16327,17 @@ var Interconnect = class extends NormalComponent3 {
|
|
|
16326
16327
|
sourceFtype: "interconnect"
|
|
16327
16328
|
};
|
|
16328
16329
|
}
|
|
16330
|
+
/**
|
|
16331
|
+
* For standard footprints (0402, 0603, 0805, 1206), the interconnect acts as
|
|
16332
|
+
* a 0-ohm jumper where both pins are internally connected.
|
|
16333
|
+
*/
|
|
16334
|
+
get defaultInternallyConnectedPinNames() {
|
|
16335
|
+
const { standard } = this._parsedProps;
|
|
16336
|
+
if (standard && INTERCONNECT_STANDARD_FOOTPRINTS[standard]) {
|
|
16337
|
+
return [["pin1", "pin2"]];
|
|
16338
|
+
}
|
|
16339
|
+
return [];
|
|
16340
|
+
}
|
|
16329
16341
|
_getImpliedFootprintString() {
|
|
16330
16342
|
const { standard } = this._parsedProps;
|
|
16331
16343
|
if (!standard) return null;
|
|
@@ -16340,6 +16352,24 @@ var Interconnect = class extends NormalComponent3 {
|
|
|
16340
16352
|
});
|
|
16341
16353
|
this.source_component_id = source_component.source_component_id;
|
|
16342
16354
|
}
|
|
16355
|
+
/**
|
|
16356
|
+
* After ports have their source_component_id assigned, create the
|
|
16357
|
+
* source_component_internal_connection to indicate which pins are
|
|
16358
|
+
* internally connected (for 0-ohm jumper behavior).
|
|
16359
|
+
*/
|
|
16360
|
+
doInitialSourceParentAttachment() {
|
|
16361
|
+
const { db } = this.root;
|
|
16362
|
+
const internallyConnectedPorts = this._getInternallyConnectedPins();
|
|
16363
|
+
for (const ports of internallyConnectedPorts) {
|
|
16364
|
+
const sourcePortIds = ports.map((port) => port.source_port_id).filter((id) => id !== null);
|
|
16365
|
+
if (sourcePortIds.length >= 2) {
|
|
16366
|
+
db.source_component_internal_connection.insert({
|
|
16367
|
+
source_component_id: this.source_component_id,
|
|
16368
|
+
source_port_ids: sourcePortIds
|
|
16369
|
+
});
|
|
16370
|
+
}
|
|
16371
|
+
}
|
|
16372
|
+
}
|
|
16343
16373
|
};
|
|
16344
16374
|
|
|
16345
16375
|
// lib/components/normal-components/SolderJumper.ts
|
|
@@ -19169,7 +19199,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
19169
19199
|
var package_default = {
|
|
19170
19200
|
name: "@tscircuit/core",
|
|
19171
19201
|
type: "module",
|
|
19172
|
-
version: "0.0.
|
|
19202
|
+
version: "0.0.914",
|
|
19173
19203
|
types: "dist/index.d.ts",
|
|
19174
19204
|
main: "dist/index.js",
|
|
19175
19205
|
module: "dist/index.js",
|
|
@@ -19227,7 +19257,7 @@ var package_default = {
|
|
|
19227
19257
|
"bun-match-svg": "0.0.12",
|
|
19228
19258
|
"calculate-elbow": "^0.0.12",
|
|
19229
19259
|
"chokidar-cli": "^3.0.0",
|
|
19230
|
-
"circuit-json": "^0.0.
|
|
19260
|
+
"circuit-json": "^0.0.328",
|
|
19231
19261
|
"circuit-json-to-bpc": "^0.0.13",
|
|
19232
19262
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
19233
19263
|
"circuit-json-to-gltf": "^0.0.31",
|
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.915",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"bun-match-svg": "0.0.12",
|
|
60
60
|
"calculate-elbow": "^0.0.12",
|
|
61
61
|
"chokidar-cli": "^3.0.0",
|
|
62
|
-
"circuit-json": "^0.0.
|
|
62
|
+
"circuit-json": "^0.0.328",
|
|
63
63
|
"circuit-json-to-bpc": "^0.0.13",
|
|
64
64
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
65
65
|
"circuit-json-to-gltf": "^0.0.31",
|