easyeda 0.0.290 → 0.0.292
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/browser/index.js +31 -0
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +32 -1
- package/dist/main.cjs.map +1 -1
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -3528,7 +3528,7 @@ var import_promises = __toESM(require("fs/promises"), 1);
|
|
|
3528
3528
|
var package_default = {
|
|
3529
3529
|
name: "easyeda",
|
|
3530
3530
|
type: "module",
|
|
3531
|
-
version: "0.0.
|
|
3531
|
+
version: "0.0.291",
|
|
3532
3532
|
files: [
|
|
3533
3533
|
"dist"
|
|
3534
3534
|
],
|
|
@@ -11351,6 +11351,30 @@ ${cadModelLines}
|
|
|
11351
11351
|
/>
|
|
11352
11352
|
)
|
|
11353
11353
|
}
|
|
11354
|
+
`.trim();
|
|
11355
|
+
}
|
|
11356
|
+
if (componentType === "connector") {
|
|
11357
|
+
return `
|
|
11358
|
+
import type { ConnectorProps } from "@tscircuit/props"
|
|
11359
|
+
|
|
11360
|
+
const pinLabels = {
|
|
11361
|
+
${pinLabelsString}
|
|
11362
|
+
} as const
|
|
11363
|
+
|
|
11364
|
+
export const ${componentName} = (props: ConnectorProps) => {
|
|
11365
|
+
return (
|
|
11366
|
+
<connector
|
|
11367
|
+
pinLabels={pinLabels}
|
|
11368
|
+
supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
|
|
11369
|
+
manufacturerPartNumber="${manufacturerPartNumber}"
|
|
11370
|
+
footprint={${footprintTsx}}
|
|
11371
|
+
${objUrl || stepUrl ? `cadModel={{
|
|
11372
|
+
${cadModelLines}
|
|
11373
|
+
}}` : ""}
|
|
11374
|
+
{...props}
|
|
11375
|
+
/>
|
|
11376
|
+
)
|
|
11377
|
+
}
|
|
11354
11378
|
`.trim();
|
|
11355
11379
|
}
|
|
11356
11380
|
return `
|
|
@@ -11395,6 +11419,12 @@ var isInductorComponent = (betterEasy) => {
|
|
|
11395
11419
|
return packageName?.toUpperCase().startsWith("IND-") === true && typeof value === "string" && inductancePattern.test(value.trim());
|
|
11396
11420
|
};
|
|
11397
11421
|
|
|
11422
|
+
// lib/websafe/convert-to-typescript-component/is-micro-usb-connector-component.ts
|
|
11423
|
+
var isMicroUsbConnectorComponent = (betterEasy) => {
|
|
11424
|
+
const componentParameters = betterEasy.dataStr.head.c_para;
|
|
11425
|
+
return componentParameters.pre === "USB?" && componentParameters.package?.toUpperCase().startsWith("MICRO-USB-") === true;
|
|
11426
|
+
};
|
|
11427
|
+
|
|
11398
11428
|
// lib/websafe/convert-to-typescript-component/category-value-contains-pushbutton.ts
|
|
11399
11429
|
var categoryValueContainsPushbutton = (value) => {
|
|
11400
11430
|
if (typeof value === "string") {
|
|
@@ -11765,6 +11795,7 @@ var getGeneratedComponentType = (betterEasy) => {
|
|
|
11765
11795
|
if (isSwitchCategoryComponent(betterEasy)) return "switch";
|
|
11766
11796
|
if (isInductorComponent(betterEasy)) return "inductor";
|
|
11767
11797
|
if (isCrystalComponent(betterEasy)) return "crystal";
|
|
11798
|
+
if (isMicroUsbConnectorComponent(betterEasy)) return "connector";
|
|
11768
11799
|
return "chip";
|
|
11769
11800
|
};
|
|
11770
11801
|
var convertRawEasyToTsx = async ({ rawEasy }) => {
|