altium-toolkit 1.0.10 → 1.1.0

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.
Files changed (63) hide show
  1. package/docs/api.md +6 -2
  2. package/docs/model-format.md +29 -4
  3. package/docs/schemas/altium_toolkit/ci_artifact_bundle_a1.schema.json +4 -0
  4. package/docs/schemas/altium_toolkit/contract_gate_a1.schema.json +34 -0
  5. package/docs/schemas/altium_toolkit/draftsman_board_view_cache_a1.schema.json +115 -0
  6. package/docs/schemas/altium_toolkit/draftsman_digest_a1.schema.json +132 -1
  7. package/docs/schemas/altium_toolkit/host_capabilities_a1.schema.json +39 -0
  8. package/docs/schemas/altium_toolkit/library_merge_plan_a1.schema.json +56 -0
  9. package/docs/schemas/altium_toolkit/library_qa_a1.schema.json +70 -0
  10. package/docs/schemas/altium_toolkit/normalized_model_a1.schema.json +692 -2
  11. package/docs/schemas/altium_toolkit/pcb_bom_profile_a1.schema.json +48 -0
  12. package/docs/schemas/altium_toolkit/pcb_layer_stack_a1.schema.json +98 -0
  13. package/docs/schemas/altium_toolkit/pcb_layer_stack_fidelity_a1.schema.json +66 -0
  14. package/docs/schemas/altium_toolkit/pcb_placed_footprint_extraction_a1.schema.json +31 -0
  15. package/docs/schemas/altium_toolkit/pcb_review_metadata_a1.schema.json +62 -0
  16. package/docs/schemas/altium_toolkit/pcb_rigid_flex_topology_a1.schema.json +52 -0
  17. package/docs/schemas/altium_toolkit/pcblib_parity_a1.schema.json +24 -0
  18. package/docs/schemas/altium_toolkit/project_bom_pnp_reconciliation_a1.schema.json +63 -0
  19. package/docs/schemas/altium_toolkit/project_outjob_digest_a1.schema.json +46 -0
  20. package/docs/schemas/altium_toolkit/project_script_a1.schema.json +50 -0
  21. package/docs/schemas/altium_toolkit/schematic_render_ops_a1.schema.json +55 -0
  22. package/docs/schemas/altium_toolkit/schematic_template_extraction_a1.schema.json +37 -0
  23. package/package.json +1 -1
  24. package/src/core/altium/AltiumParser.mjs +7 -2
  25. package/src/core/altium/CiArtifactBundleBuilder.mjs +16 -5
  26. package/src/core/altium/ContractGateReportBuilder.mjs +351 -0
  27. package/src/core/altium/DraftsmanBoardViewMetadataBuilder.mjs +653 -0
  28. package/src/core/altium/DraftsmanDigestParser.mjs +246 -7
  29. package/src/core/altium/DraftsmanImagePayloadManifestBuilder.mjs +178 -0
  30. package/src/core/altium/HostCapabilityDiagnosticsBuilder.mjs +271 -0
  31. package/src/core/altium/LibraryQaReportBuilder.mjs +504 -0
  32. package/src/core/altium/LibraryRenderManifestBuilder.mjs +172 -2
  33. package/src/core/altium/PcbBomProfileBuilder.mjs +263 -0
  34. package/src/core/altium/PcbComponentKindPolicy.mjs +146 -0
  35. package/src/core/altium/PcbLayerStackFidelityReportBuilder.mjs +141 -0
  36. package/src/core/altium/PcbLayerStackInterchangeParser.mjs +453 -0
  37. package/src/core/altium/PcbLayerStackQueryHelper.mjs +195 -0
  38. package/src/core/altium/PcbLayerStackReadModelBuilder.mjs +906 -0
  39. package/src/core/altium/PcbLayerStackSourceMetadataParser.mjs +488 -0
  40. package/src/core/altium/PcbLibModelParser.mjs +2 -0
  41. package/src/core/altium/PcbLibParityReportBuilder.mjs +242 -0
  42. package/src/core/altium/PcbModelParser.mjs +182 -18
  43. package/src/core/altium/PcbPickPlacePositionResolver.mjs +3 -0
  44. package/src/core/altium/PcbPlacedFootprintManifestBuilder.mjs +338 -0
  45. package/src/core/altium/PcbPolygonRecordParser.mjs +120 -0
  46. package/src/core/altium/PcbReviewDrillMetadataBuilder.mjs +301 -0
  47. package/src/core/altium/PcbReviewMetadataBuilder.mjs +373 -0
  48. package/src/core/altium/PcbReviewPolygonRealizationBuilder.mjs +269 -0
  49. package/src/core/altium/PcbReviewRouteHighlightProfileBuilder.mjs +298 -0
  50. package/src/core/altium/PcbRigidFlexTopologyBuilder.mjs +171 -0
  51. package/src/core/altium/PrintableTextDecoder.mjs +70 -6
  52. package/src/core/altium/PrjPcbModelParser.mjs +45 -0
  53. package/src/core/altium/PrjScrModelParser.mjs +386 -0
  54. package/src/core/altium/ProjectBomPnpReconciliationBuilder.mjs +237 -0
  55. package/src/core/altium/ProjectDesignBundleBuilder.mjs +61 -2
  56. package/src/core/altium/ProjectOutJobDigestBuilder.mjs +424 -13
  57. package/src/core/altium/SvgModelCrossLinkValidator.mjs +35 -2
  58. package/src/core/circuit-json/CircuitJsonModelAdapter.mjs +164 -0
  59. package/src/parser.mjs +15 -0
  60. package/src/ui/PcbFootprintPrimitiveSelector.mjs +13 -1
  61. package/src/ui/PcbScene3dBuilder.mjs +26 -4
  62. package/src/ui/SchematicRenderOpsSidecarBuilder.mjs +554 -0
  63. package/src/ui/SchematicSvgRenderer.mjs +48 -2
