easyeda 0.0.302 → 0.0.303

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 CHANGED
@@ -7,7 +7,7 @@ declare const SzlcscSchema: z.ZodObject<{
7
7
  number: z.ZodString;
8
8
  step: z.ZodOptional<z.ZodNumber>;
9
9
  min: z.ZodOptional<z.ZodNumber>;
10
- price: z.ZodOptional<z.ZodNumber>;
10
+ price: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, unknown>;
11
11
  stock: z.ZodOptional<z.ZodNumber>;
12
12
  url: z.ZodOptional<z.ZodString>;
13
13
  image: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -26,7 +26,7 @@ declare const SzlcscSchema: z.ZodObject<{
26
26
  url?: string | undefined;
27
27
  min?: number | undefined;
28
28
  step?: number | undefined;
29
- price?: number | undefined;
29
+ price?: unknown;
30
30
  stock?: number | undefined;
31
31
  image?: string | undefined;
32
32
  }>;
@@ -35,7 +35,7 @@ declare const LcscSchema: z.ZodObject<{
35
35
  number: z.ZodString;
36
36
  step: z.ZodOptional<z.ZodNumber>;
37
37
  min: z.ZodOptional<z.ZodNumber>;
38
- price: z.ZodOptional<z.ZodNumber>;
38
+ price: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, unknown>;
39
39
  stock: z.ZodOptional<z.ZodNumber>;
40
40
  url: z.ZodOptional<z.ZodString>;
41
41
  }, "strip", z.ZodTypeAny, {
@@ -52,7 +52,7 @@ declare const LcscSchema: z.ZodObject<{
52
52
  url?: string | undefined;
53
53
  min?: number | undefined;
54
54
  step?: number | undefined;
55
- price?: number | undefined;
55
+ price?: unknown;
56
56
  stock?: number | undefined;
57
57
  }>;
58
58
  declare const OwnerSchema: z.ZodObject<{
@@ -245,7 +245,7 @@ declare const DataStrSchema: z.ZodEffects<z.ZodObject<{
245
245
  y: number;
246
246
  id: string;
247
247
  rotation: number;
248
- visibility: "show" | "hide" | "none";
248
+ visibility: "none" | "show" | "hide";
249
249
  pinNumber: string | number;
250
250
  label: string;
251
251
  labelColor: string;
@@ -276,6 +276,9 @@ declare const DataStrSchema: z.ZodEffects<z.ZodObject<{
276
276
  fillColor: string;
277
277
  strokeWidth: number;
278
278
  strokeColor: string;
279
+ } | {
280
+ type: "IGNORED";
281
+ sourceType: "AR" | "I";
279
282
  } | {
280
283
  type: "TEXT";
281
284
  x: number;
@@ -396,7 +399,7 @@ declare const DataStrSchema: z.ZodEffects<z.ZodObject<{
396
399
  y: number;
397
400
  id: string;
398
401
  rotation: number;
399
- visibility: "show" | "hide" | "none";
402
+ visibility: "none" | "show" | "hide";
400
403
  pinNumber: string | number;
401
404
  label: string;
402
405
  labelColor: string;
@@ -408,7 +411,7 @@ declare const DataStrSchema: z.ZodEffects<z.ZodObject<{
408
411
  y: number;
409
412
  id: string;
410
413
  rotation: number;
411
- visibility: "show" | "hide" | "none";
414
+ visibility: "none" | "show" | "hide";
412
415
  pinNumber: string | number;
413
416
  label: string;
414
417
  labelColor: string;
@@ -554,6 +557,15 @@ declare const DataStrSchema: z.ZodEffects<z.ZodObject<{
554
557
  fontWeight?: unknown;
555
558
  fontStyle?: unknown;
556
559
  fontDecoration?: unknown;
560
+ }>, z.ZodObject<{
561
+ type: z.ZodLiteral<"IGNORED">;
562
+ sourceType: z.ZodEnum<["AR", "I"]>;
563
+ }, "strip", z.ZodTypeAny, {
564
+ type: "IGNORED";
565
+ sourceType: "AR" | "I";
566
+ }, {
567
+ type: "IGNORED";
568
+ sourceType: "AR" | "I";
557
569
  }>, z.ZodObject<{
558
570
  type: z.ZodLiteral<"ARC">;
559
571
  pathData: z.ZodString;
@@ -680,7 +692,7 @@ declare const DataStrSchema: z.ZodEffects<z.ZodObject<{
680
692
  y: number;
681
693
  id: string;
682
694
  rotation: number;
683
- visibility: "show" | "hide" | "none";
695
+ visibility: "none" | "show" | "hide";
684
696
  pinNumber: string | number;
685
697
  label: string;
686
698
  labelColor: string;
@@ -711,6 +723,9 @@ declare const DataStrSchema: z.ZodEffects<z.ZodObject<{
711
723
  fillColor: string;
712
724
  strokeWidth: number;
713
725
  strokeColor: string;
726
+ } | {
727
+ type: "IGNORED";
728
+ sourceType: "AR" | "I";
714
729
  } | {
715
730
  type: "TEXT";
716
731
  x: number;
@@ -827,7 +842,7 @@ declare const DataStrSchema: z.ZodEffects<z.ZodObject<{
827
842
  y: number;
828
843
  id: string;
829
844
  rotation: number;
830
- visibility: "show" | "hide" | "none";
845
+ visibility: "none" | "show" | "hide";
831
846
  pinNumber: string | number;
832
847
  label: string;
833
848
  labelColor: string;
@@ -858,6 +873,9 @@ declare const DataStrSchema: z.ZodEffects<z.ZodObject<{
858
873
  fillColor: string;
859
874
  strokeWidth: number;
860
875
  strokeColor: string;
876
+ } | {
877
+ type: "IGNORED";
878
+ sourceType: "AR" | "I";
861
879
  } | {
862
880
  type: "TEXT";
863
881
  x: number;
@@ -1286,7 +1304,7 @@ declare const PackageDetailDataStrSchema: z.ZodObject<{
1286
1304
  x: number;
1287
1305
  y: number;
1288
1306
  }>>, "many">;
1289
- fillStyle: z.ZodString;
1307
+ fillStyle: z.ZodDefault<z.ZodString>;
1290
1308
  }, "strip", z.ZodTypeAny, {
1291
1309
  type: "SOLIDREGION";
1292
1310
  points: {
@@ -1301,9 +1319,9 @@ declare const PackageDetailDataStrSchema: z.ZodObject<{
1301
1319
  type: "SOLIDREGION";
1302
1320
  points: any[];
1303
1321
  layermask: number;
1304
- fillStyle: string;
1305
1322
  id?: string | undefined;
1306
1323
  layer?: number | undefined;
1324
+ fillStyle?: string | undefined;
1307
1325
  }>, z.ZodObject<{
1308
1326
  id: z.ZodOptional<z.ZodString>;
1309
1327
  layer: z.ZodOptional<z.ZodNumber>;
@@ -1430,7 +1448,7 @@ declare const PackageDetailDataStrSchema: z.ZodObject<{
1430
1448
  width: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>, string, string | number | undefined>, z.ZodString>;
1431
1449
  height: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>, string, string | number | undefined>, z.ZodString>;
1432
1450
  lineWidth: z.ZodNumber;
1433
- fillStyle: z.ZodString;
1451
+ fillStyle: z.ZodDefault<z.ZodString>;
1434
1452
  rotation: z.ZodOptional<z.ZodNumber>;
1435
1453
  }, "strip", z.ZodTypeAny, {
1436
1454
  type: "RECT";
@@ -1445,7 +1463,6 @@ declare const PackageDetailDataStrSchema: z.ZodObject<{
1445
1463
  rotation?: number | undefined;
1446
1464
  }, {
1447
1465
  type: "RECT";
1448
- fillStyle: string;
1449
1466
  lineWidth: number;
1450
1467
  x?: string | number | undefined;
1451
1468
  y?: string | number | undefined;
@@ -1454,6 +1471,7 @@ declare const PackageDetailDataStrSchema: z.ZodObject<{
1454
1471
  width?: string | number | undefined;
1455
1472
  height?: string | number | undefined;
1456
1473
  rotation?: number | undefined;
1474
+ fillStyle?: string | undefined;
1457
1475
  }>, z.ZodObject<{
1458
1476
  id: z.ZodOptional<z.ZodString>;
1459
1477
  } & {
@@ -2095,7 +2113,7 @@ declare const PackageDetailSchema: z.ZodObject<{
2095
2113
  x: number;
2096
2114
  y: number;
2097
2115
  }>>, "many">;
2098
- fillStyle: z.ZodString;
2116
+ fillStyle: z.ZodDefault<z.ZodString>;
2099
2117
  }, "strip", z.ZodTypeAny, {
2100
2118
  type: "SOLIDREGION";
2101
2119
  points: {
@@ -2110,9 +2128,9 @@ declare const PackageDetailSchema: z.ZodObject<{
2110
2128
  type: "SOLIDREGION";
2111
2129
  points: any[];
2112
2130
  layermask: number;
2113
- fillStyle: string;
2114
2131
  id?: string | undefined;
2115
2132
  layer?: number | undefined;
2133
+ fillStyle?: string | undefined;
2116
2134
  }>, z.ZodObject<{
2117
2135
  id: z.ZodOptional<z.ZodString>;
2118
2136
  layer: z.ZodOptional<z.ZodNumber>;
@@ -2239,7 +2257,7 @@ declare const PackageDetailSchema: z.ZodObject<{
2239
2257
  width: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>, string, string | number | undefined>, z.ZodString>;
2240
2258
  height: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>, string, string | number | undefined>, z.ZodString>;
2241
2259
  lineWidth: z.ZodNumber;
2242
- fillStyle: z.ZodString;
2260
+ fillStyle: z.ZodDefault<z.ZodString>;
2243
2261
  rotation: z.ZodOptional<z.ZodNumber>;
2244
2262
  }, "strip", z.ZodTypeAny, {
2245
2263
  type: "RECT";
@@ -2254,7 +2272,6 @@ declare const PackageDetailSchema: z.ZodObject<{
2254
2272
  rotation?: number | undefined;
2255
2273
  }, {
2256
2274
  type: "RECT";
2257
- fillStyle: string;
2258
2275
  lineWidth: number;
2259
2276
  x?: string | number | undefined;
2260
2277
  y?: string | number | undefined;
@@ -2263,6 +2280,7 @@ declare const PackageDetailSchema: z.ZodObject<{
2263
2280
  width?: string | number | undefined;
2264
2281
  height?: string | number | undefined;
2265
2282
  rotation?: number | undefined;
2283
+ fillStyle?: string | undefined;
2266
2284
  }>, z.ZodObject<{
2267
2285
  id: z.ZodOptional<z.ZodString>;
2268
2286
  } & {
@@ -2781,7 +2799,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
2781
2799
  number: z.ZodString;
2782
2800
  step: z.ZodOptional<z.ZodNumber>;
2783
2801
  min: z.ZodOptional<z.ZodNumber>;
2784
- price: z.ZodOptional<z.ZodNumber>;
2802
+ price: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, unknown>;
2785
2803
  stock: z.ZodOptional<z.ZodNumber>;
2786
2804
  url: z.ZodOptional<z.ZodString>;
2787
2805
  image: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -2800,7 +2818,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
2800
2818
  url?: string | undefined;
2801
2819
  min?: number | undefined;
2802
2820
  step?: number | undefined;
2803
- price?: number | undefined;
2821
+ price?: unknown;
2804
2822
  stock?: number | undefined;
2805
2823
  image?: string | undefined;
2806
2824
  }>;
@@ -2809,7 +2827,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
2809
2827
  number: z.ZodString;
2810
2828
  step: z.ZodOptional<z.ZodNumber>;
2811
2829
  min: z.ZodOptional<z.ZodNumber>;
2812
- price: z.ZodOptional<z.ZodNumber>;
2830
+ price: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, unknown>;
2813
2831
  stock: z.ZodOptional<z.ZodNumber>;
2814
2832
  url: z.ZodOptional<z.ZodString>;
2815
2833
  }, "strip", z.ZodTypeAny, {
@@ -2826,7 +2844,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
2826
2844
  url?: string | undefined;
2827
2845
  min?: number | undefined;
2828
2846
  step?: number | undefined;
2829
- price?: number | undefined;
2847
+ price?: unknown;
2830
2848
  stock?: number | undefined;
2831
2849
  }>;
2832
2850
  owner: z.ZodObject<{
@@ -2935,7 +2953,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
2935
2953
  y: number;
2936
2954
  id: string;
2937
2955
  rotation: number;
2938
- visibility: "show" | "hide" | "none";
2956
+ visibility: "none" | "show" | "hide";
2939
2957
  pinNumber: string | number;
2940
2958
  label: string;
2941
2959
  labelColor: string;
@@ -2966,6 +2984,9 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
2966
2984
  fillColor: string;
2967
2985
  strokeWidth: number;
2968
2986
  strokeColor: string;
2987
+ } | {
2988
+ type: "IGNORED";
2989
+ sourceType: "AR" | "I";
2969
2990
  } | {
2970
2991
  type: "TEXT";
2971
2992
  x: number;
@@ -3086,7 +3107,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
3086
3107
  y: number;
3087
3108
  id: string;
3088
3109
  rotation: number;
3089
- visibility: "show" | "hide" | "none";
3110
+ visibility: "none" | "show" | "hide";
3090
3111
  pinNumber: string | number;
3091
3112
  label: string;
3092
3113
  labelColor: string;
@@ -3098,7 +3119,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
3098
3119
  y: number;
3099
3120
  id: string;
3100
3121
  rotation: number;
3101
- visibility: "show" | "hide" | "none";
3122
+ visibility: "none" | "show" | "hide";
3102
3123
  pinNumber: string | number;
3103
3124
  label: string;
3104
3125
  labelColor: string;
@@ -3244,6 +3265,15 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
3244
3265
  fontWeight?: unknown;
3245
3266
  fontStyle?: unknown;
3246
3267
  fontDecoration?: unknown;
3268
+ }>, z.ZodObject<{
3269
+ type: z.ZodLiteral<"IGNORED">;
3270
+ sourceType: z.ZodEnum<["AR", "I"]>;
3271
+ }, "strip", z.ZodTypeAny, {
3272
+ type: "IGNORED";
3273
+ sourceType: "AR" | "I";
3274
+ }, {
3275
+ type: "IGNORED";
3276
+ sourceType: "AR" | "I";
3247
3277
  }>, z.ZodObject<{
3248
3278
  type: z.ZodLiteral<"ARC">;
3249
3279
  pathData: z.ZodString;
@@ -3370,7 +3400,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
3370
3400
  y: number;
3371
3401
  id: string;
3372
3402
  rotation: number;
3373
- visibility: "show" | "hide" | "none";
3403
+ visibility: "none" | "show" | "hide";
3374
3404
  pinNumber: string | number;
3375
3405
  label: string;
3376
3406
  labelColor: string;
@@ -3401,6 +3431,9 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
3401
3431
  fillColor: string;
3402
3432
  strokeWidth: number;
3403
3433
  strokeColor: string;
3434
+ } | {
3435
+ type: "IGNORED";
3436
+ sourceType: "AR" | "I";
3404
3437
  } | {
3405
3438
  type: "TEXT";
3406
3439
  x: number;
@@ -3517,7 +3550,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
3517
3550
  y: number;
3518
3551
  id: string;
3519
3552
  rotation: number;
3520
- visibility: "show" | "hide" | "none";
3553
+ visibility: "none" | "show" | "hide";
3521
3554
  pinNumber: string | number;
3522
3555
  label: string;
3523
3556
  labelColor: string;
@@ -3548,6 +3581,9 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
3548
3581
  fillColor: string;
3549
3582
  strokeWidth: number;
3550
3583
  strokeColor: string;
3584
+ } | {
3585
+ type: "IGNORED";
3586
+ sourceType: "AR" | "I";
3551
3587
  } | {
3552
3588
  type: "TEXT";
3553
3589
  x: number;
@@ -4005,7 +4041,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
4005
4041
  x: number;
4006
4042
  y: number;
4007
4043
  }>>, "many">;
4008
- fillStyle: z.ZodString;
4044
+ fillStyle: z.ZodDefault<z.ZodString>;
4009
4045
  }, "strip", z.ZodTypeAny, {
4010
4046
  type: "SOLIDREGION";
4011
4047
  points: {
@@ -4020,9 +4056,9 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
4020
4056
  type: "SOLIDREGION";
4021
4057
  points: any[];
4022
4058
  layermask: number;
4023
- fillStyle: string;
4024
4059
  id?: string | undefined;
4025
4060
  layer?: number | undefined;
4061
+ fillStyle?: string | undefined;
4026
4062
  }>, z.ZodObject<{
4027
4063
  id: z.ZodOptional<z.ZodString>;
4028
4064
  layer: z.ZodOptional<z.ZodNumber>;
@@ -4149,7 +4185,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
4149
4185
  width: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>, string, string | number | undefined>, z.ZodString>;
4150
4186
  height: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>, string, string | number | undefined>, z.ZodString>;
4151
4187
  lineWidth: z.ZodNumber;
4152
- fillStyle: z.ZodString;
4188
+ fillStyle: z.ZodDefault<z.ZodString>;
4153
4189
  rotation: z.ZodOptional<z.ZodNumber>;
4154
4190
  }, "strip", z.ZodTypeAny, {
4155
4191
  type: "RECT";
@@ -4164,7 +4200,6 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
4164
4200
  rotation?: number | undefined;
4165
4201
  }, {
4166
4202
  type: "RECT";
4167
- fillStyle: string;
4168
4203
  lineWidth: number;
4169
4204
  x?: string | number | undefined;
4170
4205
  y?: string | number | undefined;
@@ -4173,6 +4208,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
4173
4208
  width?: string | number | undefined;
4174
4209
  height?: string | number | undefined;
4175
4210
  rotation?: number | undefined;
4211
+ fillStyle?: string | undefined;
4176
4212
  }>, z.ZodObject<{
4177
4213
  id: z.ZodOptional<z.ZodString>;
4178
4214
  } & {
@@ -4776,7 +4812,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
4776
4812
  y: number;
4777
4813
  id: string;
4778
4814
  rotation: number;
4779
- visibility: "show" | "hide" | "none";
4815
+ visibility: "none" | "show" | "hide";
4780
4816
  pinNumber: string | number;
4781
4817
  label: string;
4782
4818
  labelColor: string;
@@ -4807,6 +4843,9 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
4807
4843
  fillColor: string;
4808
4844
  strokeWidth: number;
4809
4845
  strokeColor: string;
4846
+ } | {
4847
+ type: "IGNORED";
4848
+ sourceType: "AR" | "I";
4810
4849
  } | {
4811
4850
  type: "TEXT";
4812
4851
  x: number;
@@ -5098,7 +5137,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
5098
5137
  url?: string | undefined;
5099
5138
  min?: number | undefined;
5100
5139
  step?: number | undefined;
5101
- price?: number | undefined;
5140
+ price?: unknown;
5102
5141
  stock?: number | undefined;
5103
5142
  image?: string | undefined;
5104
5143
  };
@@ -5108,7 +5147,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
5108
5147
  url?: string | undefined;
5109
5148
  min?: number | undefined;
5110
5149
  step?: number | undefined;
5111
- price?: number | undefined;
5150
+ price?: unknown;
5112
5151
  stock?: number | undefined;
5113
5152
  };
5114
5153
  tags: string[];
package/dist/index.js CHANGED
@@ -6854,7 +6854,7 @@ var SolidRegionSchema = BaseShapeSchema.extend({
6854
6854
  type: z179.literal("SOLIDREGION"),
6855
6855
  layermask: z179.number(),
6856
6856
  points: z179.array(PointSchema),
6857
- fillStyle: z179.string()
6857
+ fillStyle: z179.string().default("none")
6858
6858
  });
6859
6859
  var SVGNodeSchema = BaseShapeSchema.extend({
6860
6860
  type: z179.literal("SVGNODE"),
@@ -6885,7 +6885,7 @@ var RectSchema = BaseShapeSchema.extend({
6885
6885
  width: tenthmil,
6886
6886
  height: tenthmil,
6887
6887
  lineWidth: z179.number(),
6888
- fillStyle: z179.string(),
6888
+ fillStyle: z179.string().default("none"),
6889
6889
  rotation: z179.number().optional()
6890
6890
  });
6891
6891
  var TextSchema = BaseShapeSchema.extend({
@@ -7048,7 +7048,7 @@ var ShapeItemSchema = z179.object({
7048
7048
  type: "SOLIDREGION",
7049
7049
  layermask: Number(layermask),
7050
7050
  points,
7051
- fillStyle,
7051
+ fillStyle: fillStyle || void 0,
7052
7052
  id
7053
7053
  });
7054
7054
  }
@@ -7296,6 +7296,17 @@ var parsePath = (str) => {
7296
7296
  };
7297
7297
  };
7298
7298
  var PathShapeSchema = z180.string().startsWith("PT~").transform(parsePath).pipe(PathShapeOutputSchema);
7299
+ var IgnoredShapeOutputSchema = z180.object({
7300
+ type: z180.literal("IGNORED"),
7301
+ sourceType: z180.enum(["AR", "I"])
7302
+ });
7303
+ var IgnoredShapeSchema = z180.string().transform((shape) => {
7304
+ const sourceType = shape.startsWith("AR~") ? "AR" : shape.startsWith("I~") ? "I" : void 0;
7305
+ if (!sourceType) {
7306
+ throw new Error(`Invalid ignored shape: ${shape}`);
7307
+ }
7308
+ return { type: "IGNORED", sourceType };
7309
+ }).pipe(IgnoredShapeOutputSchema);
7299
7310
  var optionalEasyEdaTextField = (fieldSchema) => z180.preprocess((textField) => {
7300
7311
  if (textField == null) return void 0;
7301
7312
  if (typeof textField === "string") {
@@ -7374,6 +7385,9 @@ var SingleLetterShapeSchema = z180.string().transform((x) => {
7374
7385
  if (x.startsWith("PG~")) return PolygonShapeSchema.parse(x);
7375
7386
  if (x.startsWith("PT~")) return PathShapeSchema.parse(x);
7376
7387
  if (x.startsWith("T~")) return TextShapeSchema.parse(x);
7388
+ if (x.startsWith("AR~") || x.startsWith("I~")) {
7389
+ return IgnoredShapeSchema.parse(x);
7390
+ }
7377
7391
  if (x.startsWith("A~")) return ArcShapeSchema.parse(x);
7378
7392
  throw new Error(`Invalid shape type: ${x}`);
7379
7393
  }).pipe(
@@ -7385,12 +7399,18 @@ var SingleLetterShapeSchema = z180.string().transform((x) => {
7385
7399
  PolygonShapeOutputSchema,
7386
7400
  PathShapeOutputSchema,
7387
7401
  TextShapeOutputSchema,
7402
+ IgnoredShapeOutputSchema,
7388
7403
  ArcShapeOutputSchema
7389
7404
  ])
7390
7405
  );
7391
7406
 
7392
7407
  // lib/schemas/easy-eda-json-schema.ts
7393
7408
  var maybeNumber = z181.any().transform((k) => k === "nan" || Number.isNaN(k) ? null : k).pipe(z181.number().nullable().optional());
7409
+ var optionalNumberWithNumericString = z181.preprocess((value) => {
7410
+ if (typeof value !== "string") return value;
7411
+ if (value.trim() === "") return void 0;
7412
+ return Number(value);
7413
+ }, z181.number().optional());
7394
7414
  var SzlcscSchema = z181.object({
7395
7415
  id: z181.preprocess((value) => {
7396
7416
  if (typeof value === "string" && /^\d+$/.test(value)) {
@@ -7401,7 +7421,7 @@ var SzlcscSchema = z181.object({
7401
7421
  number: z181.string(),
7402
7422
  step: z181.number().optional(),
7403
7423
  min: z181.number().optional(),
7404
- price: z181.number().optional(),
7424
+ price: optionalNumberWithNumericString,
7405
7425
  stock: z181.number().optional(),
7406
7426
  url: z181.string().url().optional(),
7407
7427
  image: z181.string().optional().optional()
@@ -7411,7 +7431,7 @@ var LcscSchema = z181.object({
7411
7431
  number: z181.string(),
7412
7432
  step: z181.number().optional(),
7413
7433
  min: z181.number().optional(),
7414
- price: z181.number().optional(),
7434
+ price: optionalNumberWithNumericString,
7415
7435
  stock: z181.number().optional(),
7416
7436
  url: z181.string().url().optional()
7417
7437
  });
@@ -8455,6 +8475,7 @@ var generateShapeTsx = ({
8455
8475
  const stemLengthProp = stemLength === void 0 ? "" : ` schStemLength={${stemLength}}`;
8456
8476
  return `<port name=${JSON.stringify(portMetadata.name)}${pinNumberProp}${aliasesProp} direction=${JSON.stringify(getPinDirection(shape.rotation))} schX={${position2.x}} schY={${position2.y}}${stemLengthProp} />`;
8457
8477
  }
8478
+ if (shape.type === "IGNORED") return void 0;
8458
8479
  return void 0;
8459
8480
  };
8460
8481
  var generateSymbolTsx = (easyEdaJson, circuitJson, { includePorts = true } = {}) => {
@@ -8488,7 +8509,7 @@ ${shapeTsx.map((tsx) => ` ${tsx}`).join("\n")}
8488
8509
  };
8489
8510
  var hasNonBoxSchematicSymbol = (easyEdaJson) => {
8490
8511
  const drawableShapes = easyEdaJson.dataStr.shape.filter(
8491
- (shape) => shape.type !== "PIN" && shape.type !== "TEXT"
8512
+ (shape) => shape.type !== "PIN" && shape.type !== "TEXT" && shape.type !== "IGNORED"
8492
8513
  );
8493
8514
  if (drawableShapes.length === 0) return false;
8494
8515
  const rectangles = drawableShapes.filter(