@tscircuit/props 0.0.354 → 0.0.356
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/README.md +1 -0
- package/dist/index.d.ts +239 -5
- package/dist/index.js +280 -239
- package/dist/index.js.map +1 -1
- package/lib/components/cadmodel.ts +2 -0
- package/lib/components/courtyard-outline.ts +15 -0
- package/lib/components/courtyard-rect.ts +16 -0
- package/lib/components/fabrication-note-rect.ts +16 -0
- package/lib/index.ts +3 -0
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ import { z } from "zod"
|
|
|
5
5
|
|
|
6
6
|
export interface CadModelProps extends CadModelBase {
|
|
7
7
|
modelUrl: string
|
|
8
|
+
stepUrl?: string
|
|
8
9
|
pcbX?: Distance
|
|
9
10
|
pcbY?: Distance
|
|
10
11
|
pcbZ?: Distance
|
|
@@ -18,6 +19,7 @@ const pcbPosition = z.object({
|
|
|
18
19
|
|
|
19
20
|
const cadModelBaseWithUrl = cadModelBase.extend({
|
|
20
21
|
modelUrl: z.string(),
|
|
22
|
+
stepUrl: z.string().optional(),
|
|
21
23
|
})
|
|
22
24
|
|
|
23
25
|
const cadModelObject = cadModelBaseWithUrl.merge(pcbPosition)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { length } from "circuit-json"
|
|
2
|
+
import { pcbLayoutProps } from "lib/common/layout"
|
|
3
|
+
import { point } from "lib/common/point"
|
|
4
|
+
import { z } from "zod"
|
|
5
|
+
|
|
6
|
+
export const courtyardOutlineProps = pcbLayoutProps
|
|
7
|
+
.omit({ pcbX: true, pcbY: true, pcbRotation: true })
|
|
8
|
+
.extend({
|
|
9
|
+
outline: z.array(point),
|
|
10
|
+
strokeWidth: length.optional(),
|
|
11
|
+
isClosed: z.boolean().optional(),
|
|
12
|
+
isStrokeDashed: z.boolean().optional(),
|
|
13
|
+
color: z.string().optional(),
|
|
14
|
+
})
|
|
15
|
+
export type CourtyardOutlineProps = z.input<typeof courtyardOutlineProps>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { distance } from "circuit-json"
|
|
2
|
+
import { pcbLayoutProps } from "lib/common/layout"
|
|
3
|
+
import { z } from "zod"
|
|
4
|
+
|
|
5
|
+
export const courtyardRectProps = pcbLayoutProps
|
|
6
|
+
.omit({ pcbRotation: true })
|
|
7
|
+
.extend({
|
|
8
|
+
width: distance,
|
|
9
|
+
height: distance,
|
|
10
|
+
strokeWidth: distance.optional(),
|
|
11
|
+
isFilled: z.boolean().optional(),
|
|
12
|
+
hasStroke: z.boolean().optional(),
|
|
13
|
+
isStrokeDashed: z.boolean().optional(),
|
|
14
|
+
color: z.string().optional(),
|
|
15
|
+
})
|
|
16
|
+
export type CourtyardRectProps = z.input<typeof courtyardRectProps>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { distance } from "circuit-json"
|
|
2
|
+
import { pcbLayoutProps } from "lib/common/layout"
|
|
3
|
+
import { z } from "zod"
|
|
4
|
+
|
|
5
|
+
export const fabricationNoteRectProps = pcbLayoutProps
|
|
6
|
+
.omit({ pcbRotation: true })
|
|
7
|
+
.extend({
|
|
8
|
+
width: distance,
|
|
9
|
+
height: distance,
|
|
10
|
+
strokeWidth: distance.optional(),
|
|
11
|
+
isFilled: z.boolean().optional(),
|
|
12
|
+
hasStroke: z.boolean().optional(),
|
|
13
|
+
isStrokeDashed: z.boolean().optional(),
|
|
14
|
+
color: z.string().optional(),
|
|
15
|
+
})
|
|
16
|
+
export type FabricationNoteRectProps = z.input<typeof fabricationNoteRectProps>
|
package/lib/index.ts
CHANGED
|
@@ -55,12 +55,15 @@ export * from "./components/diode"
|
|
|
55
55
|
export * from "./components/led"
|
|
56
56
|
export * from "./components/switch"
|
|
57
57
|
export * from "./components/fabrication-note-text"
|
|
58
|
+
export * from "./components/fabrication-note-rect"
|
|
58
59
|
export * from "./components/fabrication-note-path"
|
|
59
60
|
export * from "./components/pcb-trace"
|
|
60
61
|
export * from "./components/via"
|
|
61
62
|
export * from "./components/testpoint"
|
|
62
63
|
export * from "./components/breakoutpoint"
|
|
63
64
|
export * from "./components/pcb-keepout"
|
|
65
|
+
export * from "./components/courtyard-rect"
|
|
66
|
+
export * from "./components/courtyard-outline"
|
|
64
67
|
export * from "./components/copper-pour"
|
|
65
68
|
export * from "./components/cadassembly"
|
|
66
69
|
export * from "./components/cadmodel"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/props",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.356",
|
|
4
4
|
"description": "Props for tscircuit builtin component types",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@types/node": "^20.12.11",
|
|
32
32
|
"@types/react": "^18.3.2",
|
|
33
33
|
"ava": "^6.1.3",
|
|
34
|
-
"circuit-json": "^0.0.
|
|
34
|
+
"circuit-json": "^0.0.275",
|
|
35
35
|
"expect-type": "^1.2.2",
|
|
36
36
|
"glob": "^11.0.0",
|
|
37
37
|
"madge": "^8.0.0",
|