@tscircuit/rectdiff 0.0.27 → 0.0.29
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/.github/workflows/bun-pver-release.yml +24 -45
- package/dist/index.d.ts +0 -46
- package/dist/index.js +220 -774
- package/lib/RectDiffPipeline.ts +0 -46
- package/lib/types/srj-types.ts +0 -1
- package/package.json +1 -2
- package/pages/repro/merge-single-layer-node.page.tsx +17 -0
- package/tests/__snapshots__/board-outline.snap.svg +2 -2
- package/tests/solver/__snapshots__/rectDiffGridSolverPipeline.snap.svg +1 -1
- package/tests/solver/both-points-equivalent/__snapshots__/both-points-equivalent.snap.svg +1 -1
- package/tests/solver/bugreport01-be84eb/__snapshots__/bugreport01-be84eb.snap.svg +1 -1
- package/tests/solver/bugreport02-bc4361/__snapshots__/bugreport02-bc4361.snap.svg +1 -1
- package/tests/solver/bugreport03-fe4a17/__snapshots__/bugreport03-fe4a17.snap.svg +1 -1
- package/tests/solver/bugreport07-d3f3be/__snapshots__/bugreport07-d3f3be.snap.svg +1 -1
- package/tests/solver/bugreport08-e3ec95/__snapshots__/bugreport08-e3ec95.snap.svg +1 -1
- package/tests/solver/bugreport09-618e09/__snapshots__/bugreport09-618e09.snap.svg +1 -1
- package/tests/solver/bugreport10-71239a/__snapshots__/bugreport10-71239a.snap.svg +1 -1
- package/tests/solver/bugreport11-b2de3c/__snapshots__/bugreport11-b2de3c.snap.svg +1 -1
- package/tests/solver/bugreport12-35ce1c/__snapshots__/bugreport12-35ce1c.snap.svg +1 -1
- package/tests/solver/bugreport13-b9a758/__snapshots__/bugreport13-b9a758.snap.svg +1 -1
- package/tests/solver/bugreport16-d95f38/__snapshots__/bugreport16-d95f38.snap.svg +1 -1
- package/tests/solver/bugreport19/__snapshots__/bugreport19.snap.svg +1 -1
- package/tests/solver/bugreport20-obstacle-clipping/__snapshots__/bugreport20-obstacle-clipping.snap.svg +1 -1
- package/tests/solver/bugreport21-board-outline/__snapshots__/bugreport21-board-outline.snap.svg +2 -2
- package/tests/solver/bugreport22-2a75ce/__snapshots__/bugreport22-2a75ce.snap.svg +1 -1
- package/tests/solver/bugreport23-LGA15x4/__snapshots__/bugreport23-LGA15x4.snap.svg +1 -1
- package/tests/solver/bugreport24-05597c/__snapshots__/bugreport24-05597c.snap.svg +1 -1
- package/tests/solver/bugreport25-4b1d55/__snapshots__/bugreport25-4b1d55.snap.svg +1 -1
- package/tests/solver/bugreport36-bf8303/__snapshots__/bugreport36-bf8303.snap.svg +1 -1
- package/tests/solver/interaction/__snapshots__/interaction.snap.svg +1 -1
- package/tests/solver/multi-point/__snapshots__/multi-point.snap.svg +1 -1
- package/tests/solver/no-better-path/__snapshots__/no-better-path.snap.svg +1 -1
- package/tests/solver/repros/merge-single-layer-node/merge-single-layer-node.json +861 -0
- package/tests/solver/{bugreport50-multi-support-layer-merge/bugreport50-multi-support-layer-merge.test.ts → repros/merge-single-layer-node/merge-single-layer-node.test.ts} +7 -42
- package/tests/solver/transitivity/__snapshots__/transitivity.snap.svg +2 -2
- package/tsconfig.json +5 -1
- package/vite.config.ts +4 -0
- package/lib/solvers/AdjacentLayerContainmentMergeSolver/AdjacentLayerContainmentMergeSolver.ts +0 -456
- package/lib/solvers/OuterLayerContainmentMergeSolver/OuterLayerContainmentMergeSolver.ts +0 -311
- package/pages/bugreports/bugreport50-multi-support-layer-merge.page.tsx +0 -19
- package/pages/pour.page.tsx +0 -18
- package/test-assets/bugreport49-634662.json +0 -412
- package/tests/solver/bugreport49-634662/__snapshots__/bugreport49-634662.snap.svg +0 -44
- package/tests/solver/bugreport49-634662/bugreport49-634662.test.ts +0 -134
- package/tests/solver/bugreport50-multi-support-layer-merge/__snapshots__/bugreport50-multi-support-layer-merge.snap.svg +0 -44
- package/tests/solver/bugreport50-multi-support-layer-merge/bugreport50-multi-support-layer-merge.json +0 -972
|
@@ -4,7 +4,6 @@ on:
|
|
|
4
4
|
push:
|
|
5
5
|
branches:
|
|
6
6
|
- main
|
|
7
|
-
- '!version-bumps/**'
|
|
8
7
|
workflow_dispatch:
|
|
9
8
|
|
|
10
9
|
env:
|
|
@@ -14,39 +13,35 @@ env:
|
|
|
14
13
|
jobs:
|
|
15
14
|
publish:
|
|
16
15
|
runs-on: ubuntu-latest
|
|
16
|
+
if: ${{ !(github.event_name == 'push' && startsWith(github.event.head_commit.message, 'v')) }}
|
|
17
17
|
steps:
|
|
18
18
|
- uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
token: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
|
|
19
21
|
- name: Setup bun
|
|
20
22
|
uses: oven-sh/setup-bun@v2
|
|
21
23
|
with:
|
|
22
|
-
bun-version:
|
|
23
|
-
- uses: actions/setup-node@
|
|
24
|
+
bun-version: 1.3.1
|
|
25
|
+
- uses: actions/setup-node@v3
|
|
24
26
|
with:
|
|
25
27
|
node-version: 20
|
|
26
28
|
registry-url: https://registry.npmjs.org/
|
|
27
29
|
- run: npm install -g pver
|
|
28
|
-
- run: bun install
|
|
30
|
+
- run: bun install
|
|
29
31
|
- run: bun run build
|
|
30
32
|
- run: pver release --no-push-main
|
|
31
33
|
env:
|
|
32
34
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
33
35
|
GITHUB_TOKEN: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
|
|
34
36
|
|
|
35
|
-
- name: Get package version
|
|
36
|
-
id: package-version
|
|
37
|
-
run: |
|
|
38
|
-
VERSION=$(node -p "require('./package.json').version")
|
|
39
|
-
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
40
|
-
|
|
41
|
-
|
|
42
37
|
- name: Create Pull Request
|
|
43
38
|
id: create-pr
|
|
44
|
-
uses: peter-evans/create-pull-request@
|
|
39
|
+
uses: peter-evans/create-pull-request@v5
|
|
45
40
|
with:
|
|
46
41
|
commit-message: "chore: bump version"
|
|
47
|
-
title: "chore: bump version
|
|
42
|
+
title: "chore: bump version"
|
|
48
43
|
body: "Automated package update"
|
|
49
|
-
branch: version
|
|
44
|
+
branch: bump-version-${{ github.run_number }}
|
|
50
45
|
base: main
|
|
51
46
|
token: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
|
|
52
47
|
committer: tscircuitbot <githubbot@tscircuit.com>
|
|
@@ -59,34 +54,18 @@ jobs:
|
|
|
59
54
|
env:
|
|
60
55
|
GH_TOKEN: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
|
|
61
56
|
|
|
62
|
-
- name: Trigger upstream repo updates
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
- name: Notify release-tracker of version update
|
|
78
|
-
# Continue-on-error just in case the tracker is down
|
|
79
|
-
continue-on-error: true
|
|
80
|
-
run: |
|
|
81
|
-
VERSION=$(node -p "require('./package.json').version")
|
|
82
|
-
PACKAGE_JSON=$(cat package.json)
|
|
83
|
-
curl -X POST https://release-tracker.tscircuit.com/release_events/create \
|
|
84
|
-
-H "Content-Type: application/json" \
|
|
85
|
-
-d "{
|
|
86
|
-
\"event\": {
|
|
87
|
-
\"event_type\": \"versions_updated\",
|
|
88
|
-
\"repo\": \"tscircuit/circuit-json-to-kicad\",
|
|
89
|
-
\"version\": \"$VERSION\",
|
|
90
|
-
\"package_json\": $PACKAGE_JSON
|
|
91
|
-
}
|
|
92
|
-
}"
|
|
57
|
+
# - name: Trigger upstream repo updates
|
|
58
|
+
# if: env.UPSTREAM_REPOS && env.UPSTREAM_PACKAGES_TO_UPDATE
|
|
59
|
+
# run: |
|
|
60
|
+
# IFS=',' read -ra REPOS <<< "${{ env.UPSTREAM_REPOS }}"
|
|
61
|
+
# for repo in "${REPOS[@]}"; do
|
|
62
|
+
# if [[ -n "$repo" ]]; then
|
|
63
|
+
# echo "Triggering update for repo: $repo"
|
|
64
|
+
# curl -X POST \
|
|
65
|
+
# -H "Accept: application/vnd.github.v3+json" \
|
|
66
|
+
# -H "Authorization: token ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}" \
|
|
67
|
+
# -H "Content-Type: application/json" \
|
|
68
|
+
# "https://api.github.com/repos/tscircuit/$repo/actions/workflows/update-package.yml/dispatches" \
|
|
69
|
+
# -d "{\"ref\":\"main\",\"inputs\":{\"package_names\":\"${{ env.UPSTREAM_PACKAGES_TO_UPDATE }}\"}}"
|
|
70
|
+
# fi
|
|
71
|
+
# done
|
package/dist/index.d.ts
CHANGED
|
@@ -34,7 +34,6 @@ interface Obstacle {
|
|
|
34
34
|
height: number;
|
|
35
35
|
connectedTo: TraceId[];
|
|
36
36
|
netIsAssignable?: boolean;
|
|
37
|
-
isCopperPour?: boolean;
|
|
38
37
|
offBoardConnectsTo?: TraceId[];
|
|
39
38
|
}
|
|
40
39
|
interface SimpleRouteConnection {
|
|
@@ -117,26 +116,6 @@ type RTreeRect = XYRect & {
|
|
|
117
116
|
zLayers: number[];
|
|
118
117
|
};
|
|
119
118
|
|
|
120
|
-
type AdjacentLayerContainmentMergeSolverInput = {
|
|
121
|
-
meshNodes: CapacityMeshNode[];
|
|
122
|
-
simpleRouteJson: SimpleRouteJson;
|
|
123
|
-
minFragmentArea?: number;
|
|
124
|
-
};
|
|
125
|
-
declare class AdjacentLayerContainmentMergeSolver extends BaseSolver {
|
|
126
|
-
private input;
|
|
127
|
-
private outputNodes;
|
|
128
|
-
private promotedNodeIds;
|
|
129
|
-
private residualNodeIds;
|
|
130
|
-
constructor(input: AdjacentLayerContainmentMergeSolverInput);
|
|
131
|
-
_setup(): void;
|
|
132
|
-
_step(): void;
|
|
133
|
-
private processAdjacentLayerContainmentMerges;
|
|
134
|
-
getOutput(): {
|
|
135
|
-
outputNodes: CapacityMeshNode[];
|
|
136
|
-
};
|
|
137
|
-
visualize(): GraphicsObject;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
119
|
interface SegmentWithAdjacentEmptySpace {
|
|
141
120
|
parent: CapacityMeshNode;
|
|
142
121
|
start: {
|
|
@@ -236,29 +215,6 @@ declare class GapFillSolverPipeline extends BasePipelineSolver<GapFillSolverInpu
|
|
|
236
215
|
finalVisualize(): GraphicsObject;
|
|
237
216
|
}
|
|
238
217
|
|
|
239
|
-
type OuterLayerContainmentMergeSolverInput = {
|
|
240
|
-
meshNodes: CapacityMeshNode[];
|
|
241
|
-
simpleRouteJson: SimpleRouteJson;
|
|
242
|
-
zIndexByName: Map<string, number>;
|
|
243
|
-
obstacleClearance?: number;
|
|
244
|
-
};
|
|
245
|
-
declare class OuterLayerContainmentMergeSolver extends BaseSolver {
|
|
246
|
-
private input;
|
|
247
|
-
private outputNodes;
|
|
248
|
-
private promotedNodeIds;
|
|
249
|
-
private residualNodeIds;
|
|
250
|
-
constructor(input: OuterLayerContainmentMergeSolverInput);
|
|
251
|
-
_setup(): void;
|
|
252
|
-
_step(): void;
|
|
253
|
-
private processOuterLayerContainmentMerges;
|
|
254
|
-
private buildObstaclesByLayer;
|
|
255
|
-
private isTransitCompatibleAcrossIntermediateLayers;
|
|
256
|
-
getOutput(): {
|
|
257
|
-
outputNodes: CapacityMeshNode[];
|
|
258
|
-
};
|
|
259
|
-
visualize(): GraphicsObject;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
218
|
type RectDiffSeedingSolverInput = {
|
|
263
219
|
simpleRouteJson: SimpleRouteJson;
|
|
264
220
|
obstacleIndexByLayer: Array<RBush<RTreeRect>>;
|
|
@@ -409,8 +365,6 @@ interface RectDiffPipelineInput {
|
|
|
409
365
|
declare class RectDiffPipeline extends BasePipelineSolver<RectDiffPipelineInput> {
|
|
410
366
|
rectDiffGridSolverPipeline?: RectDiffGridSolverPipeline;
|
|
411
367
|
gapFillSolver?: GapFillSolverPipeline;
|
|
412
|
-
outerLayerContainmentMergeSolver?: OuterLayerContainmentMergeSolver;
|
|
413
|
-
adjacentLayerContainmentMergeSolver?: AdjacentLayerContainmentMergeSolver;
|
|
414
368
|
boardVoidRects: XYRect[] | undefined;
|
|
415
369
|
zIndexByName?: Map<string, number>;
|
|
416
370
|
layerNames?: string[];
|