@tscircuit/core 0.0.515 → 0.0.516
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 +2 -2
- package/dist/index.js +15 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -491,7 +491,7 @@ declare abstract class PrimitiveComponent<ZodProps extends ZodType = any> extend
|
|
|
491
491
|
}
|
|
492
492
|
|
|
493
493
|
declare const netProps: z.ZodObject<{
|
|
494
|
-
name: z.ZodString
|
|
494
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
495
495
|
}, "strip", z.ZodTypeAny, {
|
|
496
496
|
name: string;
|
|
497
497
|
}, {
|
|
@@ -502,7 +502,7 @@ declare class Net extends PrimitiveComponent<typeof netProps> {
|
|
|
502
502
|
get config(): {
|
|
503
503
|
componentName: string;
|
|
504
504
|
zodProps: z.ZodObject<{
|
|
505
|
-
name: z.ZodString
|
|
505
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
506
506
|
}, "strip", z.ZodTypeAny, {
|
|
507
507
|
name: string;
|
|
508
508
|
}, {
|
package/dist/index.js
CHANGED
|
@@ -489,6 +489,11 @@ var preprocessSelector = (selector) => {
|
|
|
489
489
|
'Net names cannot contain a period, try using "sel.net..." to autocomplete with conventional net names, e.g. V3_3'
|
|
490
490
|
);
|
|
491
491
|
}
|
|
492
|
+
if (/net\.[^\s>]*[+-]/.test(selector)) {
|
|
493
|
+
throw new Error(
|
|
494
|
+
'Net names cannot contain "+" or "-", try using underscores instead, e.g. VCC_P'
|
|
495
|
+
);
|
|
496
|
+
}
|
|
492
497
|
if (/net\.[0-9]/.test(selector)) {
|
|
493
498
|
const match = selector.match(/net\.([^ >]+)/);
|
|
494
499
|
const netName = match ? match[1] : "";
|
|
@@ -1452,7 +1457,10 @@ function pairs(arr) {
|
|
|
1452
1457
|
// lib/components/primitive-components/Net.ts
|
|
1453
1458
|
import { autoroute } from "@tscircuit/infgrid-ijump-astar";
|
|
1454
1459
|
var netProps = z4.object({
|
|
1455
|
-
name: z4.string()
|
|
1460
|
+
name: z4.string().refine(
|
|
1461
|
+
(val) => !/[+-]/.test(val),
|
|
1462
|
+
'Net names cannot contain "+" or "-", try using underscores instead, e.g. VCC_P'
|
|
1463
|
+
)
|
|
1456
1464
|
});
|
|
1457
1465
|
var Net = class extends PrimitiveComponent2 {
|
|
1458
1466
|
source_net_id;
|
|
@@ -1634,6 +1642,11 @@ var createNetsFromProps = (component, props) => {
|
|
|
1634
1642
|
'Net names cannot contain a period, try using "sel.net..." to autocomplete with conventional net names, e.g. V3_3'
|
|
1635
1643
|
);
|
|
1636
1644
|
}
|
|
1645
|
+
if (/net\.[^\s>]*[+-]/.test(prop)) {
|
|
1646
|
+
throw new Error(
|
|
1647
|
+
'Net names cannot contain "+" or "-", try using underscores instead, e.g. VCC_P'
|
|
1648
|
+
);
|
|
1649
|
+
}
|
|
1637
1650
|
if (/net\.[0-9]/.test(prop)) {
|
|
1638
1651
|
const netName = prop.split("net.")[1];
|
|
1639
1652
|
throw new Error(
|
|
@@ -10429,7 +10442,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
10429
10442
|
var package_default = {
|
|
10430
10443
|
name: "@tscircuit/core",
|
|
10431
10444
|
type: "module",
|
|
10432
|
-
version: "0.0.
|
|
10445
|
+
version: "0.0.515",
|
|
10433
10446
|
types: "dist/index.d.ts",
|
|
10434
10447
|
main: "dist/index.js",
|
|
10435
10448
|
module: "dist/index.js",
|