@tscircuit/props 0.0.495 → 0.0.497

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.
@@ -11,6 +11,19 @@ export const rotationPoint3 = z.object({
11
11
  z: z.union([z.number(), z.string()]),
12
12
  })
13
13
 
14
+ export const cadModelAxisDirections = [
15
+ "x+",
16
+ "x-",
17
+ "y+",
18
+ "y-",
19
+ "z+",
20
+ "z-",
21
+ ] as const
22
+
23
+ export type CadModelAxisDirection = (typeof cadModelAxisDirections)[number]
24
+
25
+ export const cadModelAxisDirection = z.enum(cadModelAxisDirections)
26
+
14
27
  export interface CadModelBase {
15
28
  rotationOffset?:
16
29
  | number
@@ -20,8 +33,15 @@ export interface CadModelBase {
20
33
  y: number | string
21
34
  z: number | string
22
35
  }
36
+ modelOriginPosition?: {
37
+ x: number | string
38
+ y: number | string
39
+ z: number | string
40
+ }
23
41
  size?: { x: number | string; y: number | string; z: number | string }
24
42
  modelUnitToMmScale?: Distance
43
+ modelBoardNormalDirection?: CadModelAxisDirection
44
+ pcbRotationOffset?: number
25
45
  zOffsetFromSurface?: Distance
26
46
  showAsTranslucentModel?: boolean
27
47
  }
@@ -29,8 +49,11 @@ export interface CadModelBase {
29
49
  export const cadModelBase = z.object({
30
50
  rotationOffset: z.number().or(rotationPoint3).optional(),
31
51
  positionOffset: point3.optional(),
52
+ modelOriginPosition: point3.optional(),
32
53
  size: point3.optional(),
33
54
  modelUnitToMmScale: distance.optional(),
55
+ modelBoardNormalDirection: cadModelAxisDirection.optional(),
56
+ pcbRotationOffset: z.number().optional(),
34
57
  zOffsetFromSurface: distance.optional(),
35
58
  showAsTranslucentModel: z.boolean().optional(),
36
59
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.495",
3
+ "version": "0.0.497",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",