@tscircuit/core 0.0.702 → 0.0.704

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 CHANGED
@@ -165,7 +165,7 @@ interface SimpleRouteJson {
165
165
  traces?: SimplifiedPcbTrace[];
166
166
  }
167
167
 
168
- type RootCircuitEventName = "asyncEffect:start" | "asyncEffect:end" | "renderable:renderLifecycle:anyEvent" | `renderable:renderLifecycle:${RenderPhase}:start` | `renderable:renderLifecycle:${RenderPhase}:end` | `board:renderPhaseStarted` | "external:evalError" | "autorouting:start" | "autorouting:end" | "autorouting:error" | "autorouting:progress" | "renderComplete";
168
+ type RootCircuitEventName = "asyncEffect:start" | "asyncEffect:end" | "renderable:renderLifecycle:anyEvent" | `renderable:renderLifecycle:${RenderPhase}:start` | `renderable:renderLifecycle:${RenderPhase}:end` | `board:renderPhaseStarted` | "external:evalError" | "autorouting:start" | "autorouting:end" | "autorouting:error" | "autorouting:progress" | "renderComplete" | "debug:logOutput";
169
169
  interface AutoroutingStartEvent {
170
170
  type: "autorouting:start";
171
171
  subcircuit_id: string;
@@ -194,6 +194,11 @@ interface AutoroutingProgressEvent {
194
194
  interface AutoroutingEndEvent {
195
195
  type: "autorouting:end";
196
196
  }
197
+ interface DebugLogOutputEvent {
198
+ type: "debug:logOutput";
199
+ name: string;
200
+ content: any;
201
+ }
197
202
 
198
203
  declare class RootCircuit {
199
204
  firstChild: PrimitiveComponent | null;
@@ -21688,4 +21693,4 @@ declare module "react/jsx-runtime" {
21688
21693
  }
21689
21694
  }
21690
21695
 
21691
- export { type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingEndEvent, type AutoroutingErrorEvent, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Breakout, BreakoutPoint, Capacitor, Chip, Circuit, type ComponentWithPins, Constraint, Crystal, Cutout, Diode, FabricationNotePath, FabricationNoteText, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IRenderable, Inductor, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, Net, NetLabel, NormalComponent, type Obstacle, PcbTrace, PinHeader, type PinLabelSpec, Pinout, PlatedHole, Port, Potentiometer, PowerSource, PrimitiveComponent, Project, PushButton, type RenderPhase, type RenderPhaseFn, type RenderPhaseFunctions, type RenderPhaseStates, Renderable, Resistor, Resonator, RootCircuit, type RootCircuitEventName, SchematicBox, SchematicCell, SchematicRow, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, SolderJumper, Subcircuit, Switch, TestPoint, Trace, TraceHint, Transistor, Via, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
21696
+ export { type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingEndEvent, type AutoroutingErrorEvent, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Breakout, BreakoutPoint, Capacitor, Chip, Circuit, type ComponentWithPins, Constraint, Crystal, Cutout, type DebugLogOutputEvent, Diode, FabricationNotePath, FabricationNoteText, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IRenderable, Inductor, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, Net, NetLabel, NormalComponent, type Obstacle, PcbTrace, PinHeader, type PinLabelSpec, Pinout, PlatedHole, Port, Potentiometer, PowerSource, PrimitiveComponent, Project, PushButton, type RenderPhase, type RenderPhaseFn, type RenderPhaseFunctions, type RenderPhaseStates, Renderable, Resistor, Resonator, RootCircuit, type RootCircuitEventName, SchematicBox, SchematicCell, SchematicRow, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, SolderJumper, Subcircuit, Switch, TestPoint, Trace, TraceHint, Transistor, Via, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
package/dist/index.js CHANGED
@@ -8859,10 +8859,11 @@ function Group_doInitialSchematicLayoutMatchPack(group) {
8859
8859
  debug5("Converting circuit tree to InputProblem...");
8860
8860
  const inputProblem = convertTreeToInputProblem(tree, db, group);
8861
8861
  if (debug5.enabled) {
8862
- global.debugOutputs?.add(
8863
- `matchpack-input-problem-${group.name}`,
8864
- JSON.stringify(inputProblem, null, 2)
8865
- );
8862
+ group.root?.emit("debug:logOutput", {
8863
+ type: "debug:logOutput",
8864
+ name: `matchpack-input-problem-${group.name}`,
8865
+ content: JSON.stringify(inputProblem, null, 2)
8866
+ });
8866
8867
  }
8867
8868
  const solver = new LayoutPipelineSolver(inputProblem);
8868
8869
  debug5("Starting LayoutPipelineSolver...");
@@ -9782,11 +9783,16 @@ var Group_doInitialPcbLayoutPack = (group) => {
9782
9783
  minGap: gapMm
9783
9784
  };
9784
9785
  if (debug6.enabled) {
9785
- global.debugOutputs?.add(
9786
- `packInput-circuitjson-${group.name}`,
9787
- JSON.stringify(db.toArray())
9788
- );
9789
- global.debugOutputs?.add(`packInput-${group.name}`, packInput);
9786
+ group.root?.emit("debug:logOutput", {
9787
+ type: "debug:logOutput",
9788
+ name: `packInput-circuitjson-${group.name}`,
9789
+ content: JSON.stringify(db.toArray())
9790
+ });
9791
+ group.root?.emit("debug:logOutput", {
9792
+ type: "debug:logOutput",
9793
+ name: `packInput-${group.name}`,
9794
+ content: packInput
9795
+ });
9790
9796
  }
9791
9797
  const packOutput = pack(packInput);
9792
9798
  if (debug6.enabled) {
@@ -10825,10 +10831,11 @@ var Group_doInitialSchematicTraceRender = (group) => {
10825
10831
  } = createSchematicTraceSolverInputProblem(group);
10826
10832
  const schematicPortIdsWithPreExistingNetLabels = getSchematicPortIdsWithAssignedNetLabels(group);
10827
10833
  if (debug9.enabled) {
10828
- globalThis.debugOutputs?.add(
10829
- "group-trace-render-input-problem",
10830
- JSON.stringify(inputProblem, null, 2)
10831
- );
10834
+ group.root?.emit("debug:logOutput", {
10835
+ type: "debug:logOutput",
10836
+ name: "group-trace-render-input-problem",
10837
+ content: JSON.stringify(inputProblem, null, 2)
10838
+ });
10832
10839
  }
10833
10840
  const solver = new SchematicTracePipelineSolver4(inputProblem);
10834
10841
  solver.solve();
@@ -14358,7 +14365,7 @@ import { identity as identity6 } from "transformation-matrix";
14358
14365
  var package_default = {
14359
14366
  name: "@tscircuit/core",
14360
14367
  type: "module",
14361
- version: "0.0.701",
14368
+ version: "0.0.703",
14362
14369
  types: "dist/index.d.ts",
14363
14370
  main: "dist/index.js",
14364
14371
  module: "dist/index.js",
@@ -14453,7 +14460,7 @@ var package_default = {
14453
14460
  dependencies: {
14454
14461
  "@flatten-js/core": "^1.6.2",
14455
14462
  "@lume/kiwi": "^0.4.3",
14456
- "calculate-packing": "0.0.31",
14463
+ "calculate-packing": "0.0.33",
14457
14464
  "css-select": "5.1.0",
14458
14465
  "format-si-unit": "^0.0.3",
14459
14466
  nanoid: "^5.0.7",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.702",
4
+ "version": "0.0.704",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -96,7 +96,7 @@
96
96
  "dependencies": {
97
97
  "@flatten-js/core": "^1.6.2",
98
98
  "@lume/kiwi": "^0.4.3",
99
- "calculate-packing": "0.0.31",
99
+ "calculate-packing": "0.0.33",
100
100
  "css-select": "5.1.0",
101
101
  "format-si-unit": "^0.0.3",
102
102
  "nanoid": "^5.0.7",