@builder.io/mitosis 0.7.1 → 0.7.2

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.
@@ -297,24 +297,25 @@ const blockToAngular = ({ root, json, options = {}, blockOptions = {
297
297
  str += `</ng-container>`;
298
298
  }
299
299
  else {
300
- let element, classNames = [], attributes;
300
+ let element = null, classNames = [], attributes;
301
301
  const isComponent = childComponents.find((impName) => impName === json.name);
302
- if (isComponent) {
303
- const selector = json.meta.selector || (blockOptions === null || blockOptions === void 0 ? void 0 : blockOptions.selector);
304
- if (selector) {
305
- try {
306
- ({ element, classNames, attributes } = (0, parse_selector_1.parse)(`${selector}`));
307
- }
308
- catch (_r) {
309
- element = (0, lodash_1.kebabCase)(json.name);
310
- }
302
+ const tagName = json.properties.$tagName;
303
+ const selector = json.meta.selector || (blockOptions === null || blockOptions === void 0 ? void 0 : blockOptions.selector);
304
+ if (selector) {
305
+ try {
306
+ ({ element, classNames, attributes } = (0, parse_selector_1.parse)(`${selector}`));
311
307
  }
312
- else {
313
- element = (0, lodash_1.kebabCase)(json.name);
308
+ catch (_r) {
309
+ element = tagName !== null && tagName !== void 0 ? tagName : (0, lodash_1.kebabCase)(json.name);
314
310
  }
315
311
  }
316
- else {
317
- element = json.name;
312
+ if (!element) {
313
+ if (isComponent) {
314
+ element = tagName !== null && tagName !== void 0 ? tagName : (0, lodash_1.kebabCase)(json.name);
315
+ }
316
+ else {
317
+ element = tagName !== null && tagName !== void 0 ? tagName : json.name;
318
+ }
318
319
  }
319
320
  str += `<${element} `;
320
321
  // TODO: merge with existing classes/bindings
@@ -756,9 +756,6 @@ const builderElementToMitosisNode = (block, options, _internalOptions = {}) => {
756
756
  }
757
757
  }
758
758
  }
759
- if (block.component && block.tagName && block.tagName !== 'div') {
760
- properties.builderTag = block.tagName;
761
- }
762
759
  const css = getCssFromBlock(block);
763
760
  let styleString = getStyleStringFromBlock(block, options);
764
761
  const actionBindings = getActionBindingsFromBlock(block, options);
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "name": "Builder.io",
23
23
  "url": "https://www.builder.io"
24
24
  },
25
- "version": "0.7.1",
25
+ "version": "0.7.2",
26
26
  "homepage": "https://github.com/BuilderIO/mitosis",
27
27
  "main": "./dist/src/index.js",
28
28
  "exports": {