@tscircuit/props 0.0.630 → 0.0.631
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 -0
- package/dist/index.js +20 -14
- package/dist/index.js.map +1 -1
- package/lib/components/port.ts +9 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -219125,6 +219125,7 @@ declare const portProps: z.ZodObject<{
|
|
|
219125
219125
|
name: z.ZodOptional<z.ZodString>;
|
|
219126
219126
|
pinNumber: z.ZodOptional<z.ZodNumber>;
|
|
219127
219127
|
schStemLength: z.ZodOptional<z.ZodNumber>;
|
|
219128
|
+
schPinLabelFontSize: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["default", "sm"]>, z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, number, string | number>]>>;
|
|
219128
219129
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
219129
219130
|
layer: z.ZodOptional<z.ZodString>;
|
|
219130
219131
|
layers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -219207,6 +219208,7 @@ declare const portProps: z.ZodObject<{
|
|
|
219207
219208
|
connectsTo?: string | string[] | undefined;
|
|
219208
219209
|
pinNumber?: number | undefined;
|
|
219209
219210
|
schStemLength?: number | undefined;
|
|
219211
|
+
schPinLabelFontSize?: number | "default" | "sm" | undefined;
|
|
219210
219212
|
aliases?: string[] | undefined;
|
|
219211
219213
|
kicadPinMetadata?: {
|
|
219212
219214
|
electricalType?: "input" | "output" | "bidirectional" | "tri_state" | "passive" | "free" | "unspecified" | "power_in" | "power_out" | "open_collector" | "open_emitter" | "no_connect" | undefined;
|
|
@@ -219271,6 +219273,7 @@ declare const portProps: z.ZodObject<{
|
|
|
219271
219273
|
connectsTo?: string | string[] | undefined;
|
|
219272
219274
|
pinNumber?: number | undefined;
|
|
219273
219275
|
schStemLength?: number | undefined;
|
|
219276
|
+
schPinLabelFontSize?: string | number | undefined;
|
|
219274
219277
|
aliases?: string[] | undefined;
|
|
219275
219278
|
kicadPinMetadata?: {
|
|
219276
219279
|
electricalType?: "input" | "output" | "bidirectional" | "tri_state" | "passive" | "free" | "unspecified" | "power_in" | "power_out" | "open_collector" | "open_emitter" | "no_connect" | undefined;
|
package/dist/index.js
CHANGED
|
@@ -18891,11 +18891,17 @@ var traceHintProps = z139.object({
|
|
|
18891
18891
|
});
|
|
18892
18892
|
|
|
18893
18893
|
// lib/components/port.ts
|
|
18894
|
+
import { distance as distance47 } from "circuit-json";
|
|
18894
18895
|
import { z as z140 } from "zod";
|
|
18895
18896
|
var portProps = commonLayoutProps.extend({
|
|
18896
18897
|
name: z140.string().optional(),
|
|
18897
18898
|
pinNumber: z140.number().optional(),
|
|
18898
18899
|
schStemLength: z140.number().optional(),
|
|
18900
|
+
schPinLabelFontSize: z140.enum(["default", "sm"]).or(
|
|
18901
|
+
distance47.refine((value) => Number.isFinite(value) && value > 0, {
|
|
18902
|
+
message: "Schematic pin-label font size must be positive and finite"
|
|
18903
|
+
})
|
|
18904
|
+
).optional(),
|
|
18899
18905
|
aliases: z140.array(z140.string()).optional(),
|
|
18900
18906
|
layer: z140.string().optional(),
|
|
18901
18907
|
layers: z140.array(z140.string()).optional(),
|
|
@@ -18920,17 +18926,17 @@ var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
|
18920
18926
|
expectTypesMatch(true);
|
|
18921
18927
|
|
|
18922
18928
|
// lib/components/pcb-note-rect.ts
|
|
18923
|
-
import { distance as
|
|
18929
|
+
import { distance as distance48 } from "circuit-json";
|
|
18924
18930
|
import { z as z142 } from "zod";
|
|
18925
18931
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18926
|
-
width:
|
|
18927
|
-
height:
|
|
18928
|
-
strokeWidth:
|
|
18932
|
+
width: distance48,
|
|
18933
|
+
height: distance48,
|
|
18934
|
+
strokeWidth: distance48.optional(),
|
|
18929
18935
|
isFilled: z142.boolean().optional(),
|
|
18930
18936
|
hasStroke: z142.boolean().optional(),
|
|
18931
18937
|
isStrokeDashed: z142.boolean().optional(),
|
|
18932
18938
|
color: z142.string().optional(),
|
|
18933
|
-
cornerRadius:
|
|
18939
|
+
cornerRadius: distance48.optional()
|
|
18934
18940
|
});
|
|
18935
18941
|
expectTypesMatch(true);
|
|
18936
18942
|
|
|
@@ -18958,7 +18964,7 @@ var pcbNotePathProps = pcbLayoutProps.omit({
|
|
|
18958
18964
|
expectTypesMatch(true);
|
|
18959
18965
|
|
|
18960
18966
|
// lib/components/pcb-note-line.ts
|
|
18961
|
-
import { distance as
|
|
18967
|
+
import { distance as distance49 } from "circuit-json";
|
|
18962
18968
|
import { z as z144 } from "zod";
|
|
18963
18969
|
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
18964
18970
|
pcbLeftEdgeX: true,
|
|
@@ -18971,18 +18977,18 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
18971
18977
|
pcbOffsetY: true,
|
|
18972
18978
|
pcbRotation: true
|
|
18973
18979
|
}).extend({
|
|
18974
|
-
x1:
|
|
18975
|
-
y1:
|
|
18976
|
-
x2:
|
|
18977
|
-
y2:
|
|
18978
|
-
strokeWidth:
|
|
18980
|
+
x1: distance49,
|
|
18981
|
+
y1: distance49,
|
|
18982
|
+
x2: distance49,
|
|
18983
|
+
y2: distance49,
|
|
18984
|
+
strokeWidth: distance49.optional(),
|
|
18979
18985
|
color: z144.string().optional(),
|
|
18980
18986
|
isDashed: z144.boolean().optional()
|
|
18981
18987
|
});
|
|
18982
18988
|
expectTypesMatch(true);
|
|
18983
18989
|
|
|
18984
18990
|
// lib/components/pcb-note-dimension.ts
|
|
18985
|
-
import { distance as
|
|
18991
|
+
import { distance as distance50, length as length13 } from "circuit-json";
|
|
18986
18992
|
import { z as z145 } from "zod";
|
|
18987
18993
|
var dimensionTarget2 = z145.union([z145.string(), point]);
|
|
18988
18994
|
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
@@ -18999,11 +19005,11 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18999
19005
|
from: dimensionTarget2,
|
|
19000
19006
|
to: dimensionTarget2,
|
|
19001
19007
|
text: z145.string().optional(),
|
|
19002
|
-
offset:
|
|
19008
|
+
offset: distance50.optional(),
|
|
19003
19009
|
font: z145.enum(["tscircuit2024"]).optional(),
|
|
19004
19010
|
fontSize: length13.optional(),
|
|
19005
19011
|
color: z145.string().optional(),
|
|
19006
|
-
arrowSize:
|
|
19012
|
+
arrowSize: distance50.optional(),
|
|
19007
19013
|
units: z145.enum(["in", "mm"]).optional(),
|
|
19008
19014
|
outerEdgeToEdge: z145.literal(true).optional(),
|
|
19009
19015
|
centerToCenter: z145.literal(true).optional(),
|