@tscircuit/props 0.0.181 → 0.0.182
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/dist/index.d.ts +141 -1
- package/dist/index.js +320 -299
- package/dist/index.js.map +1 -1
- package/lib/manual-edits/manual-edit-events/edit_pcb_group_location_event.ts +29 -0
- package/lib/manual-edits/manual-edit-events/edit_schematic_group_location_event.ts +30 -0
- package/lib/manual-edits/manual-edit-events/edit_trace_hint_event.ts +0 -1
- package/lib/manual-edits/manual-edit-events/index.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from "zod"
|
|
2
|
+
import {
|
|
3
|
+
base_manual_edit_event,
|
|
4
|
+
type BaseManualEditEvent,
|
|
5
|
+
} from "./base_manual_edit_event"
|
|
6
|
+
import { expectTypesMatch } from "lib/typecheck"
|
|
7
|
+
|
|
8
|
+
export const edit_schematic_group_location_event =
|
|
9
|
+
base_manual_edit_event.extend({
|
|
10
|
+
edit_event_type: z.literal("edit_schematic_group_location"),
|
|
11
|
+
schematic_group_id: z.string(),
|
|
12
|
+
original_center: z.object({ x: z.number(), y: z.number() }),
|
|
13
|
+
new_center: z.object({ x: z.number(), y: z.number() }),
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
export interface EditSchematicGroupLocationEvent extends BaseManualEditEvent {
|
|
17
|
+
edit_event_type: "edit_schematic_group_location"
|
|
18
|
+
schematic_group_id: string
|
|
19
|
+
original_center: { x: number; y: number }
|
|
20
|
+
new_center: { x: number; y: number }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type EditSchematicGroupLocationEventInput = z.input<
|
|
24
|
+
typeof edit_schematic_group_location_event
|
|
25
|
+
>
|
|
26
|
+
|
|
27
|
+
expectTypesMatch<
|
|
28
|
+
EditSchematicGroupLocationEvent,
|
|
29
|
+
z.infer<typeof edit_schematic_group_location_event>
|
|
30
|
+
>(true)
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
type BaseManualEditEvent,
|
|
5
5
|
} from "./base_manual_edit_event"
|
|
6
6
|
import { expectTypesMatch } from "lib/typecheck"
|
|
7
|
-
import { route_hint_point } from "circuit-json"
|
|
8
7
|
|
|
9
8
|
export const edit_trace_hint_event = base_manual_edit_event.extend({
|
|
10
9
|
pcb_edit_event_type: z.literal("edit_trace_hint").describe("deprecated"),
|
|
@@ -2,3 +2,5 @@ export * from "./base_manual_edit_event"
|
|
|
2
2
|
export * from "./edit_pcb_component_location_event"
|
|
3
3
|
export * from "./edit_trace_hint_event"
|
|
4
4
|
export * from "./edit_schematic_component_location_event"
|
|
5
|
+
export * from "./edit_pcb_group_location_event"
|
|
6
|
+
export * from "./edit_schematic_group_location_event"
|