altium-toolkit 1.1.40 → 1.2.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.
- package/README.md +113 -19
- package/docs/api.md +224 -18
- package/docs/capabilities.md +65 -0
- package/docs/migration/legacy-001.md +309 -0
- package/docs/migration/legacy-002.md +309 -0
- package/docs/migration/legacy-003.md +309 -0
- package/docs/migration/legacy-004.md +309 -0
- package/docs/migration/legacy-005.md +111 -0
- package/docs/migration.md +20 -0
- package/docs/model-format.md +28 -3
- package/docs/release-notes-v1.2.0.md +147 -0
- package/docs/testing.md +43 -1
- package/examples/arduino-uno/PcbThreeSceneRenderer.mjs +1 -1
- package/examples/arduino-uno/example.mjs +1 -1
- package/examples/cli-utils.mjs +1 -1
- package/examples/corpus-smoke.mjs +1 -1
- package/examples/inspect-board.mjs +1 -1
- package/examples/library-catalog.mjs +1 -1
- package/examples/validate-library.mjs +1 -1
- package/package.json +20 -5
- package/spec/api-baseline-v1.1.41.json +1 -0
- package/spec/asset-baseline-v1.1.41.json +1 -0
- package/spec/feature-preservation.json +1 -0
- package/spec/library-scope.md +14 -4
- package/spec/native-source-manifest-v1.1.41.json +1 -0
- package/src/capabilities.mjs +4 -0
- package/src/convergence/AltiumCircuitJsonProjection.mjs +230 -0
- package/src/convergence/AltiumDocumentBuilder.mjs +167 -0
- package/src/convergence/AltiumExtensionResolver.mjs +98 -0
- package/src/convergence/AltiumProjectDocumentResolver.mjs +324 -0
- package/src/convergence/AltiumSchematicCoordinateProjection.mjs +130 -0
- package/src/convergence/AltiumWorkerClient.mjs +95 -0
- package/src/convergence/Parser.mjs +285 -0
- package/src/convergence/ParserInput.mjs +282 -0
- package/src/convergence/ProjectLoader.mjs +916 -0
- package/src/convergence/SchematicSvgRenderer.mjs +126 -0
- package/src/convergence/ToolkitCapabilities.mjs +49 -0
- package/src/core/altium/AltiumLayoutParser.mjs +9 -4
- package/src/core/altium/PcbLayerStackReadModelBuilder.mjs +1 -0
- package/src/core/circuit-json/CircuitJsonSchematicDocumentGraphicBuilder.mjs +785 -0
- package/src/core/circuit-json/CircuitJsonSchematicGraphicBuilder.mjs +909 -0
- package/src/core/circuit-json/CircuitJsonSchematicImageProjection.mjs +277 -0
- package/src/core/circuit-json/CircuitJsonSchematicStrokeStyle.mjs +47 -0
- package/src/extensions.mjs +11 -0
- package/src/index.mjs +20 -4
- package/src/interaction.mjs +7 -0
- package/src/legacy-netlist-query.mjs +11 -0
- package/src/legacy-parser.mjs +141 -0
- package/src/legacy-renderers.mjs +25 -0
- package/src/legacy-scene3d.mjs +10 -0
- package/src/manufacturing.mjs +4 -0
- package/src/parser.mjs +12 -138
- package/src/project.mjs +11 -0
- package/src/query.mjs +4 -0
- package/src/renderers.mjs +4 -22
- package/src/scene3d.mjs +5 -8
- package/src/simulation.mjs +4 -0
- package/src/styles/altium-renderers.css +67 -1
- package/src/styles/renderers.css +27 -0
- package/src/testing.mjs +8 -0
- package/src/ui/PcbInteractionLayerModel.mjs +6 -2
- package/src/ui/PcbPadMaskApertureRenderer.mjs +288 -0
- package/src/ui/PcbSvgRenderer.mjs +674 -38
- package/src/workers/parser.worker.mjs +37 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 André Fiedler
|
|
2
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
3
|
+
|
|
4
|
+
import { ToolkitWorkerProtocol } from 'circuitjson-toolkit/parser'
|
|
5
|
+
|
|
6
|
+
import { Parser } from '../convergence/Parser.mjs'
|
|
7
|
+
import { ProjectLoader } from '../convergence/ProjectLoader.mjs'
|
|
8
|
+
|
|
9
|
+
ToolkitWorkerProtocol.install(self, {
|
|
10
|
+
/**
|
|
11
|
+
* Parses one worker payload through the direct Altium path.
|
|
12
|
+
* @param {Record<string, any>} payload Protocol payload.
|
|
13
|
+
* @param {Record<string, any>} runtime Request runtime.
|
|
14
|
+
* @returns {Promise<Record<string, any>>} Canonical document.
|
|
15
|
+
*/
|
|
16
|
+
parse: async (payload, runtime) =>
|
|
17
|
+
await Parser.parseAsync(payload.input, {
|
|
18
|
+
...(payload.options || {}),
|
|
19
|
+
worker: false,
|
|
20
|
+
signal: runtime.signal,
|
|
21
|
+
onProgress: runtime.onProgress
|
|
22
|
+
}),
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Loads one worker project through the direct Altium path.
|
|
26
|
+
* @param {Record<string, any>} payload Protocol payload.
|
|
27
|
+
* @param {Record<string, any>} runtime Request runtime.
|
|
28
|
+
* @returns {Promise<Record<string, any>>} Canonical project.
|
|
29
|
+
*/
|
|
30
|
+
loadProject: async (payload, runtime) =>
|
|
31
|
+
await ProjectLoader.loadAsync(payload.entries, {
|
|
32
|
+
...(payload.options || {}),
|
|
33
|
+
worker: false,
|
|
34
|
+
signal: runtime.signal,
|
|
35
|
+
onProgress: runtime.onProgress
|
|
36
|
+
})
|
|
37
|
+
})
|