circuit-json 0.0.156 → 0.0.158
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 +8 -8
- package/dist/index.d.mts +502 -502
- package/dist/index.mjs +47 -31
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -280,6 +280,18 @@ expectTypesMatch("extra props b");
|
|
|
280
280
|
expectTypesMatch("missing props b");
|
|
281
281
|
expectTypesMatch(true);
|
|
282
282
|
expectTypesMatch("mismatched prop types: a");
|
|
283
|
+
var expectStringUnionsMatch = (shouldBe) => {
|
|
284
|
+
};
|
|
285
|
+
expectStringUnionsMatch(true);
|
|
286
|
+
expectStringUnionsMatch(
|
|
287
|
+
'T1 has extra: "c", T2 has extra: "d"'
|
|
288
|
+
);
|
|
289
|
+
expectStringUnionsMatch('T1 has extra: "c"');
|
|
290
|
+
expectStringUnionsMatch('T2 has extra: "c"');
|
|
291
|
+
expectStringUnionsMatch(
|
|
292
|
+
'T1 has extra: "d", T2 has extra: "c"'
|
|
293
|
+
);
|
|
294
|
+
expectStringUnionsMatch(true);
|
|
283
295
|
|
|
284
296
|
// src/source/base/source_component_base.ts
|
|
285
297
|
import { z as z7 } from "zod";
|
|
@@ -750,7 +762,7 @@ expectTypesMatch(true);
|
|
|
750
762
|
import { z as z43 } from "zod";
|
|
751
763
|
var schematic_manual_edit_conflict_warning = z43.object({
|
|
752
764
|
type: z43.literal("schematic_manual_edit_conflict_warning"),
|
|
753
|
-
|
|
765
|
+
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
754
766
|
"schematic_manual_edit_conflict_warning"
|
|
755
767
|
),
|
|
756
768
|
message: z43.string(),
|
|
@@ -1403,47 +1415,49 @@ expectTypesMatch(
|
|
|
1403
1415
|
true
|
|
1404
1416
|
);
|
|
1405
1417
|
|
|
1406
|
-
// src/pcb/pcb_manual_edit_conflict_error.ts
|
|
1407
|
-
import { z as z71 } from "zod";
|
|
1408
|
-
var pcb_manual_edit_conflict_error = z71.object({
|
|
1409
|
-
type: z71.literal("pcb_manual_edit_conflict_error"),
|
|
1410
|
-
pcb_error_id: getZodPrefixedIdWithDefault("pcb_manual_edit_conflict_error"),
|
|
1411
|
-
message: z71.string(),
|
|
1412
|
-
pcb_component_id: z71.string(),
|
|
1413
|
-
pcb_group_id: z71.string().optional(),
|
|
1414
|
-
subcircuit_id: z71.string().optional(),
|
|
1415
|
-
source_component_id: z71.string()
|
|
1416
|
-
}).describe(
|
|
1417
|
-
"Error emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
1418
|
-
);
|
|
1419
|
-
expectTypesMatch(true);
|
|
1420
|
-
|
|
1421
1418
|
// src/pcb/pcb_group.ts
|
|
1422
|
-
import { z as
|
|
1423
|
-
var pcb_group =
|
|
1424
|
-
type:
|
|
1419
|
+
import { z as z71 } from "zod";
|
|
1420
|
+
var pcb_group = z71.object({
|
|
1421
|
+
type: z71.literal("pcb_group"),
|
|
1425
1422
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
1426
|
-
source_group_id:
|
|
1427
|
-
is_subcircuit:
|
|
1428
|
-
subcircuit_id:
|
|
1423
|
+
source_group_id: z71.string(),
|
|
1424
|
+
is_subcircuit: z71.boolean().optional(),
|
|
1425
|
+
subcircuit_id: z71.string().optional(),
|
|
1429
1426
|
width: length,
|
|
1430
1427
|
height: length,
|
|
1431
1428
|
center: point,
|
|
1432
|
-
pcb_component_ids:
|
|
1433
|
-
name:
|
|
1434
|
-
description:
|
|
1429
|
+
pcb_component_ids: z71.array(z71.string()),
|
|
1430
|
+
name: z71.string().optional(),
|
|
1431
|
+
description: z71.string().optional()
|
|
1435
1432
|
}).describe("Defines a group of components on the PCB");
|
|
1436
1433
|
expectTypesMatch(true);
|
|
1437
1434
|
|
|
1438
1435
|
// src/pcb/pcb_autorouting_error.ts
|
|
1439
|
-
import { z as
|
|
1440
|
-
var pcb_autorouting_error =
|
|
1441
|
-
type:
|
|
1436
|
+
import { z as z72 } from "zod";
|
|
1437
|
+
var pcb_autorouting_error = z72.object({
|
|
1438
|
+
type: z72.literal("pcb_autorouting_error"),
|
|
1442
1439
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
1443
|
-
message:
|
|
1440
|
+
message: z72.string()
|
|
1444
1441
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
1445
1442
|
expectTypesMatch(true);
|
|
1446
1443
|
|
|
1444
|
+
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
1445
|
+
import { z as z73 } from "zod";
|
|
1446
|
+
var pcb_manual_edit_conflict_warning = z73.object({
|
|
1447
|
+
type: z73.literal("pcb_manual_edit_conflict_warning"),
|
|
1448
|
+
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1449
|
+
"pcb_manual_edit_conflict_warning"
|
|
1450
|
+
),
|
|
1451
|
+
message: z73.string(),
|
|
1452
|
+
pcb_component_id: z73.string(),
|
|
1453
|
+
pcb_group_id: z73.string().optional(),
|
|
1454
|
+
subcircuit_id: z73.string().optional(),
|
|
1455
|
+
source_component_id: z73.string()
|
|
1456
|
+
}).describe(
|
|
1457
|
+
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
1458
|
+
);
|
|
1459
|
+
expectTypesMatch(true);
|
|
1460
|
+
|
|
1447
1461
|
// src/cad/cad_component.ts
|
|
1448
1462
|
import { z as z74 } from "zod";
|
|
1449
1463
|
var cad_component = z74.object({
|
|
@@ -1491,7 +1505,7 @@ var any_circuit_element = z75.union([
|
|
|
1491
1505
|
pcb_component,
|
|
1492
1506
|
pcb_hole,
|
|
1493
1507
|
pcb_missing_footprint_error,
|
|
1494
|
-
|
|
1508
|
+
pcb_manual_edit_conflict_warning,
|
|
1495
1509
|
pcb_plated_hole,
|
|
1496
1510
|
pcb_keepout,
|
|
1497
1511
|
pcb_port,
|
|
@@ -1530,6 +1544,8 @@ var any_circuit_element = z75.union([
|
|
|
1530
1544
|
cad_component
|
|
1531
1545
|
]);
|
|
1532
1546
|
var any_soup_element = any_circuit_element;
|
|
1547
|
+
expectTypesMatch(true);
|
|
1548
|
+
expectStringUnionsMatch(true);
|
|
1533
1549
|
export {
|
|
1534
1550
|
all_layers,
|
|
1535
1551
|
any_circuit_element,
|
|
@@ -1556,7 +1572,7 @@ export {
|
|
|
1556
1572
|
pcb_hole_circle_or_square_shape,
|
|
1557
1573
|
pcb_hole_oval_shape,
|
|
1558
1574
|
pcb_keepout,
|
|
1559
|
-
|
|
1575
|
+
pcb_manual_edit_conflict_warning,
|
|
1560
1576
|
pcb_missing_footprint_error,
|
|
1561
1577
|
pcb_placement_error,
|
|
1562
1578
|
pcb_plated_hole,
|