@tscircuit/core 0.0.776 → 0.0.777
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 +27 -18
- package/dist/index.js +13 -3
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -661,8 +661,8 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
661
661
|
})[];
|
|
662
662
|
key?: string | undefined;
|
|
663
663
|
highlightColor?: string | undefined;
|
|
664
|
-
maxLength?: number | undefined;
|
|
665
664
|
thickness?: number | undefined;
|
|
665
|
+
maxLength?: number | undefined;
|
|
666
666
|
schematicRouteHints?: {
|
|
667
667
|
x: number;
|
|
668
668
|
y: number;
|
|
@@ -687,8 +687,8 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
687
687
|
})[];
|
|
688
688
|
key?: string | undefined;
|
|
689
689
|
highlightColor?: string | undefined;
|
|
690
|
-
maxLength?: string | number | undefined;
|
|
691
690
|
thickness?: string | number | undefined;
|
|
691
|
+
maxLength?: string | number | undefined;
|
|
692
692
|
schematicRouteHints?: {
|
|
693
693
|
x: string | number;
|
|
694
694
|
y: string | number;
|
|
@@ -786,8 +786,8 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
786
786
|
};
|
|
787
787
|
key?: string | undefined;
|
|
788
788
|
highlightColor?: string | undefined;
|
|
789
|
-
maxLength?: number | undefined;
|
|
790
789
|
thickness?: number | undefined;
|
|
790
|
+
maxLength?: number | undefined;
|
|
791
791
|
schematicRouteHints?: {
|
|
792
792
|
x: number;
|
|
793
793
|
y: number;
|
|
@@ -815,8 +815,8 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
815
815
|
};
|
|
816
816
|
key?: string | undefined;
|
|
817
817
|
highlightColor?: string | undefined;
|
|
818
|
-
maxLength?: string | number | undefined;
|
|
819
818
|
thickness?: string | number | undefined;
|
|
819
|
+
maxLength?: string | number | undefined;
|
|
820
820
|
schematicRouteHints?: {
|
|
821
821
|
x: string | number;
|
|
822
822
|
y: string | number;
|
|
@@ -1294,13 +1294,14 @@ declare class Group<Props extends z.ZodType<any, any, any> = typeof groupProps>
|
|
|
1294
1294
|
|
|
1295
1295
|
declare class Board extends Group<typeof boardProps> {
|
|
1296
1296
|
pcb_board_id: string | null;
|
|
1297
|
+
source_board_id: string | null;
|
|
1297
1298
|
_drcChecksComplete: boolean;
|
|
1298
1299
|
_connectedSchematicPortPairs: Set<string>;
|
|
1299
1300
|
get isSubcircuit(): boolean;
|
|
1300
1301
|
get isGroup(): boolean;
|
|
1301
1302
|
get config(): {
|
|
1302
1303
|
componentName: string;
|
|
1303
|
-
zodProps: zod.ZodObject<{
|
|
1304
|
+
zodProps: zod.ZodObject<Omit<{
|
|
1304
1305
|
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1305
1306
|
pcbY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1306
1307
|
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
@@ -1970,10 +1971,11 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1970
1971
|
}>, "many">>;
|
|
1971
1972
|
outlineOffsetX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1972
1973
|
outlineOffsetY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1973
|
-
} & {
|
|
1974
|
+
}, "connections"> & {
|
|
1974
1975
|
material: zod.ZodDefault<zod.ZodEnum<["fr4", "fr1"]>>;
|
|
1975
1976
|
layers: zod.ZodDefault<zod.ZodUnion<[zod.ZodLiteral<2>, zod.ZodLiteral<4>]>>;
|
|
1976
1977
|
borderRadius: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1978
|
+
thickness: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
1977
1979
|
boardAnchorPosition: zod.ZodOptional<zod.ZodObject<{
|
|
1978
1980
|
x: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
1979
1981
|
y: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
@@ -1985,6 +1987,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1985
1987
|
y: string | number;
|
|
1986
1988
|
}>>;
|
|
1987
1989
|
boardAnchorAlignment: zod.ZodOptional<zod.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
|
|
1990
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
1988
1991
|
solderMaskColor: zod.ZodOptional<zod.ZodType<_tscircuit_props.BoardColor, zod.ZodTypeDef, _tscircuit_props.BoardColor>>;
|
|
1989
1992
|
topSolderMaskColor: zod.ZodOptional<zod.ZodType<_tscircuit_props.BoardColor, zod.ZodTypeDef, _tscircuit_props.BoardColor>>;
|
|
1990
1993
|
bottomSolderMaskColor: zod.ZodOptional<zod.ZodType<_tscircuit_props.BoardColor, zod.ZodTypeDef, _tscircuit_props.BoardColor>>;
|
|
@@ -2056,7 +2059,6 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2056
2059
|
matchAdaptTemplate?: any;
|
|
2057
2060
|
schTitle?: string | undefined;
|
|
2058
2061
|
showAsSchematicBox?: boolean | undefined;
|
|
2059
|
-
connections?: Record<string, string | readonly string[] | string[] | undefined> | undefined;
|
|
2060
2062
|
schPinArrangement?: {
|
|
2061
2063
|
leftSize?: number | undefined;
|
|
2062
2064
|
topSize?: number | undefined;
|
|
@@ -2270,7 +2272,9 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2270
2272
|
}[] | undefined;
|
|
2271
2273
|
outlineOffsetX?: number | undefined;
|
|
2272
2274
|
outlineOffsetY?: number | undefined;
|
|
2275
|
+
title?: string | undefined;
|
|
2273
2276
|
borderRadius?: number | undefined;
|
|
2277
|
+
thickness?: number | undefined;
|
|
2274
2278
|
boardAnchorPosition?: {
|
|
2275
2279
|
x: number;
|
|
2276
2280
|
y: number;
|
|
@@ -2347,7 +2351,6 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2347
2351
|
matchAdaptTemplate?: any;
|
|
2348
2352
|
schTitle?: string | undefined;
|
|
2349
2353
|
showAsSchematicBox?: boolean | undefined;
|
|
2350
|
-
connections?: Record<string, string | readonly string[] | string[] | undefined> | undefined;
|
|
2351
2354
|
schPinArrangement?: {
|
|
2352
2355
|
leftSize?: number | undefined;
|
|
2353
2356
|
topSize?: number | undefined;
|
|
@@ -2563,9 +2566,11 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2563
2566
|
}[] | undefined;
|
|
2564
2567
|
outlineOffsetX?: string | number | undefined;
|
|
2565
2568
|
outlineOffsetY?: string | number | undefined;
|
|
2569
|
+
title?: string | undefined;
|
|
2566
2570
|
material?: "fr4" | "fr1" | undefined;
|
|
2567
2571
|
layers?: 2 | 4 | undefined;
|
|
2568
2572
|
borderRadius?: string | number | undefined;
|
|
2573
|
+
thickness?: string | number | undefined;
|
|
2569
2574
|
boardAnchorPosition?: {
|
|
2570
2575
|
x: string | number;
|
|
2571
2576
|
y: string | number;
|
|
@@ -2592,6 +2597,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2592
2597
|
* the project name, version, or url is set.
|
|
2593
2598
|
*/
|
|
2594
2599
|
private _addBoardInformationToSilkscreen;
|
|
2600
|
+
doInitialSourceRender(): void;
|
|
2595
2601
|
doInitialPcbComponentRender(): void;
|
|
2596
2602
|
removePcbComponentRender(): void;
|
|
2597
2603
|
_computePcbGlobalTransformBeforeLayout(): Matrix;
|
|
@@ -17770,6 +17776,7 @@ declare class CadModel extends PrimitiveComponent<typeof cadmodelProps> {
|
|
|
17770
17776
|
modelUnitToMmScale: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
17771
17777
|
} & {
|
|
17772
17778
|
modelUrl: z.ZodString;
|
|
17779
|
+
stepUrl: z.ZodOptional<z.ZodString>;
|
|
17773
17780
|
} & {
|
|
17774
17781
|
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
17775
17782
|
pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -17792,6 +17799,7 @@ declare class CadModel extends PrimitiveComponent<typeof cadmodelProps> {
|
|
|
17792
17799
|
z: number;
|
|
17793
17800
|
} | undefined;
|
|
17794
17801
|
modelUnitToMmScale?: number | undefined;
|
|
17802
|
+
stepUrl?: string | undefined;
|
|
17795
17803
|
pcbX?: number | undefined;
|
|
17796
17804
|
pcbY?: number | undefined;
|
|
17797
17805
|
pcbZ?: number | undefined;
|
|
@@ -17813,6 +17821,7 @@ declare class CadModel extends PrimitiveComponent<typeof cadmodelProps> {
|
|
|
17813
17821
|
z: string | number;
|
|
17814
17822
|
} | undefined;
|
|
17815
17823
|
modelUnitToMmScale?: string | number | undefined;
|
|
17824
|
+
stepUrl?: string | undefined;
|
|
17816
17825
|
pcbX?: string | number | undefined;
|
|
17817
17826
|
pcbY?: string | number | undefined;
|
|
17818
17827
|
pcbZ?: string | number | undefined;
|
|
@@ -32479,8 +32488,8 @@ declare class SchematicRect extends PrimitiveComponent<typeof schematicRectProps
|
|
|
32479
32488
|
width: number;
|
|
32480
32489
|
height: number;
|
|
32481
32490
|
color: string;
|
|
32482
|
-
isDashed: boolean;
|
|
32483
32491
|
isFilled: boolean;
|
|
32492
|
+
isDashed: boolean;
|
|
32484
32493
|
rotation: number;
|
|
32485
32494
|
schX?: number | undefined;
|
|
32486
32495
|
schY?: number | undefined;
|
|
@@ -32493,8 +32502,8 @@ declare class SchematicRect extends PrimitiveComponent<typeof schematicRectProps
|
|
|
32493
32502
|
schY?: string | number | undefined;
|
|
32494
32503
|
strokeWidth?: string | number | undefined;
|
|
32495
32504
|
color?: string | undefined;
|
|
32496
|
-
isDashed?: boolean | undefined;
|
|
32497
32505
|
isFilled?: boolean | undefined;
|
|
32506
|
+
isDashed?: boolean | undefined;
|
|
32498
32507
|
fillColor?: string | undefined;
|
|
32499
32508
|
rotation?: string | number | undefined;
|
|
32500
32509
|
}>;
|
|
@@ -32583,8 +32592,8 @@ declare class SchematicCircle extends PrimitiveComponent<typeof schematicCircleP
|
|
|
32583
32592
|
};
|
|
32584
32593
|
radius: number;
|
|
32585
32594
|
color: string;
|
|
32586
|
-
isDashed: boolean;
|
|
32587
32595
|
isFilled: boolean;
|
|
32596
|
+
isDashed: boolean;
|
|
32588
32597
|
strokeWidth?: number | undefined;
|
|
32589
32598
|
fillColor?: string | undefined;
|
|
32590
32599
|
}, {
|
|
@@ -32595,8 +32604,8 @@ declare class SchematicCircle extends PrimitiveComponent<typeof schematicCircleP
|
|
|
32595
32604
|
radius: string | number;
|
|
32596
32605
|
strokeWidth?: string | number | undefined;
|
|
32597
32606
|
color?: string | undefined;
|
|
32598
|
-
isDashed?: boolean | undefined;
|
|
32599
32607
|
isFilled?: boolean | undefined;
|
|
32608
|
+
isDashed?: boolean | undefined;
|
|
32600
32609
|
fillColor?: string | undefined;
|
|
32601
32610
|
}>;
|
|
32602
32611
|
};
|
|
@@ -32638,8 +32647,8 @@ declare class SchematicBox extends PrimitiveComponent<typeof schematicBoxProps>
|
|
|
32638
32647
|
paddingBottom?: number | undefined;
|
|
32639
32648
|
width?: number | undefined;
|
|
32640
32649
|
height?: number | undefined;
|
|
32641
|
-
overlay?: string[] | undefined;
|
|
32642
32650
|
title?: string | undefined;
|
|
32651
|
+
overlay?: string[] | undefined;
|
|
32643
32652
|
titleColor?: string | undefined;
|
|
32644
32653
|
titleFontSize?: number | undefined;
|
|
32645
32654
|
}, {
|
|
@@ -32652,8 +32661,8 @@ declare class SchematicBox extends PrimitiveComponent<typeof schematicBoxProps>
|
|
|
32652
32661
|
paddingBottom?: string | number | undefined;
|
|
32653
32662
|
width?: string | number | undefined;
|
|
32654
32663
|
height?: string | number | undefined;
|
|
32655
|
-
overlay?: string[] | undefined;
|
|
32656
32664
|
title?: string | undefined;
|
|
32665
|
+
overlay?: string[] | undefined;
|
|
32657
32666
|
titleAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
32658
32667
|
titleColor?: string | undefined;
|
|
32659
32668
|
titleFontSize?: string | number | undefined;
|
|
@@ -32672,8 +32681,8 @@ declare class SchematicBox extends PrimitiveComponent<typeof schematicBoxProps>
|
|
|
32672
32681
|
paddingBottom?: number | undefined;
|
|
32673
32682
|
width?: number | undefined;
|
|
32674
32683
|
height?: number | undefined;
|
|
32675
|
-
overlay?: string[] | undefined;
|
|
32676
32684
|
title?: string | undefined;
|
|
32685
|
+
overlay?: string[] | undefined;
|
|
32677
32686
|
titleColor?: string | undefined;
|
|
32678
32687
|
titleFontSize?: number | undefined;
|
|
32679
32688
|
}, {
|
|
@@ -32686,8 +32695,8 @@ declare class SchematicBox extends PrimitiveComponent<typeof schematicBoxProps>
|
|
|
32686
32695
|
paddingBottom?: string | number | undefined;
|
|
32687
32696
|
width?: string | number | undefined;
|
|
32688
32697
|
height?: string | number | undefined;
|
|
32689
|
-
overlay?: string[] | undefined;
|
|
32690
32698
|
title?: string | undefined;
|
|
32699
|
+
overlay?: string[] | undefined;
|
|
32691
32700
|
titleAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
32692
32701
|
titleColor?: string | undefined;
|
|
32693
32702
|
titleFontSize?: string | number | undefined;
|
|
@@ -32706,8 +32715,8 @@ declare class SchematicBox extends PrimitiveComponent<typeof schematicBoxProps>
|
|
|
32706
32715
|
paddingBottom?: number | undefined;
|
|
32707
32716
|
width?: number | undefined;
|
|
32708
32717
|
height?: number | undefined;
|
|
32709
|
-
overlay?: string[] | undefined;
|
|
32710
32718
|
title?: string | undefined;
|
|
32719
|
+
overlay?: string[] | undefined;
|
|
32711
32720
|
titleColor?: string | undefined;
|
|
32712
32721
|
titleFontSize?: number | undefined;
|
|
32713
32722
|
}, {
|
|
@@ -32720,8 +32729,8 @@ declare class SchematicBox extends PrimitiveComponent<typeof schematicBoxProps>
|
|
|
32720
32729
|
paddingBottom?: string | number | undefined;
|
|
32721
32730
|
width?: string | number | undefined;
|
|
32722
32731
|
height?: string | number | undefined;
|
|
32723
|
-
overlay?: string[] | undefined;
|
|
32724
32732
|
title?: string | undefined;
|
|
32733
|
+
overlay?: string[] | undefined;
|
|
32725
32734
|
titleAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
32726
32735
|
titleColor?: string | undefined;
|
|
32727
32736
|
titleFontSize?: string | number | undefined;
|
package/dist/index.js
CHANGED
|
@@ -12962,6 +12962,7 @@ var getRoundedRectOutline = (width, height, radius) => {
|
|
|
12962
12962
|
};
|
|
12963
12963
|
var Board = class extends Group6 {
|
|
12964
12964
|
pcb_board_id = null;
|
|
12965
|
+
source_board_id = null;
|
|
12965
12966
|
_drcChecksComplete = false;
|
|
12966
12967
|
_connectedSchematicPortPairs = /* @__PURE__ */ new Set();
|
|
12967
12968
|
get isSubcircuit() {
|
|
@@ -13099,6 +13100,15 @@ var Board = class extends Group6 {
|
|
|
13099
13100
|
anchor_position: position
|
|
13100
13101
|
});
|
|
13101
13102
|
}
|
|
13103
|
+
doInitialSourceRender() {
|
|
13104
|
+
super.doInitialSourceRender();
|
|
13105
|
+
const { db } = this.root;
|
|
13106
|
+
const source_board = db.source_board.insert({
|
|
13107
|
+
source_group_id: this.source_group_id,
|
|
13108
|
+
title: this.props.title || this.props.name
|
|
13109
|
+
});
|
|
13110
|
+
this.source_board_id = source_board.source_board_id;
|
|
13111
|
+
}
|
|
13102
13112
|
doInitialPcbComponentRender() {
|
|
13103
13113
|
if (this.root?.pcbDisabled) return;
|
|
13104
13114
|
const { db } = this.root;
|
|
@@ -16195,7 +16205,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
16195
16205
|
var package_default = {
|
|
16196
16206
|
name: "@tscircuit/core",
|
|
16197
16207
|
type: "module",
|
|
16198
|
-
version: "0.0.
|
|
16208
|
+
version: "0.0.776",
|
|
16199
16209
|
types: "dist/index.d.ts",
|
|
16200
16210
|
main: "dist/index.js",
|
|
16201
16211
|
module: "dist/index.js",
|
|
@@ -16235,7 +16245,7 @@ var package_default = {
|
|
|
16235
16245
|
"@tscircuit/matchpack": "^0.0.16",
|
|
16236
16246
|
"@tscircuit/math-utils": "^0.0.21",
|
|
16237
16247
|
"@tscircuit/miniflex": "^0.0.4",
|
|
16238
|
-
"@tscircuit/props": "0.0.
|
|
16248
|
+
"@tscircuit/props": "0.0.357",
|
|
16239
16249
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
16240
16250
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
16241
16251
|
"@tscircuit/schematic-trace-solver": "^0.0.41",
|
|
@@ -16248,7 +16258,7 @@ var package_default = {
|
|
|
16248
16258
|
"bun-match-svg": "0.0.12",
|
|
16249
16259
|
"calculate-elbow": "^0.0.12",
|
|
16250
16260
|
"chokidar-cli": "^3.0.0",
|
|
16251
|
-
"circuit-json": "^0.0.
|
|
16261
|
+
"circuit-json": "^0.0.275",
|
|
16252
16262
|
"circuit-json-to-bpc": "^0.0.13",
|
|
16253
16263
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
16254
16264
|
"circuit-json-to-gltf": "^0.0.7",
|
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.777",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@tscircuit/matchpack": "^0.0.16",
|
|
42
42
|
"@tscircuit/math-utils": "^0.0.21",
|
|
43
43
|
"@tscircuit/miniflex": "^0.0.4",
|
|
44
|
-
"@tscircuit/props": "0.0.
|
|
44
|
+
"@tscircuit/props": "0.0.357",
|
|
45
45
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
46
46
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
47
47
|
"@tscircuit/schematic-trace-solver": "^0.0.41",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"bun-match-svg": "0.0.12",
|
|
55
55
|
"calculate-elbow": "^0.0.12",
|
|
56
56
|
"chokidar-cli": "^3.0.0",
|
|
57
|
-
"circuit-json": "^0.0.
|
|
57
|
+
"circuit-json": "^0.0.275",
|
|
58
58
|
"circuit-json-to-bpc": "^0.0.13",
|
|
59
59
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
60
60
|
"circuit-json-to-gltf": "^0.0.7",
|