@tscircuit/props 0.0.670 → 0.0.672

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.js CHANGED
@@ -143,6 +143,7 @@ var assemblySubassemblyProps = z7.object({
143
143
  message: "name cannot be empty"
144
144
  }),
145
145
  displayName: z7.string().optional(),
146
+ model: z7.string().trim().min(1).optional(),
146
147
  modelUrl: url.refine((value) => value.trim().length > 0, {
147
148
  message: "modelUrl cannot be empty"
148
149
  }).optional(),
@@ -154,6 +155,12 @@ var assemblySubassemblyProps = z7.object({
154
155
  message: "Provide either modelUrl or cadModel, not both",
155
156
  path: ["modelUrl"]
156
157
  }
158
+ ).refine(
159
+ (assembly) => assembly.model === void 0 || assembly.modelUrl === void 0 && assembly.cadModel === void 0,
160
+ {
161
+ message: "Provide only one of model, modelUrl, or cadModel",
162
+ path: ["model"]
163
+ }
157
164
  );
158
165
  expectTypesMatch(true);
159
166
 
@@ -164,10 +171,17 @@ var assemblyCadAssemblyProps = assemblySubassemblyProps;
164
171
  import { z as z8 } from "zod";
165
172
  var assemblyDeviceProps = z8.object({
166
173
  name: z8.string().optional(),
174
+ model: z8.string().trim().min(1).optional(),
167
175
  modelUrl: url.refine((value) => value.trim().length > 0, {
168
176
  message: "modelUrl cannot be empty"
169
177
  }).optional()
170
- });
178
+ }).refine(
179
+ (device) => device.model === void 0 || device.modelUrl === void 0,
180
+ {
181
+ message: "Provide either model or modelUrl, not both",
182
+ path: ["model"]
183
+ }
184
+ );
171
185
  expectTypesMatch(true);
172
186
 
173
187
  // lib/assembly/screen.ts
@@ -180,6 +194,7 @@ var positiveDistance = (fieldName) => distance.refine((value) => Number.isFinite
180
194
  });
181
195
  var assemblyScreenProps = z9.object({
182
196
  name: nonemptyString("name"),
197
+ model: z9.string().trim().min(1).optional(),
183
198
  modelUrl: url.refine((value) => value.trim().length > 0, {
184
199
  message: "modelUrl cannot be empty"
185
200
  }).optional(),
@@ -188,6 +203,13 @@ var assemblyScreenProps = z9.object({
188
203
  height: positiveDistance("height").optional(),
189
204
  cadModel: nonemptyString("cadModel").optional()
190
205
  }).superRefine((screen, context) => {
206
+ if (screen.model !== void 0 && (screen.modelUrl !== void 0 || screen.cadModel !== void 0)) {
207
+ context.addIssue({
208
+ code: z9.ZodIssueCode.custom,
209
+ message: "Provide only one of model, modelUrl, or cadModel",
210
+ path: ["model"]
211
+ });
212
+ }
191
213
  if (screen.modelUrl !== void 0 && screen.cadModel !== void 0) {
192
214
  context.addIssue({
193
215
  code: z9.ZodIssueCode.custom,
@@ -205,10 +227,10 @@ var assemblyScreenProps = z9.object({
205
227
  });
206
228
  return;
207
229
  }
208
- if (!hasWidth && screen.cadModel === void 0 && screen.modelUrl === void 0) {
230
+ if (!hasWidth && screen.cadModel === void 0 && screen.modelUrl === void 0 && screen.model === void 0) {
209
231
  context.addIssue({
210
232
  code: z9.ZodIssueCode.custom,
211
- message: "provide width and height, cadModel, or modelUrl",
233
+ message: "provide width and height, model, cadModel, or modelUrl",
212
234
  path: []
213
235
  });
214
236
  }
@@ -16509,6 +16531,7 @@ var autorouterConfig = z44.object({
16509
16531
  "laser_prefab",
16510
16532
  "single_layer_fanout",
16511
16533
  "fanout",
16534
+ "dogbone",
16512
16535
  "bus_lanes",
16513
16536
  "auto-jumper",
16514
16537
  "sequential-trace",
@@ -16533,6 +16556,7 @@ var autorouterPreset = z44.union([
16533
16556
  // Prefabricated PCB with laser copper ablation
16534
16557
  z44.literal("single_layer_fanout"),
16535
16558
  z44.literal("fanout"),
16559
+ z44.literal("dogbone"),
16536
16560
  z44.literal("bus_lanes"),
16537
16561
  z44.literal("auto-jumper"),
16538
16562
  z44.literal("sequential-trace"),