@tscircuit/props 0.0.350 → 0.0.352
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 +4 -1
- package/dist/index.d.ts +42 -447
- package/dist/index.js +19 -3
- package/dist/index.js.map +1 -1
- package/lib/components/group.ts +19 -4
- package/lib/components/voltageprobe.ts +8 -4
- package/lib/platformConfig.ts +38 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -496,8 +496,7 @@ var autorouterConfig = z27.object({
|
|
|
496
496
|
]).optional(),
|
|
497
497
|
local: z27.boolean().optional()
|
|
498
498
|
});
|
|
499
|
-
var
|
|
500
|
-
autorouterConfig,
|
|
499
|
+
var autorouterPreset = z27.union([
|
|
501
500
|
z27.literal("sequential_trace"),
|
|
502
501
|
z27.literal("subcircuit"),
|
|
503
502
|
z27.literal("auto"),
|
|
@@ -508,6 +507,12 @@ var autorouterProp = z27.union([
|
|
|
508
507
|
z27.literal("auto-local"),
|
|
509
508
|
z27.literal("auto-cloud")
|
|
510
509
|
]);
|
|
510
|
+
var autorouterString = z27.string();
|
|
511
|
+
var autorouterProp = z27.union([
|
|
512
|
+
autorouterConfig,
|
|
513
|
+
autorouterPreset,
|
|
514
|
+
autorouterString
|
|
515
|
+
]);
|
|
511
516
|
var baseGroupProps = commonLayoutProps.extend({
|
|
512
517
|
name: z27.string().optional(),
|
|
513
518
|
children: z27.any().optional(),
|
|
@@ -625,6 +630,7 @@ var groupProps = z27.discriminatedUnion("subcircuit", [
|
|
|
625
630
|
expectTypesMatch(true);
|
|
626
631
|
expectTypesMatch(true);
|
|
627
632
|
expectTypesMatch(true);
|
|
633
|
+
expectTypesMatch(true);
|
|
628
634
|
|
|
629
635
|
// lib/components/board.ts
|
|
630
636
|
var boardColor = z28.custom((value) => typeof value === "string");
|
|
@@ -1636,7 +1642,8 @@ expectTypesMatch(true);
|
|
|
1636
1642
|
|
|
1637
1643
|
// lib/components/voltageprobe.ts
|
|
1638
1644
|
import { z as z76 } from "zod";
|
|
1639
|
-
var voltageProbeProps = commonComponentProps.extend({
|
|
1645
|
+
var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
|
|
1646
|
+
name: z76.string().optional(),
|
|
1640
1647
|
connectsTo: z76.string().or(z76.array(z76.string()))
|
|
1641
1648
|
});
|
|
1642
1649
|
expectTypesMatch(true);
|
|
@@ -1912,9 +1919,17 @@ var spiceEngineZod = z94.object({
|
|
|
1912
1919
|
"A function that takes a SPICE string and returns a simulation result"
|
|
1913
1920
|
)
|
|
1914
1921
|
});
|
|
1922
|
+
var autorouterInstance = z94.object({
|
|
1923
|
+
run: z94.function().args().returns(z94.promise(z94.unknown())).describe("Run the autorouter"),
|
|
1924
|
+
getOutputSimpleRouteJson: z94.function().args().returns(z94.promise(z94.any())).describe("Get the resulting SimpleRouteJson")
|
|
1925
|
+
});
|
|
1926
|
+
var autorouterDefinition = z94.object({
|
|
1927
|
+
createAutorouter: z94.function().args(z94.any(), z94.any().optional()).returns(z94.union([autorouterInstance, z94.promise(autorouterInstance)])).describe("Create an autorouter instance")
|
|
1928
|
+
});
|
|
1915
1929
|
var platformConfig = z94.object({
|
|
1916
1930
|
partsEngine: partsEngine.optional(),
|
|
1917
1931
|
autorouter: autorouterProp.optional(),
|
|
1932
|
+
autorouterMap: z94.record(z94.string(), autorouterDefinition).optional(),
|
|
1918
1933
|
registryApiUrl: z94.string().optional(),
|
|
1919
1934
|
cloudAutorouterUrl: z94.string().optional(),
|
|
1920
1935
|
projectName: z94.string().optional(),
|
|
@@ -1960,6 +1975,7 @@ expectTypesMatch(true);
|
|
|
1960
1975
|
export {
|
|
1961
1976
|
analogSimulationProps,
|
|
1962
1977
|
autorouterConfig,
|
|
1978
|
+
autorouterPreset,
|
|
1963
1979
|
autorouterProp,
|
|
1964
1980
|
baseGroupProps,
|
|
1965
1981
|
base_manual_edit_event,
|