@tscircuit/core 0.0.1255 → 0.0.1257
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 +3 -1
- package/dist/index.js +41 -37
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -153685,6 +153685,8 @@ interface TscircuitElements {
|
|
|
153685
153685
|
trace: _tscircuit_props.TraceProps;
|
|
153686
153686
|
breakout: _tscircuit_props.BreakoutProps;
|
|
153687
153687
|
breakoutpoint: _tscircuit_props.BreakoutPointProps;
|
|
153688
|
+
fanout: _tscircuit_props.BreakoutProps;
|
|
153689
|
+
fanoutpoint: _tscircuit_props.BreakoutPointProps;
|
|
153688
153690
|
autoroutingphase: _tscircuit_props.AutoroutingPhaseProps;
|
|
153689
153691
|
custom: any;
|
|
153690
153692
|
component: _tscircuit_props.ComponentProps;
|
|
@@ -153746,4 +153748,4 @@ declare module "react/jsx-runtime" {
|
|
|
153746
153748
|
}
|
|
153747
153749
|
}
|
|
153748
153750
|
|
|
153749
|
-
export { AnalogSimulation, type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingEndEvent, type AutoroutingErrorEvent, AutoroutingPhase, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Breakout, BreakoutPoint, CadAssembly, CadModel, Capacitor, Chip, Circuit, type ComponentWithPins, Connector, Constraint, CopperPour, CopperText, CourtyardCircle, CourtyardOutline, CourtyardRect, Crystal, CurrentSource, Cutout, type DebugLogOutputEvent, Diode, FabricationNoteDimension, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Fiducial, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IIsolatedCircuit, type IRenderable, type IRootCircuit, Inductor, Interconnect, IsolatedCircuit, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, MountedBoard, Net, NetLabel, NormalComponent, type Obstacle, OpAmp, type PackingEndEvent, type PackingErrorEvent, type PackingStartEvent, Panel, PcbNoteDimension, PcbNoteLine, PcbNotePath, PcbNoteRect, PcbNoteText, PcbTrace, PcbVia, 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, SOLVERS, SchematicArc, SchematicBox, SchematicCell, SchematicCircle, SchematicLine, SchematicPath, SchematicRect, SchematicRow, SchematicSection, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, SolderJumper, type SolverName, type SolverStartedEvent, Subcircuit, Subpanel, Switch, SymbolComponent as Symbol, TestPoint, Trace, TraceHint, Transistor, Via, VoltageProbe, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, renderPhaseIndexMap, resolveStaticFileImport, sel, unrouteCircuitJson, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
|
153751
|
+
export { AnalogSimulation, type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingEndEvent, type AutoroutingErrorEvent, AutoroutingPhase, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Breakout, BreakoutPoint, CadAssembly, CadModel, Capacitor, Chip, Circuit, type ComponentWithPins, Connector, Constraint, CopperPour, CopperText, CourtyardCircle, CourtyardOutline, CourtyardRect, Crystal, CurrentSource, Cutout, type DebugLogOutputEvent, Diode, FabricationNoteDimension, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Breakout as Fanout, BreakoutPoint as FanoutPoint, Fiducial, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IIsolatedCircuit, type IRenderable, type IRootCircuit, Inductor, Interconnect, IsolatedCircuit, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, MountedBoard, Net, NetLabel, NormalComponent, type Obstacle, OpAmp, type PackingEndEvent, type PackingErrorEvent, type PackingStartEvent, Panel, PcbNoteDimension, PcbNoteLine, PcbNotePath, PcbNoteRect, PcbNoteText, PcbTrace, PcbVia, 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, SOLVERS, SchematicArc, SchematicBox, SchematicCell, SchematicCircle, SchematicLine, SchematicPath, SchematicRect, SchematicRow, SchematicSection, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, SolderJumper, type SolverName, type SolverStartedEvent, Subcircuit, Subpanel, Switch, SymbolComponent as Symbol, TestPoint, Trace, TraceHint, Transistor, Via, VoltageProbe, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, renderPhaseIndexMap, resolveStaticFileImport, sel, unrouteCircuitJson, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
package/dist/index.js
CHANGED
|
@@ -32,6 +32,8 @@ __export(components_exports, {
|
|
|
32
32
|
FabricationNotePath: () => FabricationNotePath,
|
|
33
33
|
FabricationNoteRect: () => FabricationNoteRect,
|
|
34
34
|
FabricationNoteText: () => FabricationNoteText,
|
|
35
|
+
Fanout: () => Breakout,
|
|
36
|
+
FanoutPoint: () => BreakoutPoint,
|
|
35
37
|
Fiducial: () => Fiducial,
|
|
36
38
|
Footprint: () => Footprint,
|
|
37
39
|
Fuse: () => Fuse,
|
|
@@ -10783,6 +10785,38 @@ async function resolveStaticFileImport(path, platform) {
|
|
|
10783
10785
|
return constructAssetUrl(normalizedPath, platform?.projectBaseUrl);
|
|
10784
10786
|
}
|
|
10785
10787
|
|
|
10788
|
+
// lib/utils/connectors/extractCadModelFromCircuitJson.ts
|
|
10789
|
+
import { cadModelProp } from "@tscircuit/props";
|
|
10790
|
+
var extractCadModelFromCircuitJson = (circuitJson) => {
|
|
10791
|
+
const cadComponent = circuitJson.find(
|
|
10792
|
+
(elm) => elm.type === "cad_component"
|
|
10793
|
+
);
|
|
10794
|
+
if (!cadComponent) return void 0;
|
|
10795
|
+
const cadModelCandidate = {
|
|
10796
|
+
stlUrl: cadComponent.model_stl_url,
|
|
10797
|
+
objUrl: cadComponent.model_obj_url,
|
|
10798
|
+
gltfUrl: cadComponent.model_gltf_url,
|
|
10799
|
+
glbUrl: cadComponent.model_glb_url,
|
|
10800
|
+
stepUrl: cadComponent.model_step_url,
|
|
10801
|
+
wrlUrl: cadComponent.model_wrl_url,
|
|
10802
|
+
modelOriginPosition: cadComponent.model_origin_position ?? void 0,
|
|
10803
|
+
modelUnitToMmScale: cadComponent.model_unit_to_mm_scale_factor,
|
|
10804
|
+
modelBoardNormalDirection: cadComponent.model_board_normal_direction,
|
|
10805
|
+
size: cadComponent.size ?? void 0,
|
|
10806
|
+
rotationOffset: cadComponent.rotation ?? void 0,
|
|
10807
|
+
positionOffset: cadComponent.position ?? void 0,
|
|
10808
|
+
showAsTranslucentModel: cadComponent.show_as_translucent_model
|
|
10809
|
+
};
|
|
10810
|
+
if (!cadModelCandidate.stlUrl && !cadModelCandidate.objUrl && !cadModelCandidate.gltfUrl && !cadModelCandidate.glbUrl && !cadModelCandidate.stepUrl && !cadModelCandidate.wrlUrl && !cadComponent.model_jscad) {
|
|
10811
|
+
return void 0;
|
|
10812
|
+
}
|
|
10813
|
+
if (cadComponent.model_jscad && typeof cadComponent.model_jscad === "object") {
|
|
10814
|
+
cadModelCandidate.jscad = cadComponent.model_jscad;
|
|
10815
|
+
}
|
|
10816
|
+
const parsedCadModel = cadModelProp.safeParse(cadModelCandidate);
|
|
10817
|
+
return parsedCadModel.success ? parsedCadModel.data : void 0;
|
|
10818
|
+
};
|
|
10819
|
+
|
|
10786
10820
|
// lib/components/base-components/NormalComponent/NormalComponent_doInitialPcbFootprintStringRender.ts
|
|
10787
10821
|
function NormalComponent_doInitialPcbFootprintStringRender(component, queueAsyncEffect) {
|
|
10788
10822
|
let { footprint } = component.props;
|
|
@@ -10910,9 +10944,7 @@ function NormalComponent_doInitialPcbFootprintStringRender(component, queueAsync
|
|
|
10910
10944
|
const fpWrapper = new Footprint({ src: footprint });
|
|
10911
10945
|
for (const c of fpComponents) fpWrapper.add(c);
|
|
10912
10946
|
component.add(fpWrapper);
|
|
10913
|
-
|
|
10914
|
-
component._asyncFootprintCadModel = result.cadModel;
|
|
10915
|
-
}
|
|
10947
|
+
component._asyncFootprintCadModel = !Array.isArray(result) && result.cadModel || extractCadModelFromCircuitJson(circuitJson);
|
|
10916
10948
|
for (const child of component.children) {
|
|
10917
10949
|
if (child.componentName === "Port") {
|
|
10918
10950
|
child._markDirty?.("PcbPortRender");
|
|
@@ -21356,7 +21388,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
21356
21388
|
var package_default = {
|
|
21357
21389
|
name: "@tscircuit/core",
|
|
21358
21390
|
type: "module",
|
|
21359
|
-
version: "0.0.
|
|
21391
|
+
version: "0.0.1256",
|
|
21360
21392
|
types: "dist/index.d.ts",
|
|
21361
21393
|
main: "dist/index.js",
|
|
21362
21394
|
module: "dist/index.js",
|
|
@@ -25297,38 +25329,6 @@ var convertCircuitJsonToUsbCStandardCircuitJson = (partCircuitJson) => {
|
|
|
25297
25329
|
});
|
|
25298
25330
|
};
|
|
25299
25331
|
|
|
25300
|
-
// lib/utils/connectors/extractCadModelFromCircuitJson.ts
|
|
25301
|
-
import { cadModelProp } from "@tscircuit/props";
|
|
25302
|
-
var extractCadModelFromCircuitJson = (circuitJson) => {
|
|
25303
|
-
const cadComponent = circuitJson.find(
|
|
25304
|
-
(elm) => elm.type === "cad_component"
|
|
25305
|
-
);
|
|
25306
|
-
if (!cadComponent) return void 0;
|
|
25307
|
-
const cadModelCandidate = {
|
|
25308
|
-
stlUrl: cadComponent.model_stl_url,
|
|
25309
|
-
objUrl: cadComponent.model_obj_url,
|
|
25310
|
-
gltfUrl: cadComponent.model_gltf_url,
|
|
25311
|
-
glbUrl: cadComponent.model_glb_url,
|
|
25312
|
-
stepUrl: cadComponent.model_step_url,
|
|
25313
|
-
wrlUrl: cadComponent.model_wrl_url,
|
|
25314
|
-
modelOriginPosition: cadComponent.model_origin_position ?? void 0,
|
|
25315
|
-
modelUnitToMmScale: cadComponent.model_unit_to_mm_scale_factor,
|
|
25316
|
-
modelBoardNormalDirection: cadComponent.model_board_normal_direction,
|
|
25317
|
-
size: cadComponent.size ?? void 0,
|
|
25318
|
-
rotationOffset: cadComponent.rotation ?? void 0,
|
|
25319
|
-
positionOffset: cadComponent.position ?? void 0,
|
|
25320
|
-
showAsTranslucentModel: cadComponent.show_as_translucent_model
|
|
25321
|
-
};
|
|
25322
|
-
if (!cadModelCandidate.stlUrl && !cadModelCandidate.objUrl && !cadModelCandidate.gltfUrl && !cadModelCandidate.glbUrl && !cadModelCandidate.stepUrl && !cadModelCandidate.wrlUrl && !cadComponent.model_jscad) {
|
|
25323
|
-
return void 0;
|
|
25324
|
-
}
|
|
25325
|
-
if (cadComponent.model_jscad && typeof cadComponent.model_jscad === "object") {
|
|
25326
|
-
cadModelCandidate.jscad = cadComponent.model_jscad;
|
|
25327
|
-
}
|
|
25328
|
-
const parsedCadModel = cadModelProp.safeParse(cadModelCandidate);
|
|
25329
|
-
return parsedCadModel.success ? parsedCadModel.data : void 0;
|
|
25330
|
-
};
|
|
25331
|
-
|
|
25332
25332
|
// lib/components/normal-components/Connector.ts
|
|
25333
25333
|
import { symbols as symbols4 } from "schematic-symbols";
|
|
25334
25334
|
|
|
@@ -27883,7 +27883,9 @@ import { kicadFootprintStrings } from "@tscircuit/props";
|
|
|
27883
27883
|
// lib/register-catalogue.ts
|
|
27884
27884
|
extendCatalogue(components_exports);
|
|
27885
27885
|
extendCatalogue({
|
|
27886
|
-
Bug: Chip
|
|
27886
|
+
Bug: Chip,
|
|
27887
|
+
Fanout: Breakout,
|
|
27888
|
+
FanoutPoint: BreakoutPoint
|
|
27887
27889
|
});
|
|
27888
27890
|
export {
|
|
27889
27891
|
AnalogSimulation,
|
|
@@ -27912,6 +27914,8 @@ export {
|
|
|
27912
27914
|
FabricationNotePath,
|
|
27913
27915
|
FabricationNoteRect,
|
|
27914
27916
|
FabricationNoteText,
|
|
27917
|
+
Breakout as Fanout,
|
|
27918
|
+
BreakoutPoint as FanoutPoint,
|
|
27915
27919
|
Fiducial,
|
|
27916
27920
|
Footprint,
|
|
27917
27921
|
Fuse,
|