@tscircuit/rectdiff 0.0.25 → 0.0.26
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 +45 -24
- package/dist/index.d.ts +25 -0
- package/dist/index.js +345 -114
- package/lib/RectDiffPipeline.ts +23 -0
- package/lib/solvers/OuterLayerContainmentMergeSolver/OuterLayerContainmentMergeSolver.ts +311 -0
- package/lib/types/srj-types.ts +1 -0
- package/package.json +2 -1
- package/pages/pour.page.tsx +18 -0
- package/test-assets/bugreport49-634662.json +412 -0
- package/tests/solver/bugreport08-e3ec95/__snapshots__/bugreport08-e3ec95.snap.svg +1 -1
- package/tests/solver/bugreport22-2a75ce/__snapshots__/bugreport22-2a75ce.snap.svg +1 -1
- package/tests/solver/bugreport24-05597c/__snapshots__/bugreport24-05597c.snap.svg +1 -1
- package/tests/solver/bugreport49-634662/__snapshots__/bugreport49-634662.snap.svg +44 -0
- package/tests/solver/bugreport49-634662/bugreport49-634662.test.ts +134 -0
|
@@ -4,6 +4,7 @@ on:
|
|
|
4
4
|
push:
|
|
5
5
|
branches:
|
|
6
6
|
- main
|
|
7
|
+
- '!version-bumps/**'
|
|
7
8
|
workflow_dispatch:
|
|
8
9
|
|
|
9
10
|
env:
|
|
@@ -13,35 +14,39 @@ env:
|
|
|
13
14
|
jobs:
|
|
14
15
|
publish:
|
|
15
16
|
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 }}
|
|
21
19
|
- name: Setup bun
|
|
22
20
|
uses: oven-sh/setup-bun@v2
|
|
23
21
|
with:
|
|
24
|
-
bun-version:
|
|
25
|
-
- uses: actions/setup-node@
|
|
22
|
+
bun-version: latest
|
|
23
|
+
- uses: actions/setup-node@v4
|
|
26
24
|
with:
|
|
27
25
|
node-version: 20
|
|
28
26
|
registry-url: https://registry.npmjs.org/
|
|
29
27
|
- run: npm install -g pver
|
|
30
|
-
- run: bun install
|
|
28
|
+
- run: bun install --frozen-lockfile
|
|
31
29
|
- run: bun run build
|
|
32
30
|
- run: pver release --no-push-main
|
|
33
31
|
env:
|
|
34
32
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
35
33
|
GITHUB_TOKEN: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
|
|
36
34
|
|
|
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
|
+
|
|
37
42
|
- name: Create Pull Request
|
|
38
43
|
id: create-pr
|
|
39
|
-
uses: peter-evans/create-pull-request@
|
|
44
|
+
uses: peter-evans/create-pull-request@v6
|
|
40
45
|
with:
|
|
41
46
|
commit-message: "chore: bump version"
|
|
42
|
-
title: "chore: bump version"
|
|
47
|
+
title: "chore: bump version to v${{ steps.package-version.outputs.version }}"
|
|
43
48
|
body: "Automated package update"
|
|
44
|
-
branch:
|
|
49
|
+
branch: version-bumps/v${{ steps.package-version.outputs.version }}
|
|
45
50
|
base: main
|
|
46
51
|
token: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
|
|
47
52
|
committer: tscircuitbot <githubbot@tscircuit.com>
|
|
@@ -54,18 +59,34 @@ jobs:
|
|
|
54
59
|
env:
|
|
55
60
|
GH_TOKEN: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
|
|
56
61
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
- name: Trigger upstream repo updates
|
|
63
|
+
if: env.UPSTREAM_REPOS && env.UPSTREAM_PACKAGES_TO_UPDATE
|
|
64
|
+
run: |
|
|
65
|
+
IFS=',' read -ra REPOS <<< "${{ env.UPSTREAM_REPOS }}"
|
|
66
|
+
for repo in "${REPOS[@]}"; do
|
|
67
|
+
if [[ -n "$repo" ]]; then
|
|
68
|
+
echo "Triggering update for repo: $repo"
|
|
69
|
+
curl -X POST \
|
|
70
|
+
-H "Accept: application/vnd.github.v3+json" \
|
|
71
|
+
-H "Authorization: token ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}" \
|
|
72
|
+
-H "Content-Type: application/json" \
|
|
73
|
+
"https://api.github.com/repos/tscircuit/$repo/actions/workflows/update-package.yml/dispatches" \
|
|
74
|
+
-d "{\"ref\":\"main\",\"inputs\":{\"package_names\":\"${{ env.UPSTREAM_PACKAGES_TO_UPDATE }}\"}}"
|
|
75
|
+
fi
|
|
76
|
+
done
|
|
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
|
+
}"
|
package/dist/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ interface Obstacle {
|
|
|
34
34
|
height: number;
|
|
35
35
|
connectedTo: TraceId[];
|
|
36
36
|
netIsAssignable?: boolean;
|
|
37
|
+
isCopperPour?: boolean;
|
|
37
38
|
offBoardConnectsTo?: TraceId[];
|
|
38
39
|
}
|
|
39
40
|
interface SimpleRouteConnection {
|
|
@@ -215,6 +216,29 @@ declare class GapFillSolverPipeline extends BasePipelineSolver<GapFillSolverInpu
|
|
|
215
216
|
finalVisualize(): GraphicsObject;
|
|
216
217
|
}
|
|
217
218
|
|
|
219
|
+
type OuterLayerContainmentMergeSolverInput = {
|
|
220
|
+
meshNodes: CapacityMeshNode[];
|
|
221
|
+
simpleRouteJson: SimpleRouteJson;
|
|
222
|
+
zIndexByName: Map<string, number>;
|
|
223
|
+
obstacleClearance?: number;
|
|
224
|
+
};
|
|
225
|
+
declare class OuterLayerContainmentMergeSolver extends BaseSolver {
|
|
226
|
+
private input;
|
|
227
|
+
private outputNodes;
|
|
228
|
+
private promotedNodeIds;
|
|
229
|
+
private residualNodeIds;
|
|
230
|
+
constructor(input: OuterLayerContainmentMergeSolverInput);
|
|
231
|
+
_setup(): void;
|
|
232
|
+
_step(): void;
|
|
233
|
+
private processOuterLayerContainmentMerges;
|
|
234
|
+
private buildObstaclesByLayer;
|
|
235
|
+
private isTransitCompatibleAcrossIntermediateLayers;
|
|
236
|
+
getOutput(): {
|
|
237
|
+
outputNodes: CapacityMeshNode[];
|
|
238
|
+
};
|
|
239
|
+
visualize(): GraphicsObject;
|
|
240
|
+
}
|
|
241
|
+
|
|
218
242
|
type RectDiffSeedingSolverInput = {
|
|
219
243
|
simpleRouteJson: SimpleRouteJson;
|
|
220
244
|
obstacleIndexByLayer: Array<RBush<RTreeRect>>;
|
|
@@ -365,6 +389,7 @@ interface RectDiffPipelineInput {
|
|
|
365
389
|
declare class RectDiffPipeline extends BasePipelineSolver<RectDiffPipelineInput> {
|
|
366
390
|
rectDiffGridSolverPipeline?: RectDiffGridSolverPipeline;
|
|
367
391
|
gapFillSolver?: GapFillSolverPipeline;
|
|
392
|
+
outerLayerContainmentMergeSolver?: OuterLayerContainmentMergeSolver;
|
|
368
393
|
boardVoidRects: XYRect[] | undefined;
|
|
369
394
|
zIndexByName?: Map<string, number>;
|
|
370
395
|
layerNames?: string[];
|