@builder.io/mitosis
Advanced tools
Comparing version
@@ -300,21 +300,22 @@ "use strict"; | ||
else { | ||
let element, classNames = [], attributes; | ||
let element = null, classNames = [], attributes; | ||
const isComponent = childComponents.find((impName) => impName === json.name); | ||
if (isComponent) { | ||
const selector = json.meta.selector || (blockOptions === null || blockOptions === void 0 ? void 0 : blockOptions.selector); | ||
if (selector) { | ||
try { | ||
({ element, classNames, attributes } = (0, parse_selector_1.parse)(`${selector}`)); | ||
} | ||
catch (_r) { | ||
element = (0, lodash_1.kebabCase)(json.name); | ||
} | ||
const tagName = json.properties.$tagName; | ||
const selector = json.meta.selector || (blockOptions === null || blockOptions === void 0 ? void 0 : blockOptions.selector); | ||
if (selector) { | ||
try { | ||
({ element, classNames, attributes } = (0, parse_selector_1.parse)(`${selector}`)); | ||
} | ||
catch (_r) { | ||
element = tagName !== null && tagName !== void 0 ? tagName : (0, lodash_1.kebabCase)(json.name); | ||
} | ||
} | ||
if (!element) { | ||
if (isComponent) { | ||
element = tagName !== null && tagName !== void 0 ? tagName : (0, lodash_1.kebabCase)(json.name); | ||
} | ||
else { | ||
element = (0, lodash_1.kebabCase)(json.name); | ||
element = tagName !== null && tagName !== void 0 ? tagName : json.name; | ||
} | ||
} | ||
else { | ||
element = json.name; | ||
} | ||
str += `<${element} `; | ||
@@ -321,0 +322,0 @@ // TODO: merge with existing classes/bindings |
@@ -759,5 +759,2 @@ "use strict"; | ||
} | ||
if (block.component && block.tagName && block.tagName !== 'div') { | ||
properties.builderTag = block.tagName; | ||
} | ||
const css = getCssFromBlock(block); | ||
@@ -764,0 +761,0 @@ let styleString = getStyleStringFromBlock(block, options); |
@@ -25,3 +25,3 @@ { | ||
}, | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"homepage": "https://github.com/BuilderIO/mitosis", | ||
@@ -28,0 +28,0 @@ "main": "./dist/src/index.js", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1133587
0.01%26986
-0.01%