@tscircuit/core 0.0.913 → 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 +26 -0
- package/dist/index.js +53 -6
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -3359,6 +3359,11 @@ declare class Panel extends Group<typeof panelProps> {
|
|
|
3359
3359
|
tabWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
3360
3360
|
tabLength: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
3361
3361
|
mouseBites: zod.ZodOptional<zod.ZodBoolean>;
|
|
3362
|
+
edgePadding: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
3363
|
+
edgePaddingLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
3364
|
+
edgePaddingRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
3365
|
+
edgePaddingTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
3366
|
+
edgePaddingBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
3362
3367
|
}, "strip", zod.ZodTypeAny, {
|
|
3363
3368
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
3364
3369
|
key?: any;
|
|
@@ -3622,6 +3627,11 @@ declare class Panel extends Group<typeof panelProps> {
|
|
|
3622
3627
|
tabWidth?: number | undefined;
|
|
3623
3628
|
tabLength?: number | undefined;
|
|
3624
3629
|
mouseBites?: boolean | undefined;
|
|
3630
|
+
edgePadding?: number | undefined;
|
|
3631
|
+
edgePaddingLeft?: number | undefined;
|
|
3632
|
+
edgePaddingRight?: number | undefined;
|
|
3633
|
+
edgePaddingTop?: number | undefined;
|
|
3634
|
+
edgePaddingBottom?: number | undefined;
|
|
3625
3635
|
}, {
|
|
3626
3636
|
symbol?: _tscircuit_props.SymbolProp | undefined;
|
|
3627
3637
|
key?: any;
|
|
@@ -3887,6 +3897,11 @@ declare class Panel extends Group<typeof panelProps> {
|
|
|
3887
3897
|
tabWidth?: string | number | undefined;
|
|
3888
3898
|
tabLength?: string | number | undefined;
|
|
3889
3899
|
mouseBites?: boolean | undefined;
|
|
3900
|
+
edgePadding?: string | number | undefined;
|
|
3901
|
+
edgePaddingLeft?: string | number | undefined;
|
|
3902
|
+
edgePaddingRight?: string | number | undefined;
|
|
3903
|
+
edgePaddingTop?: string | number | undefined;
|
|
3904
|
+
edgePaddingBottom?: string | number | undefined;
|
|
3890
3905
|
}>;
|
|
3891
3906
|
};
|
|
3892
3907
|
get isGroup(): boolean;
|
|
@@ -13902,8 +13917,19 @@ declare class Interconnect extends NormalComponent<typeof interconnectProps> {
|
|
|
13902
13917
|
shouldRenderAsSchematicBox: boolean;
|
|
13903
13918
|
sourceFtype: Ftype;
|
|
13904
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[][];
|
|
13905
13925
|
_getImpliedFootprintString(): string | null;
|
|
13906
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;
|
|
13907
13933
|
}
|
|
13908
13934
|
|
|
13909
13935
|
declare class SolderJumper<PinLabels extends string = never> extends NormalComponent<typeof solderjumperProps, PinLabels> {
|
package/dist/index.js
CHANGED
|
@@ -15744,7 +15744,6 @@ import { distance as distance10 } from "circuit-json";
|
|
|
15744
15744
|
|
|
15745
15745
|
// lib/utils/panels/generate-panel-tabs-and-mouse-bites.ts
|
|
15746
15746
|
import * as Flatten from "@flatten-js/core";
|
|
15747
|
-
var DEFAULT_PANEL_MARGIN = 5;
|
|
15748
15747
|
var DEFAULT_TAB_LENGTH = 5;
|
|
15749
15748
|
var DEFAULT_TAB_WIDTH = 2;
|
|
15750
15749
|
var generateCutoutsAndMousebitesForOutline = (outline, options) => {
|
|
@@ -16056,9 +16055,27 @@ var Panel = class extends Group6 {
|
|
|
16056
16055
|
height: distance10.parse(this._parsedProps.height)
|
|
16057
16056
|
});
|
|
16058
16057
|
} else if (gridWidth > 0 || gridHeight > 0) {
|
|
16058
|
+
const {
|
|
16059
|
+
edgePadding: edgePaddingProp,
|
|
16060
|
+
edgePaddingLeft: edgePaddingLeftProp,
|
|
16061
|
+
edgePaddingRight: edgePaddingRightProp,
|
|
16062
|
+
edgePaddingTop: edgePaddingTopProp,
|
|
16063
|
+
edgePaddingBottom: edgePaddingBottomProp
|
|
16064
|
+
} = this._parsedProps;
|
|
16065
|
+
const edgePadding = distance10.parse(edgePaddingProp ?? 5);
|
|
16066
|
+
const edgePaddingLeft = distance10.parse(
|
|
16067
|
+
edgePaddingLeftProp ?? edgePadding
|
|
16068
|
+
);
|
|
16069
|
+
const edgePaddingRight = distance10.parse(
|
|
16070
|
+
edgePaddingRightProp ?? edgePadding
|
|
16071
|
+
);
|
|
16072
|
+
const edgePaddingTop = distance10.parse(edgePaddingTopProp ?? edgePadding);
|
|
16073
|
+
const edgePaddingBottom = distance10.parse(
|
|
16074
|
+
edgePaddingBottomProp ?? edgePadding
|
|
16075
|
+
);
|
|
16059
16076
|
db.pcb_panel.update(this.pcb_panel_id, {
|
|
16060
|
-
width: hasExplicitWidth ? distance10.parse(this._parsedProps.width) : gridWidth +
|
|
16061
|
-
height: hasExplicitHeight ? distance10.parse(this._parsedProps.height) : gridHeight +
|
|
16077
|
+
width: hasExplicitWidth ? distance10.parse(this._parsedProps.width) : gridWidth + edgePaddingLeft + edgePaddingRight,
|
|
16078
|
+
height: hasExplicitHeight ? distance10.parse(this._parsedProps.height) : gridHeight + edgePaddingTop + edgePaddingBottom
|
|
16062
16079
|
});
|
|
16063
16080
|
}
|
|
16064
16081
|
}
|
|
@@ -16296,6 +16313,7 @@ var Jumper = class extends NormalComponent3 {
|
|
|
16296
16313
|
// lib/components/normal-components/Interconnect.ts
|
|
16297
16314
|
import { interconnectProps } from "@tscircuit/props";
|
|
16298
16315
|
var INTERCONNECT_STANDARD_FOOTPRINTS = {
|
|
16316
|
+
"0402": "0402",
|
|
16299
16317
|
"0603": "0603",
|
|
16300
16318
|
"0805": "0805",
|
|
16301
16319
|
"1206": "1206"
|
|
@@ -16309,6 +16327,17 @@ var Interconnect = class extends NormalComponent3 {
|
|
|
16309
16327
|
sourceFtype: "interconnect"
|
|
16310
16328
|
};
|
|
16311
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
|
+
}
|
|
16312
16341
|
_getImpliedFootprintString() {
|
|
16313
16342
|
const { standard } = this._parsedProps;
|
|
16314
16343
|
if (!standard) return null;
|
|
@@ -16323,6 +16352,24 @@ var Interconnect = class extends NormalComponent3 {
|
|
|
16323
16352
|
});
|
|
16324
16353
|
this.source_component_id = source_component.source_component_id;
|
|
16325
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
|
+
}
|
|
16326
16373
|
};
|
|
16327
16374
|
|
|
16328
16375
|
// lib/components/normal-components/SolderJumper.ts
|
|
@@ -19152,7 +19199,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
19152
19199
|
var package_default = {
|
|
19153
19200
|
name: "@tscircuit/core",
|
|
19154
19201
|
type: "module",
|
|
19155
|
-
version: "0.0.
|
|
19202
|
+
version: "0.0.914",
|
|
19156
19203
|
types: "dist/index.d.ts",
|
|
19157
19204
|
main: "dist/index.js",
|
|
19158
19205
|
module: "dist/index.js",
|
|
@@ -19196,7 +19243,7 @@ var package_default = {
|
|
|
19196
19243
|
"@tscircuit/math-utils": "^0.0.29",
|
|
19197
19244
|
"@tscircuit/miniflex": "^0.0.4",
|
|
19198
19245
|
"@tscircuit/ngspice-spice-engine": "^0.0.8",
|
|
19199
|
-
"@tscircuit/props": "^0.0.
|
|
19246
|
+
"@tscircuit/props": "^0.0.426",
|
|
19200
19247
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
19201
19248
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
19202
19249
|
"@tscircuit/schematic-trace-solver": "^v0.0.45",
|
|
@@ -19210,7 +19257,7 @@ var package_default = {
|
|
|
19210
19257
|
"bun-match-svg": "0.0.12",
|
|
19211
19258
|
"calculate-elbow": "^0.0.12",
|
|
19212
19259
|
"chokidar-cli": "^3.0.0",
|
|
19213
|
-
"circuit-json": "^0.0.
|
|
19260
|
+
"circuit-json": "^0.0.328",
|
|
19214
19261
|
"circuit-json-to-bpc": "^0.0.13",
|
|
19215
19262
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
19216
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",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@tscircuit/math-utils": "^0.0.29",
|
|
46
46
|
"@tscircuit/miniflex": "^0.0.4",
|
|
47
47
|
"@tscircuit/ngspice-spice-engine": "^0.0.8",
|
|
48
|
-
"@tscircuit/props": "^0.0.
|
|
48
|
+
"@tscircuit/props": "^0.0.426",
|
|
49
49
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
50
50
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
51
51
|
"@tscircuit/schematic-trace-solver": "^v0.0.45",
|
|
@@ -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",
|