circuit-json 0.0.179 → 0.0.181
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 +24 -0
- package/dist/index.d.mts +909 -23
- package/dist/index.mjs +88 -45
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -304,7 +304,8 @@ var source_component_base = z7.object({
|
|
|
304
304
|
supplier_part_numbers: z7.record(supplier_name, z7.array(z7.string())).optional(),
|
|
305
305
|
display_value: z7.string().optional(),
|
|
306
306
|
are_pins_interchangeable: z7.boolean().optional(),
|
|
307
|
-
internally_connected_source_port_ids: z7.array(z7.array(z7.string())).optional()
|
|
307
|
+
internally_connected_source_port_ids: z7.array(z7.array(z7.string())).optional(),
|
|
308
|
+
source_group_id: z7.string().optional()
|
|
308
309
|
});
|
|
309
310
|
expectTypesMatch(true);
|
|
310
311
|
|
|
@@ -657,7 +658,9 @@ var schematic_component = z36.object({
|
|
|
657
658
|
symbol_name: z36.string().optional(),
|
|
658
659
|
port_arrangement: port_arrangement.optional(),
|
|
659
660
|
port_labels: z36.record(z36.string()).optional(),
|
|
660
|
-
symbol_display_value: z36.string().optional()
|
|
661
|
+
symbol_display_value: z36.string().optional(),
|
|
662
|
+
subcircuit_id: z36.string().optional(),
|
|
663
|
+
schematic_group_id: z36.string().optional()
|
|
661
664
|
});
|
|
662
665
|
expectTypesMatch(true);
|
|
663
666
|
|
|
@@ -915,7 +918,8 @@ var pcb_component = z52.object({
|
|
|
915
918
|
rotation,
|
|
916
919
|
width: length,
|
|
917
920
|
height: length,
|
|
918
|
-
subcircuit_id: z52.string().optional()
|
|
921
|
+
subcircuit_id: z52.string().optional(),
|
|
922
|
+
pcb_group_id: z52.string().optional()
|
|
919
923
|
}).describe("Defines a component on the PCB");
|
|
920
924
|
expectTypesMatch(true);
|
|
921
925
|
|
|
@@ -1522,88 +1526,122 @@ var pcb_keepout = z74.object({
|
|
|
1522
1526
|
})
|
|
1523
1527
|
);
|
|
1524
1528
|
|
|
1525
|
-
// src/pcb/
|
|
1529
|
+
// src/pcb/pcb_cutout.ts
|
|
1526
1530
|
import { z as z75 } from "zod";
|
|
1527
|
-
var
|
|
1528
|
-
type: z75.literal("
|
|
1531
|
+
var pcb_cutout_base = z75.object({
|
|
1532
|
+
type: z75.literal("pcb_cutout"),
|
|
1533
|
+
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
1534
|
+
pcb_group_id: z75.string().optional(),
|
|
1535
|
+
subcircuit_id: z75.string().optional()
|
|
1536
|
+
});
|
|
1537
|
+
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
1538
|
+
shape: z75.literal("rect"),
|
|
1539
|
+
center: point,
|
|
1540
|
+
width: length,
|
|
1541
|
+
height: length,
|
|
1542
|
+
rotation: rotation.optional()
|
|
1543
|
+
});
|
|
1544
|
+
expectTypesMatch(true);
|
|
1545
|
+
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
1546
|
+
shape: z75.literal("circle"),
|
|
1547
|
+
center: point,
|
|
1548
|
+
radius: length
|
|
1549
|
+
});
|
|
1550
|
+
expectTypesMatch(true);
|
|
1551
|
+
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
1552
|
+
shape: z75.literal("polygon"),
|
|
1553
|
+
points: z75.array(point)
|
|
1554
|
+
});
|
|
1555
|
+
expectTypesMatch(true);
|
|
1556
|
+
var pcb_cutout = z75.discriminatedUnion("shape", [
|
|
1557
|
+
pcb_cutout_rect,
|
|
1558
|
+
pcb_cutout_circle,
|
|
1559
|
+
pcb_cutout_polygon
|
|
1560
|
+
]).describe("Defines a cutout on the PCB, removing board material.");
|
|
1561
|
+
expectTypesMatch(true);
|
|
1562
|
+
|
|
1563
|
+
// src/pcb/pcb_missing_footprint_error.ts
|
|
1564
|
+
import { z as z76 } from "zod";
|
|
1565
|
+
var pcb_missing_footprint_error = z76.object({
|
|
1566
|
+
type: z76.literal("pcb_missing_footprint_error"),
|
|
1529
1567
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
1530
1568
|
"pcb_missing_footprint_error"
|
|
1531
1569
|
),
|
|
1532
|
-
pcb_group_id:
|
|
1533
|
-
subcircuit_id:
|
|
1534
|
-
error_type:
|
|
1535
|
-
source_component_id:
|
|
1536
|
-
message:
|
|
1570
|
+
pcb_group_id: z76.string().optional(),
|
|
1571
|
+
subcircuit_id: z76.string().optional(),
|
|
1572
|
+
error_type: z76.literal("pcb_missing_footprint_error"),
|
|
1573
|
+
source_component_id: z76.string(),
|
|
1574
|
+
message: z76.string()
|
|
1537
1575
|
}).describe("Defines a missing footprint error on the PCB");
|
|
1538
1576
|
expectTypesMatch(
|
|
1539
1577
|
true
|
|
1540
1578
|
);
|
|
1541
1579
|
|
|
1542
1580
|
// src/pcb/pcb_group.ts
|
|
1543
|
-
import { z as
|
|
1544
|
-
var pcb_group =
|
|
1545
|
-
type:
|
|
1581
|
+
import { z as z77 } from "zod";
|
|
1582
|
+
var pcb_group = z77.object({
|
|
1583
|
+
type: z77.literal("pcb_group"),
|
|
1546
1584
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
1547
|
-
source_group_id:
|
|
1548
|
-
is_subcircuit:
|
|
1549
|
-
subcircuit_id:
|
|
1585
|
+
source_group_id: z77.string(),
|
|
1586
|
+
is_subcircuit: z77.boolean().optional(),
|
|
1587
|
+
subcircuit_id: z77.string().optional(),
|
|
1550
1588
|
width: length,
|
|
1551
1589
|
height: length,
|
|
1552
1590
|
center: point,
|
|
1553
|
-
pcb_component_ids:
|
|
1554
|
-
name:
|
|
1555
|
-
description:
|
|
1591
|
+
pcb_component_ids: z77.array(z77.string()),
|
|
1592
|
+
name: z77.string().optional(),
|
|
1593
|
+
description: z77.string().optional()
|
|
1556
1594
|
}).describe("Defines a group of components on the PCB");
|
|
1557
1595
|
expectTypesMatch(true);
|
|
1558
1596
|
|
|
1559
1597
|
// src/pcb/pcb_autorouting_error.ts
|
|
1560
|
-
import { z as
|
|
1561
|
-
var pcb_autorouting_error =
|
|
1562
|
-
type:
|
|
1598
|
+
import { z as z78 } from "zod";
|
|
1599
|
+
var pcb_autorouting_error = z78.object({
|
|
1600
|
+
type: z78.literal("pcb_autorouting_error"),
|
|
1563
1601
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
1564
|
-
message:
|
|
1602
|
+
message: z78.string()
|
|
1565
1603
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
1566
1604
|
expectTypesMatch(true);
|
|
1567
1605
|
|
|
1568
1606
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
1569
|
-
import { z as
|
|
1570
|
-
var pcb_manual_edit_conflict_warning =
|
|
1571
|
-
type:
|
|
1607
|
+
import { z as z79 } from "zod";
|
|
1608
|
+
var pcb_manual_edit_conflict_warning = z79.object({
|
|
1609
|
+
type: z79.literal("pcb_manual_edit_conflict_warning"),
|
|
1572
1610
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1573
1611
|
"pcb_manual_edit_conflict_warning"
|
|
1574
1612
|
),
|
|
1575
|
-
message:
|
|
1576
|
-
pcb_component_id:
|
|
1577
|
-
pcb_group_id:
|
|
1578
|
-
subcircuit_id:
|
|
1579
|
-
source_component_id:
|
|
1613
|
+
message: z79.string(),
|
|
1614
|
+
pcb_component_id: z79.string(),
|
|
1615
|
+
pcb_group_id: z79.string().optional(),
|
|
1616
|
+
subcircuit_id: z79.string().optional(),
|
|
1617
|
+
source_component_id: z79.string()
|
|
1580
1618
|
}).describe(
|
|
1581
1619
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
1582
1620
|
);
|
|
1583
1621
|
expectTypesMatch(true);
|
|
1584
1622
|
|
|
1585
1623
|
// src/cad/cad_component.ts
|
|
1586
|
-
import { z as
|
|
1587
|
-
var cad_component =
|
|
1588
|
-
type:
|
|
1589
|
-
cad_component_id:
|
|
1590
|
-
pcb_component_id:
|
|
1591
|
-
source_component_id:
|
|
1624
|
+
import { z as z80 } from "zod";
|
|
1625
|
+
var cad_component = z80.object({
|
|
1626
|
+
type: z80.literal("cad_component"),
|
|
1627
|
+
cad_component_id: z80.string(),
|
|
1628
|
+
pcb_component_id: z80.string(),
|
|
1629
|
+
source_component_id: z80.string(),
|
|
1592
1630
|
position: point3,
|
|
1593
1631
|
rotation: point3.optional(),
|
|
1594
1632
|
size: point3.optional(),
|
|
1595
1633
|
layer: layer_ref.optional(),
|
|
1596
1634
|
// These are all ways to generate/load the 3d model
|
|
1597
|
-
footprinter_string:
|
|
1598
|
-
model_obj_url:
|
|
1599
|
-
model_stl_url:
|
|
1600
|
-
model_3mf_url:
|
|
1601
|
-
model_jscad:
|
|
1635
|
+
footprinter_string: z80.string().optional(),
|
|
1636
|
+
model_obj_url: z80.string().optional(),
|
|
1637
|
+
model_stl_url: z80.string().optional(),
|
|
1638
|
+
model_3mf_url: z80.string().optional(),
|
|
1639
|
+
model_jscad: z80.any().optional()
|
|
1602
1640
|
}).describe("Defines a component on the PCB");
|
|
1603
1641
|
|
|
1604
1642
|
// src/any_circuit_element.ts
|
|
1605
|
-
import { z as
|
|
1606
|
-
var any_circuit_element =
|
|
1643
|
+
import { z as z81 } from "zod";
|
|
1644
|
+
var any_circuit_element = z81.union([
|
|
1607
1645
|
source_trace,
|
|
1608
1646
|
source_port,
|
|
1609
1647
|
any_source_component,
|
|
@@ -1653,6 +1691,7 @@ var any_circuit_element = z80.union([
|
|
|
1653
1691
|
pcb_fabrication_note_path,
|
|
1654
1692
|
pcb_fabrication_note_text,
|
|
1655
1693
|
pcb_autorouting_error,
|
|
1694
|
+
pcb_cutout,
|
|
1656
1695
|
schematic_box,
|
|
1657
1696
|
schematic_text,
|
|
1658
1697
|
schematic_line,
|
|
@@ -1690,6 +1729,10 @@ export {
|
|
|
1690
1729
|
pcb_autorouting_error,
|
|
1691
1730
|
pcb_board,
|
|
1692
1731
|
pcb_component,
|
|
1732
|
+
pcb_cutout,
|
|
1733
|
+
pcb_cutout_circle,
|
|
1734
|
+
pcb_cutout_polygon,
|
|
1735
|
+
pcb_cutout_rect,
|
|
1693
1736
|
pcb_fabrication_note_path,
|
|
1694
1737
|
pcb_fabrication_note_text,
|
|
1695
1738
|
pcb_group,
|