@tscircuit/core 0.0.278 → 0.0.280
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 +28 -1
- package/dist/index.js +22 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -9933,6 +9933,33 @@ type RenderEvent = {
|
|
|
9933
9933
|
*/
|
|
9934
9934
|
declare const getPhaseTimingsFromRenderEvents: (renderEvents: RenderEvent[]) => Record<string, number>;
|
|
9935
9935
|
|
|
9936
|
+
type Nums16 = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16";
|
|
9937
|
+
type Nums40 = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "40";
|
|
9938
|
+
type PinNumbers100 = "pin1" | "pin2" | "pin3" | "pin4" | "pin5" | "pin6" | "pin7" | "pin8" | "pin9" | "pin10" | "pin11" | "pin12" | "pin13" | "pin14" | "pin15" | "pin16" | "pin17" | "pin18" | "pin19" | "pin20" | "pin21" | "pin22" | "pin23" | "pin24" | "pin25" | "pin26" | "pin27" | "pin28" | "pin29" | "pin30" | "pin31" | "pin32" | "pin33" | "pin34" | "pin35" | "pin36" | "pin37" | "pin38" | "pin39" | "pin40" | "pin41" | "pin42" | "pin43" | "pin44" | "pin45" | "pin46" | "pin47" | "pin48" | "pin49" | "pin50" | "pin51" | "pin52" | "pin53" | "pin54" | "pin55" | "pin56" | "pin57" | "pin58" | "pin59" | "pin60" | "pin61" | "pin62" | "pin63" | "pin64" | "pin65" | "pin66" | "pin67" | "pin68" | "pin69" | "pin70" | "pin71" | "pin72" | "pin73" | "pin74" | "pin75" | "pin76" | "pin77" | "pin78" | "pin79" | "pin80" | "pin81" | "pin82" | "pin83" | "pin84" | "pin85" | "pin86" | "pin87" | "pin88" | "pin89" | "pin90" | "pin91" | "pin92" | "pin93" | "pin94" | "pin95" | "pin96" | "pin97" | "pin98" | "pin99" | "pin100";
|
|
9939
|
+
type CommonPinNames = "pos" | "neg" | "V5" | "V3_3" | "VCC" | "VDD" | "GND" | `D${Nums40}` | `GP${Nums40}` | `GPIO${Nums40}` | "DP" | "DN" | "VIN" | "VOUT" | "VREF" | "VIN" | "VOUT" | "VREF" | "VIN" | "VOUT" | "VREF" | `A${Nums40}` | `B${Nums40}` | PinNumbers100;
|
|
9940
|
+
type TransistorPinNames = "base" | "collector" | "emitter";
|
|
9941
|
+
|
|
9942
|
+
type NonPolarizedSel = Record<`R${Nums40}` | `SW${Nums40}`, {
|
|
9943
|
+
pin1: string;
|
|
9944
|
+
pin2: string;
|
|
9945
|
+
pos: string;
|
|
9946
|
+
neg: string;
|
|
9947
|
+
}>;
|
|
9948
|
+
type PolarizedSel = Record<`C${Nums40}` | `L${Nums40}` | `LED${Nums40}` | `D${Nums40}` | `Y${Nums40}` | `B${Nums16}`, {
|
|
9949
|
+
pin1: string;
|
|
9950
|
+
pin2: string;
|
|
9951
|
+
anode: string;
|
|
9952
|
+
cathode: string;
|
|
9953
|
+
pos: string;
|
|
9954
|
+
neg: string;
|
|
9955
|
+
}>;
|
|
9956
|
+
type TransistorSel = Record<`Q${Nums40}`, Record<TransistorPinNames, string>>;
|
|
9957
|
+
type JumperSel = Record<`J${Nums40}`, Record<PinNumbers100, string>>;
|
|
9958
|
+
type ChipSel = Record<`U${Nums40}`, Record<CommonPinNames, string>>;
|
|
9959
|
+
type NetSel = Record<"net", Record<"VCC" | "GND" | "VDD", string>>;
|
|
9960
|
+
type Sel = NonPolarizedSel & PolarizedSel & TransistorSel & JumperSel & ChipSel & NetSel;
|
|
9961
|
+
declare const sel: Sel;
|
|
9962
|
+
|
|
9936
9963
|
interface TscircuitElements {
|
|
9937
9964
|
resistor: _tscircuit_props.ResistorProps;
|
|
9938
9965
|
capacitor: _tscircuit_props.CapacitorProps;
|
|
@@ -9995,4 +10022,4 @@ declare module "react/jsx-runtime" {
|
|
|
9995
10022
|
}
|
|
9996
10023
|
}
|
|
9997
10024
|
|
|
9998
|
-
export { type AsyncEffect, Battery, Board, Capacitor, Chip, Circuit, type ComponentWithPins, Constraint, Crystal, Diode, FabricationNotePath, FabricationNoteText, Footprint, Group, Hole, type IRenderable, Inductor, Jumper, Keepout, Led, Mosfet, Net, NetAlias, NormalComponent, PinHeader, type PinLabelSpec, PlatedHole, Port, Potentiometer, PowerSource, PrimitiveComponent, Project, PushButton, type RenderPhase, type RenderPhaseFn, type RenderPhaseFunctions, type RenderPhaseStates, Renderable, Resistor, Resonator, RootCircuit, type RootCircuitEventName, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, SmtPad, Subcircuit, Trace, TraceHint, Transistor, Via, applyEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, orderedRenderPhases, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
|
10025
|
+
export { type AsyncEffect, Battery, Board, Capacitor, Chip, Circuit, type ComponentWithPins, Constraint, Crystal, Diode, FabricationNotePath, FabricationNoteText, Footprint, Group, Hole, type IRenderable, Inductor, Jumper, Keepout, Led, Mosfet, Net, NetAlias, NormalComponent, PinHeader, type PinLabelSpec, PlatedHole, Port, Potentiometer, PowerSource, PrimitiveComponent, Project, PushButton, type RenderPhase, type RenderPhaseFn, type RenderPhaseFunctions, type RenderPhaseStates, Renderable, Resistor, Resonator, RootCircuit, type RootCircuitEventName, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, SmtPad, Subcircuit, Trace, TraceHint, Transistor, Via, applyEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, orderedRenderPhases, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
package/dist/index.js
CHANGED
|
@@ -59,7 +59,7 @@ import Debug4 from "debug";
|
|
|
59
59
|
import React from "react";
|
|
60
60
|
import ReactReconciler from "react-reconciler";
|
|
61
61
|
import ReactReconciler18 from "react-reconciler-18";
|
|
62
|
-
import { DefaultEventPriority } from "react-reconciler/constants";
|
|
62
|
+
import { DefaultEventPriority } from "react-reconciler/constants.js";
|
|
63
63
|
|
|
64
64
|
// lib/components/base-components/Renderable.ts
|
|
65
65
|
import Debug from "debug";
|
|
@@ -6842,6 +6842,26 @@ var getPhaseTimingsFromRenderEvents = (renderEvents) => {
|
|
|
6842
6842
|
return phaseTimings;
|
|
6843
6843
|
};
|
|
6844
6844
|
|
|
6845
|
+
// lib/sel/sel.ts
|
|
6846
|
+
var sel = new Proxy(
|
|
6847
|
+
{},
|
|
6848
|
+
{
|
|
6849
|
+
get: (_, prop1) => {
|
|
6850
|
+
return new Proxy(
|
|
6851
|
+
{},
|
|
6852
|
+
{
|
|
6853
|
+
get: (_2, prop2) => {
|
|
6854
|
+
if (prop1 === "net") {
|
|
6855
|
+
return `net.${prop2}`;
|
|
6856
|
+
}
|
|
6857
|
+
return `.${prop1} > .${prop2}`;
|
|
6858
|
+
}
|
|
6859
|
+
}
|
|
6860
|
+
);
|
|
6861
|
+
}
|
|
6862
|
+
}
|
|
6863
|
+
);
|
|
6864
|
+
|
|
6845
6865
|
// lib/index.ts
|
|
6846
6866
|
import { createElement } from "react";
|
|
6847
6867
|
|
|
@@ -6901,6 +6921,7 @@ export {
|
|
|
6901
6921
|
getPhaseTimingsFromRenderEvents,
|
|
6902
6922
|
getSimpleRouteJsonFromCircuitJson,
|
|
6903
6923
|
orderedRenderPhases,
|
|
6924
|
+
sel,
|
|
6904
6925
|
useCapacitor,
|
|
6905
6926
|
useChip,
|
|
6906
6927
|
useDiode,
|
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.280",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"start:benchmarking": "concurrently \"bun run build:benchmarking:watch\" \"live-server ./benchmarking-dist\""
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
+
"react-reconciler-18": "npm:react-reconciler@0.29.2",
|
|
25
26
|
"@biomejs/biome": "^1.8.3",
|
|
26
27
|
"@tscircuit/import-snippet": "^0.0.4",
|
|
27
28
|
"@tscircuit/layout": "^0.0.28",
|
|
@@ -63,7 +64,6 @@
|
|
|
63
64
|
"nanoid": "^5.0.7",
|
|
64
65
|
"performance-now": "^2.1.0",
|
|
65
66
|
"react-reconciler": "^0.31.0",
|
|
66
|
-
"react-reconciler-18": "npm:react-reconciler@0.29.2",
|
|
67
67
|
"schematic-symbols": "^0.0.113",
|
|
68
68
|
"transformation-matrix": "^2.16.1",
|
|
69
69
|
"zod": "^3.23.8"
|