easyeda 0.0.259 → 0.0.260
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/browser/index.d.ts +16 -16
- package/dist/browser/index.js +16 -8
- package/dist/browser/index.js.map +1 -1
- package/dist/index.d.ts +16 -16
- package/dist/index.js +16 -8
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +16 -8
- package/dist/main.cjs.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.d.ts
CHANGED
|
@@ -501,11 +501,11 @@ declare const DataStrSchema: z.ZodObject<{
|
|
|
501
501
|
y: z.ZodNumber;
|
|
502
502
|
rotation: z.ZodNumber;
|
|
503
503
|
fontColor: z.ZodString;
|
|
504
|
-
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
504
|
+
backgroundColor: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
505
505
|
fontSize: z.ZodString;
|
|
506
|
-
fontWeight: z.ZodDefault<z.ZodOptional<z.ZodString
|
|
507
|
-
fontStyle: z.ZodDefault<z.ZodOptional<z.ZodEnum<["normal", "italic"]
|
|
508
|
-
fontDecoration: z.ZodDefault<z.ZodOptional<z.ZodString
|
|
506
|
+
fontWeight: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodString>>, string, unknown>;
|
|
507
|
+
fontStyle: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodEnum<["normal", "italic"]>>>, "normal" | "italic", unknown>;
|
|
508
|
+
fontDecoration: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodString>>, string, unknown>;
|
|
509
509
|
content: z.ZodString;
|
|
510
510
|
textType: z.ZodString;
|
|
511
511
|
visibility: z.ZodEnum<["0", "1"]>;
|
|
@@ -541,10 +541,10 @@ declare const DataStrSchema: z.ZodObject<{
|
|
|
541
541
|
content: string;
|
|
542
542
|
textType: string;
|
|
543
543
|
mirror: string;
|
|
544
|
-
backgroundColor?:
|
|
545
|
-
fontWeight?:
|
|
546
|
-
fontStyle?:
|
|
547
|
-
fontDecoration?:
|
|
544
|
+
backgroundColor?: unknown;
|
|
545
|
+
fontWeight?: unknown;
|
|
546
|
+
fontStyle?: unknown;
|
|
547
|
+
fontDecoration?: unknown;
|
|
548
548
|
}>, z.ZodObject<{
|
|
549
549
|
type: z.ZodLiteral<"ARC">;
|
|
550
550
|
start: z.ZodObject<{
|
|
@@ -3034,11 +3034,11 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
|
|
|
3034
3034
|
y: z.ZodNumber;
|
|
3035
3035
|
rotation: z.ZodNumber;
|
|
3036
3036
|
fontColor: z.ZodString;
|
|
3037
|
-
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
3037
|
+
backgroundColor: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
3038
3038
|
fontSize: z.ZodString;
|
|
3039
|
-
fontWeight: z.ZodDefault<z.ZodOptional<z.ZodString
|
|
3040
|
-
fontStyle: z.ZodDefault<z.ZodOptional<z.ZodEnum<["normal", "italic"]
|
|
3041
|
-
fontDecoration: z.ZodDefault<z.ZodOptional<z.ZodString
|
|
3039
|
+
fontWeight: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodString>>, string, unknown>;
|
|
3040
|
+
fontStyle: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodEnum<["normal", "italic"]>>>, "normal" | "italic", unknown>;
|
|
3041
|
+
fontDecoration: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodString>>, string, unknown>;
|
|
3042
3042
|
content: z.ZodString;
|
|
3043
3043
|
textType: z.ZodString;
|
|
3044
3044
|
visibility: z.ZodEnum<["0", "1"]>;
|
|
@@ -3074,10 +3074,10 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
|
|
|
3074
3074
|
content: string;
|
|
3075
3075
|
textType: string;
|
|
3076
3076
|
mirror: string;
|
|
3077
|
-
backgroundColor?:
|
|
3078
|
-
fontWeight?:
|
|
3079
|
-
fontStyle?:
|
|
3080
|
-
fontDecoration?:
|
|
3077
|
+
backgroundColor?: unknown;
|
|
3078
|
+
fontWeight?: unknown;
|
|
3079
|
+
fontStyle?: unknown;
|
|
3080
|
+
fontDecoration?: unknown;
|
|
3081
3081
|
}>, z.ZodObject<{
|
|
3082
3082
|
type: z.ZodLiteral<"ARC">;
|
|
3083
3083
|
start: z.ZodObject<{
|
package/dist/browser/index.js
CHANGED
|
@@ -10093,6 +10093,12 @@ var parsePath = (str) => {
|
|
|
10093
10093
|
};
|
|
10094
10094
|
};
|
|
10095
10095
|
var PathShapeSchema = external_exports.string().startsWith("PT~").transform(parsePath).pipe(PathShapeOutputSchema);
|
|
10096
|
+
var optionalEasyEdaTextField = (fieldSchema) => external_exports.preprocess((textField) => {
|
|
10097
|
+
if (textField == null || textField === "" || textField === "undefined") {
|
|
10098
|
+
return void 0;
|
|
10099
|
+
}
|
|
10100
|
+
return textField;
|
|
10101
|
+
}, fieldSchema);
|
|
10096
10102
|
var TextShapeOutputSchema = external_exports.object({
|
|
10097
10103
|
type: external_exports.literal("TEXT"),
|
|
10098
10104
|
alignment: external_exports.enum(["L", "C", "R"]),
|
|
@@ -10100,11 +10106,13 @@ var TextShapeOutputSchema = external_exports.object({
|
|
|
10100
10106
|
y: external_exports.number(),
|
|
10101
10107
|
rotation: external_exports.number(),
|
|
10102
10108
|
fontColor: external_exports.string(),
|
|
10103
|
-
backgroundColor: external_exports.string().optional(),
|
|
10109
|
+
backgroundColor: optionalEasyEdaTextField(external_exports.string().optional()),
|
|
10104
10110
|
fontSize: external_exports.string(),
|
|
10105
|
-
fontWeight: external_exports.string().optional().default("normal"),
|
|
10106
|
-
fontStyle:
|
|
10107
|
-
|
|
10111
|
+
fontWeight: optionalEasyEdaTextField(external_exports.string().optional().default("normal")),
|
|
10112
|
+
fontStyle: optionalEasyEdaTextField(
|
|
10113
|
+
external_exports.enum(["normal", "italic"]).optional().default("normal")
|
|
10114
|
+
),
|
|
10115
|
+
fontDecoration: optionalEasyEdaTextField(external_exports.string().optional().default("")),
|
|
10108
10116
|
content: external_exports.string(),
|
|
10109
10117
|
textType: external_exports.string(),
|
|
10110
10118
|
visibility: external_exports.enum(["0", "1"]),
|
|
@@ -10137,11 +10145,11 @@ var parseText = (str) => {
|
|
|
10137
10145
|
y: Number(y),
|
|
10138
10146
|
rotation: Number(rotation2),
|
|
10139
10147
|
fontColor,
|
|
10140
|
-
backgroundColor
|
|
10148
|
+
backgroundColor,
|
|
10141
10149
|
fontSize,
|
|
10142
|
-
fontWeight
|
|
10143
|
-
fontStyle
|
|
10144
|
-
fontDecoration
|
|
10150
|
+
fontWeight,
|
|
10151
|
+
fontStyle,
|
|
10152
|
+
fontDecoration,
|
|
10145
10153
|
content,
|
|
10146
10154
|
textType,
|
|
10147
10155
|
visibility,
|