@tscircuit/core 0.0.941 → 0.0.943
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 +35 -7
- package/dist/index.js +146 -28
- package/package.json +5 -7
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { symbols, SchSymbol, BaseSymbolName } from 'schematic-symbols';
|
|
|
11
11
|
import { Matrix } from 'transformation-matrix';
|
|
12
12
|
import { CircuitJsonUtilObjects } from '@tscircuit/circuit-json-util';
|
|
13
13
|
import { PackSolver2 } from 'calculate-packing';
|
|
14
|
-
import { AutoroutingPipelineSolver,
|
|
14
|
+
import { AutoroutingPipelineSolver, AssignableAutoroutingPipeline2 } from '@tscircuit/capacity-autorouter';
|
|
15
15
|
import { CopperPourPipelineSolver } from '@tscircuit/copper-pour-solver';
|
|
16
16
|
import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
|
|
17
17
|
import { GraphicsObject } from 'graphics-debug';
|
|
@@ -127,7 +127,7 @@ interface BoardI {
|
|
|
127
127
|
declare const SOLVERS: {
|
|
128
128
|
PackSolver2: typeof PackSolver2;
|
|
129
129
|
AutoroutingPipelineSolver: typeof AutoroutingPipelineSolver;
|
|
130
|
-
|
|
130
|
+
AssignableAutoroutingPipeline2: typeof AssignableAutoroutingPipeline2;
|
|
131
131
|
CopperPourPipelineSolver: typeof CopperPourPipelineSolver;
|
|
132
132
|
};
|
|
133
133
|
type SolverName = keyof typeof SOLVERS;
|
|
@@ -20206,6 +20206,7 @@ declare class Constraint extends PrimitiveComponent<typeof constraintProps> {
|
|
|
20206
20206
|
|
|
20207
20207
|
declare class FabricationNoteRect extends PrimitiveComponent<typeof fabricationNoteRectProps> {
|
|
20208
20208
|
fabrication_note_rect_id: string | null;
|
|
20209
|
+
isPcbPrimitive: boolean;
|
|
20209
20210
|
get config(): {
|
|
20210
20211
|
componentName: string;
|
|
20211
20212
|
zodProps: zod.ZodObject<Omit<{
|
|
@@ -20365,10 +20366,15 @@ declare class FabricationNoteRect extends PrimitiveComponent<typeof fabricationN
|
|
|
20365
20366
|
width: number;
|
|
20366
20367
|
height: number;
|
|
20367
20368
|
};
|
|
20369
|
+
_moveCircuitJsonElements({ deltaX, deltaY, }: {
|
|
20370
|
+
deltaX: number;
|
|
20371
|
+
deltaY: number;
|
|
20372
|
+
}): void;
|
|
20368
20373
|
}
|
|
20369
20374
|
|
|
20370
20375
|
declare class FabricationNotePath extends PrimitiveComponent<typeof fabricationNotePathProps> {
|
|
20371
20376
|
fabrication_note_path_id: string | null;
|
|
20377
|
+
isPcbPrimitive: boolean;
|
|
20372
20378
|
get config(): {
|
|
20373
20379
|
componentName: string;
|
|
20374
20380
|
zodProps: zod.ZodObject<Omit<{
|
|
@@ -20535,9 +20541,19 @@ declare class FabricationNotePath extends PrimitiveComponent<typeof fabricationN
|
|
|
20535
20541
|
}>;
|
|
20536
20542
|
};
|
|
20537
20543
|
doInitialPcbPrimitiveRender(): void;
|
|
20544
|
+
getPcbSize(): {
|
|
20545
|
+
width: number;
|
|
20546
|
+
height: number;
|
|
20547
|
+
};
|
|
20548
|
+
_moveCircuitJsonElements({ deltaX, deltaY, }: {
|
|
20549
|
+
deltaX: number;
|
|
20550
|
+
deltaY: number;
|
|
20551
|
+
}): void;
|
|
20538
20552
|
}
|
|
20539
20553
|
|
|
20540
20554
|
declare class FabricationNoteText extends PrimitiveComponent<typeof fabricationNoteTextProps> {
|
|
20555
|
+
pcb_fabrication_note_text_id: string | null;
|
|
20556
|
+
isPcbPrimitive: boolean;
|
|
20541
20557
|
get config(): {
|
|
20542
20558
|
componentName: string;
|
|
20543
20559
|
zodProps: zod.ZodObject<{
|
|
@@ -20686,6 +20702,14 @@ declare class FabricationNoteText extends PrimitiveComponent<typeof fabricationN
|
|
|
20686
20702
|
}>;
|
|
20687
20703
|
};
|
|
20688
20704
|
doInitialPcbPrimitiveRender(): void;
|
|
20705
|
+
getPcbSize(): {
|
|
20706
|
+
width: number;
|
|
20707
|
+
height: number;
|
|
20708
|
+
};
|
|
20709
|
+
_moveCircuitJsonElements({ deltaX, deltaY, }: {
|
|
20710
|
+
deltaX: number;
|
|
20711
|
+
deltaY: number;
|
|
20712
|
+
}): void;
|
|
20689
20713
|
}
|
|
20690
20714
|
|
|
20691
20715
|
declare class FabricationNoteDimension extends PrimitiveComponent<typeof fabricationNoteDimensionProps> {
|
|
@@ -20873,6 +20897,10 @@ declare class FabricationNoteDimension extends PrimitiveComponent<typeof fabrica
|
|
|
20873
20897
|
};
|
|
20874
20898
|
private _resolvePoint;
|
|
20875
20899
|
doInitialPcbPrimitiveRender(): void;
|
|
20900
|
+
_moveCircuitJsonElements({ deltaX, deltaY, }: {
|
|
20901
|
+
deltaX: number;
|
|
20902
|
+
deltaY: number;
|
|
20903
|
+
}): void;
|
|
20876
20904
|
getPcbSize(): {
|
|
20877
20905
|
width: number;
|
|
20878
20906
|
height: number;
|
|
@@ -24628,7 +24656,7 @@ declare class SilkscreenCircle extends PrimitiveComponent<typeof silkscreenCircl
|
|
|
24628
24656
|
width: number;
|
|
24629
24657
|
height: number;
|
|
24630
24658
|
};
|
|
24631
|
-
|
|
24659
|
+
_moveCircuitJsonElements({ deltaX, deltaY, }: {
|
|
24632
24660
|
deltaX: number;
|
|
24633
24661
|
deltaY: number;
|
|
24634
24662
|
}): void;
|
|
@@ -24804,7 +24832,7 @@ declare class SilkscreenPath extends PrimitiveComponent<typeof silkscreenPathPro
|
|
|
24804
24832
|
x: number;
|
|
24805
24833
|
y: number;
|
|
24806
24834
|
}): void;
|
|
24807
|
-
|
|
24835
|
+
_moveCircuitJsonElements({ deltaX, deltaY, }: {
|
|
24808
24836
|
deltaX: number;
|
|
24809
24837
|
deltaY: number;
|
|
24810
24838
|
}): void;
|
|
@@ -24970,7 +24998,7 @@ declare class SilkscreenRect extends PrimitiveComponent<typeof silkscreenRectPro
|
|
|
24970
24998
|
width: number;
|
|
24971
24999
|
height: number;
|
|
24972
25000
|
};
|
|
24973
|
-
|
|
25001
|
+
_moveCircuitJsonElements({ deltaX, deltaY, }: {
|
|
24974
25002
|
deltaX: number;
|
|
24975
25003
|
deltaY: number;
|
|
24976
25004
|
}): void;
|
|
@@ -25159,7 +25187,7 @@ declare class SilkscreenText extends PrimitiveComponent<typeof silkscreenTextPro
|
|
|
25159
25187
|
width: number;
|
|
25160
25188
|
height: number;
|
|
25161
25189
|
};
|
|
25162
|
-
|
|
25190
|
+
_moveCircuitJsonElements({ deltaX, deltaY, }: {
|
|
25163
25191
|
deltaX: number;
|
|
25164
25192
|
deltaY: number;
|
|
25165
25193
|
}): void;
|
|
@@ -25310,7 +25338,7 @@ declare class SilkscreenLine extends PrimitiveComponent<typeof silkscreenLinePro
|
|
|
25310
25338
|
width: number;
|
|
25311
25339
|
height: number;
|
|
25312
25340
|
};
|
|
25313
|
-
|
|
25341
|
+
_moveCircuitJsonElements({ deltaX, deltaY, }: {
|
|
25314
25342
|
deltaX: number;
|
|
25315
25343
|
deltaY: number;
|
|
25316
25344
|
}): void;
|
package/dist/index.js
CHANGED
|
@@ -2562,7 +2562,10 @@ var SilkscreenPath = class extends PrimitiveComponent2 {
|
|
|
2562
2562
|
route: newRoute
|
|
2563
2563
|
});
|
|
2564
2564
|
}
|
|
2565
|
-
|
|
2565
|
+
_moveCircuitJsonElements({
|
|
2566
|
+
deltaX,
|
|
2567
|
+
deltaY
|
|
2568
|
+
}) {
|
|
2566
2569
|
if (this.root?.pcbDisabled) return;
|
|
2567
2570
|
const { db } = this.root;
|
|
2568
2571
|
if (!this.pcb_silkscreen_path_id) return;
|
|
@@ -3223,7 +3226,10 @@ var SilkscreenText = class extends PrimitiveComponent2 {
|
|
|
3223
3226
|
const textHeight = fontSize;
|
|
3224
3227
|
return { width: textWidth * fontSize, height: textHeight * fontSize };
|
|
3225
3228
|
}
|
|
3226
|
-
|
|
3229
|
+
_moveCircuitJsonElements({
|
|
3230
|
+
deltaX,
|
|
3231
|
+
deltaY
|
|
3232
|
+
}) {
|
|
3227
3233
|
if (this.root?.pcbDisabled) return;
|
|
3228
3234
|
const { db } = this.root;
|
|
3229
3235
|
for (const id of this.pcb_silkscreen_text_ids) {
|
|
@@ -5589,7 +5595,7 @@ var getObstaclesFromRoute = (route, source_trace_id, { viaDiameter = 0.5 } = {})
|
|
|
5589
5595
|
};
|
|
5590
5596
|
|
|
5591
5597
|
// lib/utils/obstacles/generateApproximatingRects.ts
|
|
5592
|
-
function generateApproximatingRects(rotatedRect, numRects =
|
|
5598
|
+
function generateApproximatingRects(rotatedRect, numRects = 2) {
|
|
5593
5599
|
const { center, width, height, rotation: rotation4 } = rotatedRect;
|
|
5594
5600
|
const rects = [];
|
|
5595
5601
|
const angleRad = rotation4 * Math.PI / 180;
|
|
@@ -9614,24 +9620,24 @@ import {
|
|
|
9614
9620
|
} from "@tscircuit/props";
|
|
9615
9621
|
|
|
9616
9622
|
// lib/utils/autorouting/CapacityMeshAutorouter.ts
|
|
9617
|
-
import
|
|
9623
|
+
import "@tscircuit/capacity-autorouter";
|
|
9618
9624
|
|
|
9619
9625
|
// lib/solvers.ts
|
|
9620
9626
|
import { PackSolver2 } from "calculate-packing";
|
|
9621
9627
|
import {
|
|
9622
9628
|
AutoroutingPipelineSolver,
|
|
9623
|
-
|
|
9629
|
+
AssignableAutoroutingPipeline2
|
|
9624
9630
|
} from "@tscircuit/capacity-autorouter";
|
|
9625
9631
|
import { CopperPourPipelineSolver } from "@tscircuit/copper-pour-solver";
|
|
9626
9632
|
var SOLVERS = {
|
|
9627
9633
|
PackSolver2,
|
|
9628
9634
|
AutoroutingPipelineSolver,
|
|
9629
|
-
|
|
9635
|
+
AssignableAutoroutingPipeline2,
|
|
9630
9636
|
CopperPourPipelineSolver
|
|
9631
9637
|
};
|
|
9632
9638
|
|
|
9633
9639
|
// lib/utils/autorouting/CapacityMeshAutorouter.ts
|
|
9634
|
-
var
|
|
9640
|
+
var TscircuitAutorouter = class {
|
|
9635
9641
|
input;
|
|
9636
9642
|
isRouting = false;
|
|
9637
9643
|
solver;
|
|
@@ -9649,14 +9655,10 @@ var CapacityMeshAutorouter = class {
|
|
|
9649
9655
|
capacityDepth,
|
|
9650
9656
|
targetMinCapacity,
|
|
9651
9657
|
stepDelay = 0,
|
|
9652
|
-
|
|
9658
|
+
useAssignableSolver = false,
|
|
9653
9659
|
onSolverStarted
|
|
9654
9660
|
} = options;
|
|
9655
|
-
const
|
|
9656
|
-
AutoroutingPipelineSolver: AutoroutingPipelineSolver2,
|
|
9657
|
-
AssignableViaAutoroutingPipelineSolver: AssignableViaAutoroutingPipelineSolver2
|
|
9658
|
-
} = CapacityAutorouter;
|
|
9659
|
-
const solverName = useAssignableViaSolver ? "AssignableViaAutoroutingPipelineSolver" : "AutoroutingPipelineSolver";
|
|
9661
|
+
const solverName = useAssignableSolver ? "AssignableAutoroutingPipeline2" : "AutoroutingPipelineSolver";
|
|
9660
9662
|
const SolverClass = SOLVERS[solverName];
|
|
9661
9663
|
this.solver = new SolverClass(input, {
|
|
9662
9664
|
capacityDepth,
|
|
@@ -14160,11 +14162,11 @@ var Group6 = class extends NormalComponent3 {
|
|
|
14160
14162
|
if (autorouterConfig.algorithmFn) {
|
|
14161
14163
|
autorouter = await autorouterConfig.algorithmFn(simpleRouteJson);
|
|
14162
14164
|
} else {
|
|
14163
|
-
autorouter = new
|
|
14165
|
+
autorouter = new TscircuitAutorouter(simpleRouteJson, {
|
|
14164
14166
|
// Optional configuration parameters
|
|
14165
14167
|
capacityDepth: this.props.autorouter?.capacityDepth,
|
|
14166
14168
|
targetMinCapacity: this.props.autorouter?.targetMinCapacity,
|
|
14167
|
-
|
|
14169
|
+
useAssignableSolver: isLaserPrefabPreset || isSingleLayerBoard,
|
|
14168
14170
|
onSolverStarted: ({ solverName, solverParams }) => this.root?.emit("solver:started", {
|
|
14169
14171
|
type: "solver:started",
|
|
14170
14172
|
solverName,
|
|
@@ -16008,8 +16010,8 @@ var Board = class extends Group6 {
|
|
|
16008
16010
|
y: childOldCenter.y + deltaY
|
|
16009
16011
|
});
|
|
16010
16012
|
}
|
|
16011
|
-
} else if (child.isPcbPrimitive && "
|
|
16012
|
-
child.
|
|
16013
|
+
} else if (child.isPcbPrimitive && "_moveCircuitJsonElements" in child && typeof child._moveCircuitJsonElements === "function") {
|
|
16014
|
+
child._moveCircuitJsonElements({ deltaX, deltaY });
|
|
16013
16015
|
}
|
|
16014
16016
|
}
|
|
16015
16017
|
if (this.pcb_board_id) {
|
|
@@ -17101,6 +17103,7 @@ import { fabricationNoteRectProps } from "@tscircuit/props";
|
|
|
17101
17103
|
import "transformation-matrix";
|
|
17102
17104
|
var FabricationNoteRect = class extends PrimitiveComponent2 {
|
|
17103
17105
|
fabrication_note_rect_id = null;
|
|
17106
|
+
isPcbPrimitive = true;
|
|
17104
17107
|
get config() {
|
|
17105
17108
|
return {
|
|
17106
17109
|
componentName: "FabricationNoteRect",
|
|
@@ -17146,6 +17149,23 @@ var FabricationNoteRect = class extends PrimitiveComponent2 {
|
|
|
17146
17149
|
const { _parsedProps: props } = this;
|
|
17147
17150
|
return { width: props.width, height: props.height };
|
|
17148
17151
|
}
|
|
17152
|
+
_moveCircuitJsonElements({
|
|
17153
|
+
deltaX,
|
|
17154
|
+
deltaY
|
|
17155
|
+
}) {
|
|
17156
|
+
if (this.root?.pcbDisabled) return;
|
|
17157
|
+
const { db } = this.root;
|
|
17158
|
+
if (!this.fabrication_note_rect_id) return;
|
|
17159
|
+
const rect = db.pcb_fabrication_note_rect.get(this.fabrication_note_rect_id);
|
|
17160
|
+
if (rect) {
|
|
17161
|
+
db.pcb_fabrication_note_rect.update(this.fabrication_note_rect_id, {
|
|
17162
|
+
center: {
|
|
17163
|
+
x: rect.center.x + deltaX,
|
|
17164
|
+
y: rect.center.y + deltaY
|
|
17165
|
+
}
|
|
17166
|
+
});
|
|
17167
|
+
}
|
|
17168
|
+
}
|
|
17149
17169
|
};
|
|
17150
17170
|
|
|
17151
17171
|
// lib/components/primitive-components/FabricationNotePath.ts
|
|
@@ -17153,6 +17173,7 @@ import { fabricationNotePathProps } from "@tscircuit/props";
|
|
|
17153
17173
|
import { applyToPoint as applyToPoint10 } from "transformation-matrix";
|
|
17154
17174
|
var FabricationNotePath = class extends PrimitiveComponent2 {
|
|
17155
17175
|
fabrication_note_path_id = null;
|
|
17176
|
+
isPcbPrimitive = true;
|
|
17156
17177
|
get config() {
|
|
17157
17178
|
return {
|
|
17158
17179
|
componentName: "FabricationNotePath",
|
|
@@ -17192,11 +17213,46 @@ var FabricationNotePath = class extends PrimitiveComponent2 {
|
|
|
17192
17213
|
});
|
|
17193
17214
|
this.fabrication_note_path_id = fabrication_note_path.pcb_fabrication_note_path_id;
|
|
17194
17215
|
}
|
|
17216
|
+
getPcbSize() {
|
|
17217
|
+
const { _parsedProps: props } = this;
|
|
17218
|
+
if (props.route.length === 0) return { width: 0, height: 0 };
|
|
17219
|
+
const xs = props.route.map(
|
|
17220
|
+
(point2) => typeof point2.x === "string" ? parseFloat(point2.x) : point2.x
|
|
17221
|
+
);
|
|
17222
|
+
const ys = props.route.map(
|
|
17223
|
+
(point2) => typeof point2.y === "string" ? parseFloat(point2.y) : point2.y
|
|
17224
|
+
);
|
|
17225
|
+
const minX = Math.min(...xs);
|
|
17226
|
+
const maxX = Math.max(...xs);
|
|
17227
|
+
const minY = Math.min(...ys);
|
|
17228
|
+
const maxY = Math.max(...ys);
|
|
17229
|
+
return { width: maxX - minX, height: maxY - minY };
|
|
17230
|
+
}
|
|
17231
|
+
_moveCircuitJsonElements({
|
|
17232
|
+
deltaX,
|
|
17233
|
+
deltaY
|
|
17234
|
+
}) {
|
|
17235
|
+
if (this.root?.pcbDisabled) return;
|
|
17236
|
+
const { db } = this.root;
|
|
17237
|
+
if (!this.fabrication_note_path_id) return;
|
|
17238
|
+
const path = db.pcb_fabrication_note_path.get(this.fabrication_note_path_id);
|
|
17239
|
+
if (path) {
|
|
17240
|
+
db.pcb_fabrication_note_path.update(this.fabrication_note_path_id, {
|
|
17241
|
+
route: path.route.map((p) => ({
|
|
17242
|
+
...p,
|
|
17243
|
+
x: p.x + deltaX,
|
|
17244
|
+
y: p.y + deltaY
|
|
17245
|
+
}))
|
|
17246
|
+
});
|
|
17247
|
+
}
|
|
17248
|
+
}
|
|
17195
17249
|
};
|
|
17196
17250
|
|
|
17197
17251
|
// lib/components/primitive-components/FabricationNoteText.ts
|
|
17198
17252
|
import { fabricationNoteTextProps } from "@tscircuit/props";
|
|
17199
17253
|
var FabricationNoteText = class extends PrimitiveComponent2 {
|
|
17254
|
+
pcb_fabrication_note_text_id = null;
|
|
17255
|
+
isPcbPrimitive = true;
|
|
17200
17256
|
get config() {
|
|
17201
17257
|
return {
|
|
17202
17258
|
componentName: "FabricationNoteText",
|
|
@@ -17210,7 +17266,7 @@ var FabricationNoteText = class extends PrimitiveComponent2 {
|
|
|
17210
17266
|
const { pcbX, pcbY } = this.getResolvedPcbPositionProp();
|
|
17211
17267
|
const container = this.getPrimitiveContainer();
|
|
17212
17268
|
const subcircuit = this.getSubcircuit();
|
|
17213
|
-
db.pcb_fabrication_note_text.insert({
|
|
17269
|
+
const pcb_fabrication_note_text = db.pcb_fabrication_note_text.insert({
|
|
17214
17270
|
anchor_alignment: props.anchorAlignment,
|
|
17215
17271
|
anchor_position: {
|
|
17216
17272
|
x: pcbX,
|
|
@@ -17225,6 +17281,35 @@ var FabricationNoteText = class extends PrimitiveComponent2 {
|
|
|
17225
17281
|
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
17226
17282
|
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
17227
17283
|
});
|
|
17284
|
+
this.pcb_fabrication_note_text_id = pcb_fabrication_note_text.pcb_fabrication_note_text_id;
|
|
17285
|
+
}
|
|
17286
|
+
getPcbSize() {
|
|
17287
|
+
const { _parsedProps: props } = this;
|
|
17288
|
+
const fontSize = typeof props.fontSize === "string" ? parseFloat(props.fontSize) : props.fontSize ?? 1;
|
|
17289
|
+
const charWidth = fontSize * 0.6;
|
|
17290
|
+
const width = (props.text ?? "").length * charWidth;
|
|
17291
|
+
const height = fontSize;
|
|
17292
|
+
return { width, height };
|
|
17293
|
+
}
|
|
17294
|
+
_moveCircuitJsonElements({
|
|
17295
|
+
deltaX,
|
|
17296
|
+
deltaY
|
|
17297
|
+
}) {
|
|
17298
|
+
if (this.root?.pcbDisabled) return;
|
|
17299
|
+
const { db } = this.root;
|
|
17300
|
+
if (this.pcb_fabrication_note_text_id) {
|
|
17301
|
+
const text = db.pcb_fabrication_note_text.get(
|
|
17302
|
+
this.pcb_fabrication_note_text_id
|
|
17303
|
+
);
|
|
17304
|
+
if (text) {
|
|
17305
|
+
db.pcb_fabrication_note_text.update(this.pcb_fabrication_note_text_id, {
|
|
17306
|
+
anchor_position: {
|
|
17307
|
+
x: text.anchor_position.x + deltaX,
|
|
17308
|
+
y: text.anchor_position.y + deltaY
|
|
17309
|
+
}
|
|
17310
|
+
});
|
|
17311
|
+
}
|
|
17312
|
+
}
|
|
17228
17313
|
}
|
|
17229
17314
|
};
|
|
17230
17315
|
|
|
@@ -17293,6 +17378,32 @@ var FabricationNoteDimension = class extends PrimitiveComponent2 {
|
|
|
17293
17378
|
);
|
|
17294
17379
|
this.fabrication_note_dimension_id = fabrication_note_dimension.pcb_fabrication_note_dimension_id;
|
|
17295
17380
|
}
|
|
17381
|
+
_moveCircuitJsonElements({
|
|
17382
|
+
deltaX,
|
|
17383
|
+
deltaY
|
|
17384
|
+
}) {
|
|
17385
|
+
if (this.root?.pcbDisabled) return;
|
|
17386
|
+
const { db } = this.root;
|
|
17387
|
+
if (!this.fabrication_note_dimension_id) return;
|
|
17388
|
+
const dimension = db.pcb_fabrication_note_dimension.get(
|
|
17389
|
+
this.fabrication_note_dimension_id
|
|
17390
|
+
);
|
|
17391
|
+
if (dimension) {
|
|
17392
|
+
db.pcb_fabrication_note_dimension.update(
|
|
17393
|
+
this.fabrication_note_dimension_id,
|
|
17394
|
+
{
|
|
17395
|
+
from: {
|
|
17396
|
+
x: dimension.from.x + deltaX,
|
|
17397
|
+
y: dimension.from.y + deltaY
|
|
17398
|
+
},
|
|
17399
|
+
to: {
|
|
17400
|
+
x: dimension.to.x + deltaX,
|
|
17401
|
+
y: dimension.to.y + deltaY
|
|
17402
|
+
}
|
|
17403
|
+
}
|
|
17404
|
+
);
|
|
17405
|
+
}
|
|
17406
|
+
}
|
|
17296
17407
|
getPcbSize() {
|
|
17297
17408
|
const transform = this._computePcbGlobalTransformBeforeLayout();
|
|
17298
17409
|
const from = this._resolvePoint(this._parsedProps.from, transform);
|
|
@@ -17974,7 +18085,10 @@ var SilkscreenCircle = class extends PrimitiveComponent2 {
|
|
|
17974
18085
|
const diameter = props.radius * 2;
|
|
17975
18086
|
return { width: diameter, height: diameter };
|
|
17976
18087
|
}
|
|
17977
|
-
|
|
18088
|
+
_moveCircuitJsonElements({
|
|
18089
|
+
deltaX,
|
|
18090
|
+
deltaY
|
|
18091
|
+
}) {
|
|
17978
18092
|
if (this.root?.pcbDisabled) return;
|
|
17979
18093
|
const { db } = this.root;
|
|
17980
18094
|
if (!this.pcb_silkscreen_circle_id) return;
|
|
@@ -18036,7 +18150,10 @@ var SilkscreenRect = class extends PrimitiveComponent2 {
|
|
|
18036
18150
|
const { _parsedProps: props } = this;
|
|
18037
18151
|
return { width: props.width, height: props.height };
|
|
18038
18152
|
}
|
|
18039
|
-
|
|
18153
|
+
_moveCircuitJsonElements({
|
|
18154
|
+
deltaX,
|
|
18155
|
+
deltaY
|
|
18156
|
+
}) {
|
|
18040
18157
|
if (this.root?.pcbDisabled) return;
|
|
18041
18158
|
const { db } = this.root;
|
|
18042
18159
|
if (!this.pcb_silkscreen_rect_id) return;
|
|
@@ -18095,7 +18212,10 @@ var SilkscreenLine = class extends PrimitiveComponent2 {
|
|
|
18095
18212
|
const height = Math.abs(props.y2 - props.y1);
|
|
18096
18213
|
return { width, height };
|
|
18097
18214
|
}
|
|
18098
|
-
|
|
18215
|
+
_moveCircuitJsonElements({
|
|
18216
|
+
deltaX,
|
|
18217
|
+
deltaY
|
|
18218
|
+
}) {
|
|
18099
18219
|
if (this.root?.pcbDisabled) return;
|
|
18100
18220
|
const { db } = this.root;
|
|
18101
18221
|
if (!this.pcb_silkscreen_line_id) return;
|
|
@@ -19789,7 +19909,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
19789
19909
|
var package_default = {
|
|
19790
19910
|
name: "@tscircuit/core",
|
|
19791
19911
|
type: "module",
|
|
19792
|
-
version: "0.0.
|
|
19912
|
+
version: "0.0.942",
|
|
19793
19913
|
types: "dist/index.d.ts",
|
|
19794
19914
|
main: "dist/index.js",
|
|
19795
19915
|
module: "dist/index.js",
|
|
@@ -19820,21 +19940,19 @@ var package_default = {
|
|
|
19820
19940
|
devDependencies: {
|
|
19821
19941
|
"@biomejs/biome": "^1.8.3",
|
|
19822
19942
|
"@resvg/resvg-js": "^2.6.2",
|
|
19823
|
-
"@tscircuit/capacity-autorouter": "^0.0.
|
|
19943
|
+
"@tscircuit/capacity-autorouter": "^0.0.194",
|
|
19824
19944
|
"@tscircuit/checks": "^0.0.87",
|
|
19825
19945
|
"@tscircuit/circuit-json-util": "^0.0.73",
|
|
19826
19946
|
"@tscircuit/common": "^0.0.20",
|
|
19827
19947
|
"@tscircuit/copper-pour-solver": "^0.0.14",
|
|
19828
19948
|
"@tscircuit/footprinter": "^0.0.236",
|
|
19829
|
-
"@tscircuit/
|
|
19830
|
-
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
19949
|
+
"@tscircuit/infgrid-ijump-astar": "^0.0.35",
|
|
19831
19950
|
"@tscircuit/log-soup": "^1.0.2",
|
|
19832
19951
|
"@tscircuit/matchpack": "^0.0.16",
|
|
19833
19952
|
"@tscircuit/math-utils": "^0.0.29",
|
|
19834
19953
|
"@tscircuit/miniflex": "^0.0.4",
|
|
19835
19954
|
"@tscircuit/ngspice-spice-engine": "^0.0.8",
|
|
19836
19955
|
"@tscircuit/props": "^0.0.435",
|
|
19837
|
-
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
19838
19956
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
19839
19957
|
"@tscircuit/schematic-trace-solver": "^v0.0.45",
|
|
19840
19958
|
"@tscircuit/solver-utils": "^0.0.3",
|
|
@@ -19871,7 +19989,8 @@ var package_default = {
|
|
|
19871
19989
|
"schematic-symbols": "^0.0.202",
|
|
19872
19990
|
spicey: "^0.0.14",
|
|
19873
19991
|
"ts-expect": "^1.3.0",
|
|
19874
|
-
tsup: "^8.2.4"
|
|
19992
|
+
tsup: "^8.2.4",
|
|
19993
|
+
"@tscircuit/soup-util": "^0.0.41"
|
|
19875
19994
|
},
|
|
19876
19995
|
peerDependencies: {
|
|
19877
19996
|
"@tscircuit/capacity-autorouter": "*",
|
|
@@ -19881,7 +20000,6 @@ var package_default = {
|
|
|
19881
20000
|
"@tscircuit/infgrid-ijump-astar": "*",
|
|
19882
20001
|
"@tscircuit/math-utils": "*",
|
|
19883
20002
|
"@tscircuit/props": "*",
|
|
19884
|
-
"@tscircuit/schematic-autolayout": "*",
|
|
19885
20003
|
"@tscircuit/schematic-match-adapt": "*",
|
|
19886
20004
|
"circuit-json-to-bpc": "*",
|
|
19887
20005
|
"bpc-graph": "*",
|
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.943",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -32,21 +32,19 @@
|
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@biomejs/biome": "^1.8.3",
|
|
34
34
|
"@resvg/resvg-js": "^2.6.2",
|
|
35
|
-
"@tscircuit/capacity-autorouter": "^0.0.
|
|
35
|
+
"@tscircuit/capacity-autorouter": "^0.0.194",
|
|
36
36
|
"@tscircuit/checks": "^0.0.87",
|
|
37
37
|
"@tscircuit/circuit-json-util": "^0.0.73",
|
|
38
38
|
"@tscircuit/common": "^0.0.20",
|
|
39
39
|
"@tscircuit/copper-pour-solver": "^0.0.14",
|
|
40
40
|
"@tscircuit/footprinter": "^0.0.236",
|
|
41
|
-
"@tscircuit/
|
|
42
|
-
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
41
|
+
"@tscircuit/infgrid-ijump-astar": "^0.0.35",
|
|
43
42
|
"@tscircuit/log-soup": "^1.0.2",
|
|
44
43
|
"@tscircuit/matchpack": "^0.0.16",
|
|
45
44
|
"@tscircuit/math-utils": "^0.0.29",
|
|
46
45
|
"@tscircuit/miniflex": "^0.0.4",
|
|
47
46
|
"@tscircuit/ngspice-spice-engine": "^0.0.8",
|
|
48
47
|
"@tscircuit/props": "^0.0.435",
|
|
49
|
-
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
50
48
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
51
49
|
"@tscircuit/schematic-trace-solver": "^v0.0.45",
|
|
52
50
|
"@tscircuit/solver-utils": "^0.0.3",
|
|
@@ -83,7 +81,8 @@
|
|
|
83
81
|
"schematic-symbols": "^0.0.202",
|
|
84
82
|
"spicey": "^0.0.14",
|
|
85
83
|
"ts-expect": "^1.3.0",
|
|
86
|
-
"tsup": "^8.2.4"
|
|
84
|
+
"tsup": "^8.2.4",
|
|
85
|
+
"@tscircuit/soup-util": "^0.0.41"
|
|
87
86
|
},
|
|
88
87
|
"peerDependencies": {
|
|
89
88
|
"@tscircuit/capacity-autorouter": "*",
|
|
@@ -93,7 +92,6 @@
|
|
|
93
92
|
"@tscircuit/infgrid-ijump-astar": "*",
|
|
94
93
|
"@tscircuit/math-utils": "*",
|
|
95
94
|
"@tscircuit/props": "*",
|
|
96
|
-
"@tscircuit/schematic-autolayout": "*",
|
|
97
95
|
"@tscircuit/schematic-match-adapt": "*",
|
|
98
96
|
"circuit-json-to-bpc": "*",
|
|
99
97
|
"bpc-graph": "*",
|