@tscircuit/footprinter 0.0.298 → 0.0.299
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 +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -794,7 +794,7 @@ var getArrayCount = (parameters) => {
|
|
|
794
794
|
return Number.isNaN(parsed) ? void 0 : parsed;
|
|
795
795
|
}
|
|
796
796
|
if (typeof parameters.imperial === "string") {
|
|
797
|
-
const match = parameters.imperial.match(/
|
|
797
|
+
const match = parameters.imperial.match(/x(2|4)$/);
|
|
798
798
|
const count = match?.[1];
|
|
799
799
|
if (count) {
|
|
800
800
|
return Number.parseInt(count, 10);
|
|
@@ -805,7 +805,7 @@ var getArrayCount = (parameters) => {
|
|
|
805
805
|
var getImperialBase = (imperial) => {
|
|
806
806
|
if (!imperial) return void 0;
|
|
807
807
|
const imperialString = typeof imperial === "number" ? `${imperial}` : imperial;
|
|
808
|
-
return imperialString.split(
|
|
808
|
+
return imperialString.split(/[_x]/)[0];
|
|
809
809
|
};
|
|
810
810
|
var res = (rawParameters) => {
|
|
811
811
|
const arrayCount = getArrayCount(rawParameters);
|
|
@@ -8498,7 +8498,7 @@ var applyNoSilkscreen = (elements, parameters) => {
|
|
|
8498
8498
|
// src/footprinter.ts
|
|
8499
8499
|
var string2 = (def) => {
|
|
8500
8500
|
let fp2 = footprinter();
|
|
8501
|
-
const modifiedDef = def.replace(/^((?:\d{4}|\d{5}))(?=$|_)/, "res$1");
|
|
8501
|
+
const modifiedDef = def.replace(/^((?:\d{4}|\d{5}))(?=$|_|x)/, "res$1");
|
|
8502
8502
|
const def_parts = modifiedDef.split(/_(?!metric)/).map((s) => {
|
|
8503
8503
|
const m = s.match(/([a-zA-Z]+)([\(\d\.\+\?].*)?/);
|
|
8504
8504
|
if (!m) return null;
|