@plumeria/utils 19.1.9 → 19.1.10
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/transform.js +11 -14
- package/package.json +1 -1
package/dist/transform.js
CHANGED
|
@@ -2010,24 +2010,21 @@ const transformSource = async (env) => {
|
|
|
2010
2010
|
if (node.name.type !== 'Identifier')
|
|
2011
2011
|
return;
|
|
2012
2012
|
const attrName = node.name.value;
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
const
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2013
|
+
if (attrName !== styleProp) {
|
|
2014
|
+
let compKey = null;
|
|
2015
|
+
for (const [, val] of jsxOpeningElementMap) {
|
|
2016
|
+
const found = val.attributes
|
|
2017
|
+
.filter((a) => a.type === 'JSXAttribute')
|
|
2018
|
+
.find((a) => a.span.start === node.span.start);
|
|
2019
|
+
if (found) {
|
|
2020
|
+
compKey = val.compKey;
|
|
2021
|
+
break;
|
|
2022
|
+
}
|
|
2021
2023
|
}
|
|
2022
|
-
}
|
|
2023
|
-
const relayed = compKey
|
|
2024
|
-
? scannedTables.componentPropsTable?.[compKey]?.[attrName]
|
|
2025
|
-
: undefined;
|
|
2026
|
-
if (attrName !== styleProp || relayed) {
|
|
2027
2024
|
if (compKey) {
|
|
2028
2025
|
if (node.value?.type === 'JSXExpressionContainer')
|
|
2029
2026
|
assertNoStyleArraySpread(node.value.expression);
|
|
2030
|
-
const list =
|
|
2027
|
+
const list = scannedTables.componentPropsTable?.[compKey]?.[attrName];
|
|
2031
2028
|
if (list &&
|
|
2032
2029
|
node.value &&
|
|
2033
2030
|
node.value.type === 'JSXExpressionContainer') {
|