@tscircuit/core 0.0.612 → 0.0.613
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 +18 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -314,7 +314,24 @@ var InvalidProps = class extends Error {
|
|
|
314
314
|
const propsWithError = Object.keys(formattedError).filter(
|
|
315
315
|
(k) => k !== "_errors"
|
|
316
316
|
);
|
|
317
|
+
const invalidPinLabelMessages = [];
|
|
318
|
+
const pinLabels = originalProps.pinLabels;
|
|
319
|
+
if (pinLabels) {
|
|
320
|
+
for (const [pin, labelOrLabels] of Object.entries(pinLabels)) {
|
|
321
|
+
const labels = Array.isArray(labelOrLabels) ? labelOrLabels : [labelOrLabels];
|
|
322
|
+
for (const label of labels) {
|
|
323
|
+
if (typeof label === "string" && (label.startsWith(" ") || label.endsWith(" "))) {
|
|
324
|
+
invalidPinLabelMessages.push(
|
|
325
|
+
`pinLabels.${pin} ("${label}" has leading or trailing spaces)`
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
317
331
|
const propMessage = propsWithError.map((k) => {
|
|
332
|
+
if (k === "pinLabels" && invalidPinLabelMessages.length > 0) {
|
|
333
|
+
return invalidPinLabelMessages.join(", ");
|
|
334
|
+
}
|
|
318
335
|
if (formattedError[k]._errors[0]) {
|
|
319
336
|
return `${k} (${formattedError[k]._errors[0]})`;
|
|
320
337
|
}
|
|
@@ -11595,7 +11612,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
11595
11612
|
var package_default = {
|
|
11596
11613
|
name: "@tscircuit/core",
|
|
11597
11614
|
type: "module",
|
|
11598
|
-
version: "0.0.
|
|
11615
|
+
version: "0.0.612",
|
|
11599
11616
|
types: "dist/index.d.ts",
|
|
11600
11617
|
main: "dist/index.js",
|
|
11601
11618
|
module: "dist/index.js",
|