schematic-symbols 0.0.5 → 0.0.7
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-formatcheck.yml +26 -0
- package/.github/workflows/bun-typecheck.yml +26 -0
- package/.github/workflows/formatbot.yml +49 -0
- package/assets/symbols-svg-json/boxresistor.json +1 -1
- package/assets/symbols-svg-json/capacitor.json +1 -1
- package/assets/symbols-svg-json/capacitor_polarized.json +1 -1
- package/assets/symbols-svg-json/diode.json +1 -1
- package/assets/symbols-svg-json/diode_bipolar_zener.json +1 -1
- package/assets/symbols-svg-json/diode_schottky.json +1 -1
- package/assets/symbols-svg-json/diode_zener.json +1 -1
- package/assets/symbols-svg-json/fuse.json +1 -1
- package/assets/symbols-svg-json/led.json +1 -1
- package/assets/symbols-svg-json/mosfet_depletion_normally_on.json +1 -1
- package/assets/symbols-svg-json/potentiometer.json +1 -1
- package/assets/symbols-svg-json/potentiometer2.json +1 -1
- package/assets/symbols-svg-json/testshape.json +1 -1
- package/assets/symbols-svg-json/varistor.json +1 -1
- package/bun.lockb +0 -0
- package/drawing/pathToSvgD.ts +1 -1
- package/drawing/types.ts +1 -1
- package/package.json +4 -1
- package/scripts/generate-symbols-from-asset-svgs.ts +1 -0
- package/scripts/lib/applyGroupTransformsToChildren.ts +3 -2
- package/scripts/lib/serializeSvgPathCommands.ts +1 -0
- package/symbols/fuse_vert.ts +1 -1
- package/symbols/led_vert.ts +1 -1
@@ -0,0 +1,26 @@
|
|
1
|
+
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
|
2
|
+
name: Format Check
|
3
|
+
|
4
|
+
on:
|
5
|
+
push:
|
6
|
+
branches: [main]
|
7
|
+
pull_request:
|
8
|
+
branches: [main]
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
format-check:
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v3
|
16
|
+
|
17
|
+
- name: Setup bun
|
18
|
+
uses: oven-sh/setup-bun@v1
|
19
|
+
with:
|
20
|
+
bun-version: latest
|
21
|
+
|
22
|
+
- name: Install dependencies
|
23
|
+
run: bun install
|
24
|
+
|
25
|
+
- name: Run format check
|
26
|
+
run: bun run format:check
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
|
2
|
+
name: Type Check
|
3
|
+
|
4
|
+
on:
|
5
|
+
push:
|
6
|
+
branches: [main]
|
7
|
+
pull_request:
|
8
|
+
branches: [main]
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
type-check:
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v3
|
16
|
+
|
17
|
+
- name: Setup bun
|
18
|
+
uses: oven-sh/setup-bun@v1
|
19
|
+
with:
|
20
|
+
bun-version: latest
|
21
|
+
|
22
|
+
- name: Install dependencies
|
23
|
+
run: bun i
|
24
|
+
|
25
|
+
- name: Run format check
|
26
|
+
run: bunx tsc --noEmit
|
@@ -0,0 +1,49 @@
|
|
1
|
+
name: Format PR
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
format:
|
9
|
+
name: Format code
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
if: github.event.pull_request.draft == false
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- name: Checkout code
|
15
|
+
uses: actions/checkout@v3
|
16
|
+
with:
|
17
|
+
token: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
|
18
|
+
|
19
|
+
- name: Setup Node.js
|
20
|
+
uses: actions/setup-node@v3
|
21
|
+
with:
|
22
|
+
node-version: '20'
|
23
|
+
|
24
|
+
- name: Get @biomejs/biome version
|
25
|
+
id: get-biome-version
|
26
|
+
run: echo "BIOME_VERSION=$(node -p "require('./package.json').devDependencies['@biomejs/biome']")" >> $GITHUB_OUTPUT
|
27
|
+
|
28
|
+
- name: Install @biomejs/biome
|
29
|
+
run: npm install @biomejs/biome@${{ steps.get-biome-version.outputs.BIOME_VERSION }}
|
30
|
+
|
31
|
+
- name: Run formatter
|
32
|
+
run: npx @biomejs/biome format . --write
|
33
|
+
|
34
|
+
- name: Restore lock files
|
35
|
+
run: |
|
36
|
+
git checkout -- *lock.json || true
|
37
|
+
git checkout -- *.lock || true
|
38
|
+
git checkout -- *.lockb || true
|
39
|
+
git checkout -- package.json || true
|
40
|
+
|
41
|
+
- name: Commit changes
|
42
|
+
uses: stefanzweifel/git-auto-commit-action@v4
|
43
|
+
with:
|
44
|
+
commit_message: "formatbot: Automatically format code"
|
45
|
+
branch: ${{ github.head_ref }}
|
46
|
+
commit_user_name: tscircuitbot
|
47
|
+
commit_user_email: tscircuitbot@users.noreply.github.com
|
48
|
+
commit_author: tscircuitbot <tscircuitbot@users.noreply.github.com>
|
49
|
+
file_pattern: "*.ts *.tsx"
|
package/bun.lockb
CHANGED
Binary file
|
package/drawing/pathToSvgD.ts
CHANGED
package/drawing/types.ts
CHANGED
package/package.json
CHANGED
@@ -1,15 +1,18 @@
|
|
1
1
|
{
|
2
2
|
"name": "schematic-symbols",
|
3
3
|
"main": "./dist/index.cjs",
|
4
|
-
"
|
4
|
+
"types": "./index.ts",
|
5
|
+
"version": "0.0.7",
|
5
6
|
"type": "module",
|
6
7
|
"scripts": {
|
7
8
|
"start": "bun run build && bun --hot run dev-server.ts",
|
8
9
|
"build": "rm symbols/index.ts && bunx make-vfs ./symbols --content-format import-default --outfile ./symbols/index.ts && tsup ./index.ts --dts --sourcemap",
|
9
10
|
"generate": "bun run scripts/generate-symbols-from-asset-svgs.ts",
|
11
|
+
"format:check": "bunx biome format",
|
10
12
|
"vercel-build": "bun run ./scripts/build.ts"
|
11
13
|
},
|
12
14
|
"devDependencies": {
|
15
|
+
"@biomejs/biome": "^1.8.3",
|
13
16
|
"@types/bun": "latest",
|
14
17
|
"@types/svg-path-parser": "^1.1.6",
|
15
18
|
"make-vfs": "1.0.10",
|
@@ -61,7 +61,7 @@ export function applyGroupTransformsToChildren(group: INode) {
|
|
61
61
|
|
62
62
|
return child
|
63
63
|
})
|
64
|
-
.filter((c: INode | null): INode => c as INode)
|
64
|
+
.filter((c: INode | null): INode => c as INode) as INode[]
|
65
65
|
|
66
66
|
// Remove the transform from the group since it's now applied to children
|
67
67
|
delete group.attributes.transform
|
@@ -114,5 +114,6 @@ export function transformPath(pathData: string, matrix: Matrix): string {
|
|
114
114
|
|
115
115
|
export function convertRectToPath(child: INode): INode {
|
116
116
|
const { x, y, width, height } = child.attributes as any
|
117
|
-
|
117
|
+
// TODO
|
118
|
+
return null as any
|
118
119
|
}
|
package/symbols/fuse_vert.ts
CHANGED
package/symbols/led_vert.ts
CHANGED