@@ -0,0 +1,48 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "altium-toolkit.pcb.bom-profile.a1",
4
+ "title": "Altium Toolkit PCB BOM Profile A1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema",
9
+ "source",
10
+ "summary",
11
+ "groups",
12
+ "components",
13
+ "exclusions"
14
+ ],
15
+ "properties": {
16
+ "schema": {
17
+ "const": "altium-toolkit.pcb.bom-profile.a1"
18
+ },
19
+ "source": {
20
+ "type": "string"
21
+ },
22
+ "summary": {
23
+ "type": "object",
24
+ "additionalProperties": true
25
+ },
26
+ "groups": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "object",
30
+ "additionalProperties": true
31
+ }
32
+ },
33
+ "components": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "object",
37
+ "additionalProperties": true
38
+ }
39
+ },
40
+ "exclusions": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "object",
44
+ "additionalProperties": true
45
+ }
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "altium-toolkit.pcb.layer-stack.a1",
4
+ "title": "Altium Toolkit PCB Layer Stack A1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema",
9
+ "summary",
10
+ "source",
11
+ "layers",
12
+ "substacks",
13
+ "branches",
14
+ "impedanceProfiles",
15
+ "transmissionLines",
16
+ "viaSpans",
17
+ "backdrillSpans",
18
+ "diagnostics"
19
+ ],
20
+ "properties": {
21
+ "schema": {
22
+ "const": "altium-toolkit.pcb.layer-stack.a1"
23
+ },
24
+ "summary": {
25
+ "type": "object",
26
+ "additionalProperties": true
27
+ },
28
+ "source": {
29
+ "type": "object",
30
+ "additionalProperties": true
31
+ },
32
+ "layers": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "object",
36
+ "additionalProperties": true
37
+ }
38
+ },
39
+ "substacks": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "object",
43
+ "additionalProperties": true
44
+ }
45
+ },
46
+ "branches": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "object",
50
+ "additionalProperties": true
51
+ }
52
+ },
53
+ "impedanceProfiles": {
54
+ "type": "array",
55
+ "items": {
56
+ "type": "object",
57
+ "additionalProperties": true
58
+ }
59
+ },
60
+ "transmissionLines": {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "object",
64
+ "additionalProperties": true
65
+ }
66
+ },
67
+ "viaSpans": {
68
+ "type": "array",
69
+ "items": {
70
+ "type": "object",
71
+ "additionalProperties": true
72
+ }
73
+ },
74
+ "backdrillSpans": {
75
+ "type": "array",
76
+ "items": {
77
+ "type": "object",
78
+ "additionalProperties": true
79
+ }
80
+ },
81
+ "fidelityReport": {
82
+ "type": "object",
83
+ "additionalProperties": true,
84
+ "properties": {
85
+ "schema": {
86
+ "const": "altium-toolkit.pcb.layer-stack-fidelity.a1"
87
+ }
88
+ }
89
+ },
90
+ "diagnostics": {
91
+ "type": "array",
92
+ "items": {
93
+ "type": "object",
94
+ "additionalProperties": true
95
+ }
96
+ }
97
+ }
98
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "altium-toolkit.pcb.layer-stack-fidelity.a1",
4
+ "title": "Altium Toolkit PCB Layer Stack Fidelity A1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema",
9
+ "sourceDocument",
10
+ "summary",
11
+ "capabilities",
12
+ "semanticSections",
13
+ "nativeCacheSections",
14
+ "interchangeOnlySections",
15
+ "unsupportedRegeneration",
16
+ "diagnostics"
17
+ ],
18
+ "properties": {
19
+ "schema": {
20
+ "const": "altium-toolkit.pcb.layer-stack-fidelity.a1"
21
+ },
22
+ "sourceDocument": {
23
+ "type": "string"
24
+ },
25
+ "summary": {
26
+ "type": "object",
27
+ "additionalProperties": true
28
+ },
29
+ "capabilities": {
30
+ "type": "object",
31
+ "additionalProperties": true
32
+ },
33
+ "semanticSections": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "string"
37
+ }
38
+ },
39
+ "nativeCacheSections": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string"
43
+ }
44
+ },
45
+ "interchangeOnlySections": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "string"
49
+ }
50
+ },
51
+ "unsupportedRegeneration": {
52
+ "type": "array",
53
+ "items": {
54
+ "type": "object",
55
+ "additionalProperties": true
56
+ }
57
+ },
58
+ "diagnostics": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "object",
62
+ "additionalProperties": true
63
+ }
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "altium-toolkit.pcb.placed-footprint-extraction.a1",
4
+ "title": "Altium Toolkit PCB Placed Footprint Extraction A1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["schema", "sourceDocument", "summary", "outputs", "indexes"],
8
+ "properties": {
9
+ "schema": {
10
+ "const": "altium-toolkit.pcb.placed-footprint-extraction.a1"
11
+ },
12
+ "sourceDocument": {
13
+ "type": "string"
14
+ },
15
+ "summary": {
16
+ "type": "object",
17
+ "additionalProperties": true
18
+ },
19
+ "outputs": {
20
+ "type": "array",
21
+ "items": {
22
+ "type": "object",
23
+ "additionalProperties": true
24
+ }
25
+ },
26
+ "indexes": {
27
+ "type": "object",
28
+ "additionalProperties": true
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "altium-toolkit.pcb.review-metadata.a1",
4
+ "title": "Altium Toolkit PCB Review Metadata A1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema",
9
+ "summary",
10
+ "routeGroups",
11
+ "routeHighlightProfiles",
12
+ "polygonRealizations",
13
+ "drillReview",
14
+ "boardAssemblyViews",
15
+ "indexes"
16
+ ],
17
+ "properties": {
18
+ "schema": {
19
+ "const": "altium-toolkit.pcb.review-metadata.a1"
20
+ },
21
+ "summary": {
22
+ "type": "object",
23
+ "additionalProperties": true
24
+ },
25
+ "routeGroups": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": "object",
29
+ "additionalProperties": true
30
+ }
31
+ },
32
+ "routeHighlightProfiles": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "object",
36
+ "additionalProperties": true
37
+ }
38
+ },
39
+ "polygonRealizations": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "object",
43
+ "additionalProperties": true
44
+ }
45
+ },
46
+ "drillReview": {
47
+ "type": "object",
48
+ "additionalProperties": true
49
+ },
50
+ "boardAssemblyViews": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "object",
54
+ "additionalProperties": true
55
+ }
56
+ },
57
+ "indexes": {
58
+ "type": "object",
59
+ "additionalProperties": true
60
+ }
61
+ }
62
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "altium-toolkit.pcb.rigid-flex-topology.a1",
4
+ "title": "Altium Toolkit PCB Rigid Flex Topology A1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema",
9
+ "summary",
10
+ "substackRegionJoins",
11
+ "branchGraph",
12
+ "bendLines",
13
+ "diagnostics"
14
+ ],
15
+ "properties": {
16
+ "schema": {
17
+ "const": "altium-toolkit.pcb.rigid-flex-topology.a1"
18
+ },
19
+ "summary": {
20
+ "type": "object",
21
+ "additionalProperties": true
22
+ },
23
+ "substackRegionJoins": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "object",
27
+ "additionalProperties": true
28
+ }
29
+ },
30
+ "branchGraph": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "object",
34
+ "additionalProperties": true
35
+ }
36
+ },
37
+ "bendLines": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "object",
41
+ "additionalProperties": true
42
+ }
43
+ },
44
+ "diagnostics": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "object",
48
+ "additionalProperties": true
49
+ }
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "altium-toolkit.pcblib.parity.a1",
4
+ "title": "Altium Toolkit PcbLib Parity A1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["schema", "summary", "footprints"],
8
+ "properties": {
9
+ "schema": {
10
+ "const": "altium-toolkit.pcblib.parity.a1"
11
+ },
12
+ "summary": {
13
+ "type": "object",
14
+ "additionalProperties": true
15
+ },
16
+ "footprints": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "object",
20
+ "additionalProperties": true
21
+ }
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "altium-toolkit.project.bom-pnp-reconciliation.a1",
4
+ "title": "Altium Toolkit Project BOM/PnP Reconciliation A1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema",
9
+ "summary",
10
+ "schematicBomDesignators",
11
+ "pcbBomDesignators",
12
+ "pnpDesignators",
13
+ "effectiveBomDesignators",
14
+ "noBomDesignators",
15
+ "issues"
16
+ ],
17
+ "properties": {
18
+ "schema": {
19
+ "const": "altium-toolkit.project.bom-pnp-reconciliation.a1"
20
+ },
21
+ "summary": {
22
+ "type": "object",
23
+ "additionalProperties": true
24
+ },
25
+ "schematicBomDesignators": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": "string"
29
+ }
30
+ },
31
+ "pcbBomDesignators": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "string"
35
+ }
36
+ },
37
+ "pnpDesignators": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "string"
41
+ }
42
+ },
43
+ "effectiveBomDesignators": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "string"
47
+ }
48
+ },
49
+ "noBomDesignators": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "string"
53
+ }
54
+ },
55
+ "issues": {
56
+ "type": "array",
57
+ "items": {
58
+ "type": "object",
59
+ "additionalProperties": true
60
+ }
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "altium-toolkit.project.outjob-digest.a1",
4
+ "title": "Altium Toolkit Project OutJob Digest A1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema",
9
+ "summary",
10
+ "documents",
11
+ "outputGroups",
12
+ "expectedArtifacts",
13
+ "outputsByDocumentPath"
14
+ ],
15
+ "properties": {
16
+ "schema": {
17
+ "const": "altium-toolkit.project.outjob-digest.a1"
18
+ },
19
+ "summary": {
20
+ "type": "object",
21
+ "additionalProperties": true
22
+ },
23
+ "documents": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "object",
27
+ "additionalProperties": true
28
+ }
29
+ },
30
+ "outputGroups": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "object",
34
+ "additionalProperties": true
35
+ }
36
+ },
37
+ "expectedArtifacts": {
38
+ "type": "object",
39
+ "additionalProperties": true
40
+ },
41
+ "outputsByDocumentPath": {
42
+ "type": "object",
43
+ "additionalProperties": true
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "altium-toolkit.project-script.a1",
4
+ "title": "Altium Toolkit Project Script A1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["schema", "kind", "fileType", "projectScript"],
8
+ "properties": {
9
+ "schema": {
10
+ "const": "altium-toolkit.project-script.a1"
11
+ },
12
+ "kind": {
13
+ "const": "project-script"
14
+ },
15
+ "fileType": {
16
+ "const": "PrjScr"
17
+ },
18
+ "projectScript": {
19
+ "type": "object",
20
+ "additionalProperties": true,
21
+ "required": ["name", "documents", "scripts", "sections"],
22
+ "properties": {
23
+ "name": {
24
+ "type": "string"
25
+ },
26
+ "documents": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "object",
30
+ "additionalProperties": true
31
+ }
32
+ },
33
+ "scripts": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "object",
37
+ "additionalProperties": true
38
+ }
39
+ },
40
+ "sections": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "object",
44
+ "additionalProperties": true
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "altium-toolkit.schematic.render-ops.a1",
4
+ "title": "Altium Toolkit Schematic Render Operations A1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["schema", "profile", "coordinateSpace", "summary", "records"],
8
+ "properties": {
9
+ "schema": {
10
+ "const": "altium-toolkit.schematic.render-ops.a1"
11
+ },
12
+ "profile": {
13
+ "type": "string"
14
+ },
15
+ "coordinateSpace": {
16
+ "type": "object",
17
+ "additionalProperties": true
18
+ },
19
+ "summary": {
20
+ "type": "object",
21
+ "additionalProperties": true
22
+ },
23
+ "records": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "object",
27
+ "additionalProperties": true,
28
+ "required": [
29
+ "elementKey",
30
+ "recordId",
31
+ "primitive",
32
+ "operations"
33
+ ],
34
+ "properties": {
35
+ "elementKey": {
36
+ "type": "string"
37
+ },
38
+ "recordId": {
39
+ "type": "string"
40
+ },
41
+ "primitive": {
42
+ "type": "string"
43
+ },
44
+ "operations": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "object",
48
+ "additionalProperties": true
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "altium-toolkit.schematic.template-extraction.a1",
4
+ "title": "Altium Toolkit Schematic Template Extraction A1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema",
9
+ "sourceDocument",
10
+ "template",
11
+ "summary",
12
+ "diagnostics"
13
+ ],
14
+ "properties": {
15
+ "schema": {
16
+ "const": "altium-toolkit.schematic.template-extraction.a1"
17
+ },
18
+ "sourceDocument": {
19
+ "type": "string"
20
+ },
21
+ "template": {
22
+ "type": ["object", "null"],
23
+ "additionalProperties": true
24
+ },
25
+ "summary": {
26
+ "type": "object",
27
+ "additionalProperties": true
28
+ },
29
+ "diagnostics": {
30
+ "type": "array",
31
+ "items": {
32
+ "type": "object",
33
+ "additionalProperties": true
34
+ }
35
+ }
36
+ }
37
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "altium-toolkit",
3
- "version": "1.0.10",
3
+ "version": "1.1.0",
4
4
  "description": "Altium document parsing and non-interactive rendering utilities",
5
5
  "keywords": [
6
6
  "altium",