@tscircuit/core 0.0.676 → 0.0.677
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 +4 -0
- package/dist/index.js +34 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1008,6 +1008,10 @@ declare class NormalComponent<ZodProps extends z.ZodType = any, PortNames extend
|
|
|
1008
1008
|
reactSubtrees: Array<ReactSubtree>;
|
|
1009
1009
|
_impliedFootprint?: string | undefined;
|
|
1010
1010
|
isPrimitiveContainer: boolean;
|
|
1011
|
+
_isNormalComponent: boolean;
|
|
1012
|
+
_attributeLowerToCamelNameMap: {
|
|
1013
|
+
_isnormalcomponent: string;
|
|
1014
|
+
};
|
|
1011
1015
|
_asyncSupplierPartNumbers?: SupplierPartNumbers;
|
|
1012
1016
|
pcb_missing_footprint_error_id?: string;
|
|
1013
1017
|
_hasStartedFootprintUrlLoad: boolean;
|
package/dist/index.js
CHANGED
|
@@ -424,6 +424,18 @@ var cssSelectPrimitiveComponentAdapter = {
|
|
|
424
424
|
const value = node._parsedProps[name];
|
|
425
425
|
return typeof value === "string" ? value : value !== null && value !== void 0 ? String(value) : null;
|
|
426
426
|
}
|
|
427
|
+
if (name in node) {
|
|
428
|
+
const value = node[name];
|
|
429
|
+
return typeof value === "string" ? value : value !== null && value !== void 0 ? String(value) : null;
|
|
430
|
+
}
|
|
431
|
+
const reverseMap = node._attributeLowerToCamelNameMap;
|
|
432
|
+
if (reverseMap) {
|
|
433
|
+
const camelCaseName = reverseMap[name];
|
|
434
|
+
if (camelCaseName && camelCaseName in node) {
|
|
435
|
+
const value = node[camelCaseName];
|
|
436
|
+
return typeof value === "string" ? value : value !== null && value !== void 0 ? String(value) : null;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
427
439
|
return null;
|
|
428
440
|
},
|
|
429
441
|
// Check if a node has an attribute
|
|
@@ -431,7 +443,20 @@ var cssSelectPrimitiveComponentAdapter = {
|
|
|
431
443
|
if (name === "class") {
|
|
432
444
|
return !!node._parsedProps?.name;
|
|
433
445
|
}
|
|
434
|
-
|
|
446
|
+
if (node._parsedProps && name in node._parsedProps) {
|
|
447
|
+
return true;
|
|
448
|
+
}
|
|
449
|
+
if (name in node) {
|
|
450
|
+
return true;
|
|
451
|
+
}
|
|
452
|
+
const reverseMap = node._attributeLowerToCamelNameMap;
|
|
453
|
+
if (reverseMap) {
|
|
454
|
+
const camelCaseName = reverseMap[name];
|
|
455
|
+
if (camelCaseName && camelCaseName in node) {
|
|
456
|
+
return true;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
return false;
|
|
435
460
|
},
|
|
436
461
|
// Get the siblings of the node
|
|
437
462
|
getSiblings: (node) => {
|
|
@@ -6337,6 +6362,13 @@ var NormalComponent = class extends PrimitiveComponent2 {
|
|
|
6337
6362
|
reactSubtrees = [];
|
|
6338
6363
|
_impliedFootprint;
|
|
6339
6364
|
isPrimitiveContainer = true;
|
|
6365
|
+
_isNormalComponent = true;
|
|
6366
|
+
// Mapping from camelCase attribute names to their lowercase equivalents
|
|
6367
|
+
// This is used by the CSS selector adapter for fast attribute lookups
|
|
6368
|
+
// Reverse mapping from lowercase to camelCase for O(1) lookups
|
|
6369
|
+
_attributeLowerToCamelNameMap = {
|
|
6370
|
+
_isnormalcomponent: "_isNormalComponent"
|
|
6371
|
+
};
|
|
6340
6372
|
_asyncSupplierPartNumbers;
|
|
6341
6373
|
pcb_missing_footprint_error_id;
|
|
6342
6374
|
_hasStartedFootprintUrlLoad = false;
|
|
@@ -13879,7 +13911,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
13879
13911
|
var package_default = {
|
|
13880
13912
|
name: "@tscircuit/core",
|
|
13881
13913
|
type: "module",
|
|
13882
|
-
version: "0.0.
|
|
13914
|
+
version: "0.0.676",
|
|
13883
13915
|
types: "dist/index.d.ts",
|
|
13884
13916
|
main: "dist/index.js",
|
|
13885
13917
|
module: "dist/index.js",
|