@tscircuit/core 0.0.455 → 0.0.456
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 +8 -1
- package/dist/index.js +21 -5
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -207,9 +207,16 @@ declare class RootCircuit {
|
|
|
207
207
|
*/
|
|
208
208
|
name?: string;
|
|
209
209
|
platform?: PlatformConfig;
|
|
210
|
+
/**
|
|
211
|
+
* Optional URL pointing to where this project is hosted or documented.
|
|
212
|
+
* When provided it is stored in the source_project_metadata.project_url field
|
|
213
|
+
* of the generated Circuit JSON.
|
|
214
|
+
*/
|
|
215
|
+
projectUrl?: string;
|
|
210
216
|
_hasRenderedAtleastOnce: boolean;
|
|
211
|
-
constructor({ platform }?: {
|
|
217
|
+
constructor({ platform, projectUrl, }?: {
|
|
212
218
|
platform?: PlatformConfig;
|
|
219
|
+
projectUrl?: string;
|
|
213
220
|
});
|
|
214
221
|
add(componentOrElm: PrimitiveComponent | ReactElement): void;
|
|
215
222
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1155,6 +1155,7 @@ var ErrorPlaceholderComponent = class extends PrimitiveComponent2 {
|
|
|
1155
1155
|
const schematicPosition = this._getGlobalSchematicPositionBeforeLayout();
|
|
1156
1156
|
this.root.db.source_failed_to_create_component_error.insert({
|
|
1157
1157
|
component_name: this._parsedProps.component_name,
|
|
1158
|
+
error_type: "source_failed_to_create_component_error",
|
|
1158
1159
|
message: this._parsedProps.error?.formattedError?._errors?.join("; ") || this._parsedProps.message,
|
|
1159
1160
|
pcb_center: pcbPosition,
|
|
1160
1161
|
schematic_center: schematicPosition
|
|
@@ -6674,6 +6675,7 @@ function Group_doInitialSchematicLayoutMatchAdapt(group) {
|
|
|
6674
6675
|
} catch (e) {
|
|
6675
6676
|
db.schematic_layout_error.insert({
|
|
6676
6677
|
message: `Match-adapt layout failed: ${e.toString()}`,
|
|
6678
|
+
error_type: "schematic_layout_error",
|
|
6677
6679
|
source_group_id: group.source_group_id,
|
|
6678
6680
|
schematic_group_id: group.schematic_group_id
|
|
6679
6681
|
});
|
|
@@ -7311,6 +7313,7 @@ var Group = class extends NormalComponent {
|
|
|
7311
7313
|
if (job.has_error) {
|
|
7312
7314
|
db.pcb_autorouting_error.insert({
|
|
7313
7315
|
pcb_error_id: autorouting_job.autorouting_job_id,
|
|
7316
|
+
error_type: "pcb_autorouting_error",
|
|
7314
7317
|
message: job.error?.message ?? JSON.stringify(job.error)
|
|
7315
7318
|
});
|
|
7316
7319
|
throw new Error(`Autorouting job failed: ${JSON.stringify(job.error)}`);
|
|
@@ -7379,6 +7382,7 @@ var Group = class extends NormalComponent {
|
|
|
7379
7382
|
const { db: db2 } = this.root;
|
|
7380
7383
|
db2.pcb_autorouting_error.insert({
|
|
7381
7384
|
pcb_error_id: `pcb_autorouter_error_subcircuit_${this.subcircuit_id}`,
|
|
7385
|
+
error_type: "pcb_autorouting_error",
|
|
7382
7386
|
message: error instanceof Error ? error.message : String(error)
|
|
7383
7387
|
});
|
|
7384
7388
|
this.root?.emit("autorouting:error", {
|
|
@@ -9507,7 +9511,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
9507
9511
|
var package_default = {
|
|
9508
9512
|
name: "@tscircuit/core",
|
|
9509
9513
|
type: "module",
|
|
9510
|
-
version: "0.0.
|
|
9514
|
+
version: "0.0.455",
|
|
9511
9515
|
types: "dist/index.d.ts",
|
|
9512
9516
|
main: "dist/index.js",
|
|
9513
9517
|
module: "dist/index.js",
|
|
@@ -9550,7 +9554,7 @@ var package_default = {
|
|
|
9550
9554
|
"@types/react-reconciler": "^0.28.9",
|
|
9551
9555
|
"bun-match-svg": "0.0.8",
|
|
9552
9556
|
"chokidar-cli": "^3.0.0",
|
|
9553
|
-
"circuit-json": "^0.0.
|
|
9557
|
+
"circuit-json": "^0.0.201",
|
|
9554
9558
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
9555
9559
|
"circuit-json-to-simple-3d": "^0.0.2",
|
|
9556
9560
|
"circuit-to-svg": "^0.0.151",
|
|
@@ -9612,12 +9616,22 @@ var RootCircuit = class {
|
|
|
9612
9616
|
*/
|
|
9613
9617
|
name;
|
|
9614
9618
|
platform;
|
|
9619
|
+
/**
|
|
9620
|
+
* Optional URL pointing to where this project is hosted or documented.
|
|
9621
|
+
* When provided it is stored in the source_project_metadata.project_url field
|
|
9622
|
+
* of the generated Circuit JSON.
|
|
9623
|
+
*/
|
|
9624
|
+
projectUrl;
|
|
9615
9625
|
_hasRenderedAtleastOnce = false;
|
|
9616
|
-
constructor({
|
|
9626
|
+
constructor({
|
|
9627
|
+
platform,
|
|
9628
|
+
projectUrl
|
|
9629
|
+
} = {}) {
|
|
9617
9630
|
this.children = [];
|
|
9618
9631
|
this.db = su5([]);
|
|
9619
9632
|
this.root = this;
|
|
9620
9633
|
this.platform = platform;
|
|
9634
|
+
this.projectUrl = projectUrl;
|
|
9621
9635
|
}
|
|
9622
9636
|
add(componentOrElm) {
|
|
9623
9637
|
let component;
|
|
@@ -9669,9 +9683,11 @@ var RootCircuit = class {
|
|
|
9669
9683
|
this._hasRenderedAtleastOnce = true;
|
|
9670
9684
|
}
|
|
9671
9685
|
async renderUntilSettled() {
|
|
9672
|
-
|
|
9686
|
+
const existing = this.db.source_project_metadata.list()?.[0];
|
|
9687
|
+
if (!existing) {
|
|
9673
9688
|
this.db.source_project_metadata.insert({
|
|
9674
|
-
software_used_string: `@tscircuit/core@${this.getCoreVersion()}
|
|
9689
|
+
software_used_string: `@tscircuit/core@${this.getCoreVersion()}`,
|
|
9690
|
+
...this.projectUrl ? { project_url: this.projectUrl } : {}
|
|
9675
9691
|
});
|
|
9676
9692
|
}
|
|
9677
9693
|
this.render();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.456",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@types/react-reconciler": "^0.28.9",
|
|
45
45
|
"bun-match-svg": "0.0.8",
|
|
46
46
|
"chokidar-cli": "^3.0.0",
|
|
47
|
-
"circuit-json": "^0.0.
|
|
47
|
+
"circuit-json": "^0.0.201",
|
|
48
48
|
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
49
49
|
"circuit-json-to-simple-3d": "^0.0.2",
|
|
50
50
|
"circuit-to-svg": "^0.0.151",
|