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/main.cjs
CHANGED
|
@@ -7263,6 +7263,12 @@ var parsePath = (str) => {
|
|
|
7263
7263
|
};
|
|
7264
7264
|
};
|
|
7265
7265
|
var PathShapeSchema = import_zod162.z.string().startsWith("PT~").transform(parsePath).pipe(PathShapeOutputSchema);
|
|
7266
|
+
var optionalEasyEdaTextField = (fieldSchema) => import_zod162.z.preprocess((textField) => {
|
|
7267
|
+
if (textField == null || textField === "" || textField === "undefined") {
|
|
7268
|
+
return void 0;
|
|
7269
|
+
}
|
|
7270
|
+
return textField;
|
|
7271
|
+
}, fieldSchema);
|
|
7266
7272
|
var TextShapeOutputSchema = import_zod162.z.object({
|
|
7267
7273
|
type: import_zod162.z.literal("TEXT"),
|
|
7268
7274
|
alignment: import_zod162.z.enum(["L", "C", "R"]),
|
|
@@ -7270,11 +7276,13 @@ var TextShapeOutputSchema = import_zod162.z.object({
|
|
|
7270
7276
|
y: import_zod162.z.number(),
|
|
7271
7277
|
rotation: import_zod162.z.number(),
|
|
7272
7278
|
fontColor: import_zod162.z.string(),
|
|
7273
|
-
backgroundColor: import_zod162.z.string().optional(),
|
|
7279
|
+
backgroundColor: optionalEasyEdaTextField(import_zod162.z.string().optional()),
|
|
7274
7280
|
fontSize: import_zod162.z.string(),
|
|
7275
|
-
fontWeight: import_zod162.z.string().optional().default("normal"),
|
|
7276
|
-
fontStyle:
|
|
7277
|
-
|
|
7281
|
+
fontWeight: optionalEasyEdaTextField(import_zod162.z.string().optional().default("normal")),
|
|
7282
|
+
fontStyle: optionalEasyEdaTextField(
|
|
7283
|
+
import_zod162.z.enum(["normal", "italic"]).optional().default("normal")
|
|
7284
|
+
),
|
|
7285
|
+
fontDecoration: optionalEasyEdaTextField(import_zod162.z.string().optional().default("")),
|
|
7278
7286
|
content: import_zod162.z.string(),
|
|
7279
7287
|
textType: import_zod162.z.string(),
|
|
7280
7288
|
visibility: import_zod162.z.enum(["0", "1"]),
|
|
@@ -7307,11 +7315,11 @@ var parseText = (str) => {
|
|
|
7307
7315
|
y: Number(y),
|
|
7308
7316
|
rotation: Number(rotation2),
|
|
7309
7317
|
fontColor,
|
|
7310
|
-
backgroundColor
|
|
7318
|
+
backgroundColor,
|
|
7311
7319
|
fontSize,
|
|
7312
|
-
fontWeight
|
|
7313
|
-
fontStyle
|
|
7314
|
-
fontDecoration
|
|
7320
|
+
fontWeight,
|
|
7321
|
+
fontStyle,
|
|
7322
|
+
fontDecoration,
|
|
7315
7323
|
content,
|
|
7316
7324
|
textType,
|
|
7317
7325
|
visibility,
|