@tscircuit/core 0.0.605 → 0.0.606
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 +4 -1
- package/dist/index.js +9 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { CircuitJsonUtilObjects } from '@tscircuit/circuit-json-util';
|
|
|
11
11
|
import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
|
|
12
12
|
import { GraphicsObject } from 'graphics-debug';
|
|
13
13
|
|
|
14
|
-
declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "PcbFootprintStringRender", "InitializePortsFromChildren", "CreateNetsFromProps", "CreateTracesFromProps", "CreateTracesFromNetLabels", "CreateTraceHintsFromProps", "SourceGroupRender", "AssignNameToUnnamedComponents", "SourceRender", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SchematicComponentRender", "SchematicPortRender", "SchematicPrimitiveRender", "SchematicLayout", "SchematicTraceRender", "SchematicReplaceNetLabelsWithSymbols", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "
|
|
14
|
+
declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "PcbFootprintStringRender", "InitializePortsFromChildren", "CreateNetsFromProps", "CreateTracesFromProps", "CreateTracesFromNetLabels", "CreateTraceHintsFromProps", "SourceGroupRender", "AssignNameToUnnamedComponents", "SourceRender", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SchematicComponentRender", "SchematicPortRender", "SchematicPrimitiveRender", "SchematicLayout", "SchematicTraceRender", "SchematicReplaceNetLabelsWithSymbols", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbComponentSizeCalculation", "PcbLayout", "PcbBoardAutoSize", "PcbTraceHintRender", "PcbTraceRender", "PcbRouteNetIslands", "PcbDesignRuleChecks", "CadModelRender", "PartsEngineRender"];
|
|
15
15
|
type RenderPhase = (typeof orderedRenderPhases)[number];
|
|
16
16
|
type RenderPhaseFn<K extends RenderPhase = RenderPhase> = `doInitial${K}` | `update${K}` | `remove${K}`;
|
|
17
17
|
type RenderPhaseStates = Record<RenderPhase, {
|
|
@@ -1154,6 +1154,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1154
1154
|
pcbGridRowGap: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1155
1155
|
pcbGridColumnGap: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1156
1156
|
pcbFlex: zod.ZodOptional<zod.ZodUnion<[zod.ZodBoolean, zod.ZodString]>>;
|
|
1157
|
+
pcbFlexGap: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>>;
|
|
1157
1158
|
pcbFlexDirection: zod.ZodOptional<zod.ZodEnum<["row", "column"]>>;
|
|
1158
1159
|
pcbAlignItems: zod.ZodOptional<zod.ZodEnum<["start", "center", "end", "stretch"]>>;
|
|
1159
1160
|
pcbJustifyContent: zod.ZodOptional<zod.ZodEnum<["start", "center", "end", "stretch", "space-between", "space-around", "space-evenly"]>>;
|
|
@@ -1803,6 +1804,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
1803
1804
|
pcbGridRowGap?: string | number | undefined;
|
|
1804
1805
|
pcbGridColumnGap?: string | number | undefined;
|
|
1805
1806
|
pcbFlex?: string | boolean | undefined;
|
|
1807
|
+
pcbFlexGap?: string | number | undefined;
|
|
1806
1808
|
pcbFlexDirection?: "row" | "column" | undefined;
|
|
1807
1809
|
pcbAlignItems?: "center" | "start" | "end" | "stretch" | undefined;
|
|
1808
1810
|
pcbJustifyContent?: "center" | "start" | "end" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
@@ -2013,6 +2015,7 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
2013
2015
|
pcbGridRowGap?: string | number | undefined;
|
|
2014
2016
|
pcbGridColumnGap?: string | number | undefined;
|
|
2015
2017
|
pcbFlex?: string | boolean | undefined;
|
|
2018
|
+
pcbFlexGap?: string | number | undefined;
|
|
2016
2019
|
pcbFlexDirection?: "row" | "column" | undefined;
|
|
2017
2020
|
pcbAlignItems?: "center" | "start" | "end" | "stretch" | undefined;
|
|
2018
2021
|
pcbJustifyContent?: "center" | "start" | "end" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
|
package/dist/index.js
CHANGED
|
@@ -109,8 +109,8 @@ var orderedRenderPhases = [
|
|
|
109
109
|
"PcbFootprintLayout",
|
|
110
110
|
"PcbPortRender",
|
|
111
111
|
"PcbPortAttachment",
|
|
112
|
-
"PcbLayout",
|
|
113
112
|
"PcbComponentSizeCalculation",
|
|
113
|
+
"PcbLayout",
|
|
114
114
|
"PcbBoardAutoSize",
|
|
115
115
|
"PcbTraceHintRender",
|
|
116
116
|
"PcbTraceRender",
|
|
@@ -8294,9 +8294,14 @@ var Group_doInitialPcbLayoutFlex = (group) => {
|
|
|
8294
8294
|
});
|
|
8295
8295
|
const justify = props.pcbJustifyContent ?? props.justifyContent;
|
|
8296
8296
|
const align = props.pcbAlignItems ?? props.alignItems;
|
|
8297
|
+
const gap = props.pcbFlexGap ?? props.pcbGap ?? props.gap;
|
|
8298
|
+
const direction = props.pcbFlexDirection ?? "row";
|
|
8297
8299
|
const modifiedCircuitJson = layoutCircuitJsonWithFlex(circuitJson, {
|
|
8298
8300
|
justifyContent: justify === "start" ? "flex-start" : justify === "end" ? "flex-end" : justify === "stretch" ? "space-between" : justify ?? "space-between",
|
|
8299
|
-
alignItems: align === "start" ? "flex-start" : align === "end" ? "flex-end" : align ?? "center"
|
|
8301
|
+
alignItems: align === "start" ? "flex-start" : align === "end" ? "flex-end" : align ?? "center",
|
|
8302
|
+
direction,
|
|
8303
|
+
columnGap: typeof gap === "number" ? gap : 0,
|
|
8304
|
+
rowGap: typeof gap === "number" ? gap : 0
|
|
8300
8305
|
});
|
|
8301
8306
|
const pcbSmtPads = db.pcb_smtpad.list();
|
|
8302
8307
|
for (const smtpad of pcbSmtPads) {
|
|
@@ -11370,7 +11375,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
11370
11375
|
var package_default = {
|
|
11371
11376
|
name: "@tscircuit/core",
|
|
11372
11377
|
type: "module",
|
|
11373
|
-
version: "0.0.
|
|
11378
|
+
version: "0.0.605",
|
|
11374
11379
|
types: "dist/index.d.ts",
|
|
11375
11380
|
main: "dist/index.js",
|
|
11376
11381
|
module: "dist/index.js",
|
|
@@ -11401,7 +11406,7 @@ var package_default = {
|
|
|
11401
11406
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
11402
11407
|
"@tscircuit/log-soup": "^1.0.2",
|
|
11403
11408
|
"@tscircuit/math-utils": "^0.0.18",
|
|
11404
|
-
"@tscircuit/props": "^0.0.
|
|
11409
|
+
"@tscircuit/props": "^0.0.276",
|
|
11405
11410
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
11406
11411
|
"@tscircuit/schematic-corpus": "^0.0.110",
|
|
11407
11412
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
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.606",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
33
33
|
"@tscircuit/log-soup": "^1.0.2",
|
|
34
34
|
"@tscircuit/math-utils": "^0.0.18",
|
|
35
|
-
"@tscircuit/props": "^0.0.
|
|
35
|
+
"@tscircuit/props": "^0.0.276",
|
|
36
36
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
37
37
|
"@tscircuit/schematic-corpus": "^0.0.110",
|
|
38
38
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|