@builder.io/mitosis 0.2.10 → 0.3.0

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.
@@ -543,10 +543,12 @@ var componentToAngular = function (userOptions) {
543
543
  childComponents: childComponents,
544
544
  nativeAttributes: (_f = (_e = useMetadata === null || useMetadata === void 0 ? void 0 : useMetadata.angular) === null || _e === void 0 ? void 0 : _e.nativeAttributes) !== null && _f !== void 0 ? _f : [],
545
545
  }), dynamicComponents = _o.components, dynamicTemplate = _o.dynamicTemplate;
546
+ var hostDisplayCss = options.visuallyIgnoreHostElement ? ':host { display: contents; }' : '';
547
+ var styles = css.length ? [hostDisplayCss, css].join('\n') : hostDisplayCss;
546
548
  // Preparing built in component metadata parameters
547
- var componentMetadata = __assign(__assign({ selector: "'".concat((0, lodash_1.kebabCase)(json.name || 'my-component'), ", ").concat(json.name, "'"), template: "`\n ".concat((0, indent_1.indent)(dynamicTemplate, 8).replace(/`/g, '\\`').replace(/\$\{/g, '\\${'), "\n ").concat((0, indent_1.indent)(template, 8).replace(/`/g, '\\`').replace(/\$\{/g, '\\${'), "\n `") }, (css.length
549
+ var componentMetadata = __assign(__assign({ selector: "'".concat((0, lodash_1.kebabCase)(json.name || 'my-component'), ", ").concat(json.name, "'"), template: "`\n ".concat((0, indent_1.indent)(dynamicTemplate, 8).replace(/`/g, '\\`').replace(/\$\{/g, '\\${'), "\n ").concat((0, indent_1.indent)(template, 8).replace(/`/g, '\\`').replace(/\$\{/g, '\\${'), "\n `") }, (styles
548
550
  ? {
549
- styles: "[`".concat((0, indent_1.indent)(css, 8), "`]"),
551
+ styles: "[`".concat((0, indent_1.indent)(styles, 8), "`]"),
550
552
  }
551
553
  : {})), (options.standalone
552
554
  ? // TODO: also add child component imports here as well
@@ -6,6 +6,7 @@ export interface ToAngularOptions extends BaseTranspilerOptions {
6
6
  preserveFileExtensions?: boolean;
7
7
  importMapper?: Function;
8
8
  bootstrapMapper?: Function;
9
+ visuallyIgnoreHostElement?: boolean;
9
10
  }
10
11
  export declare const DEFAULT_ANGULAR_OPTIONS: ToAngularOptions;
11
12
  export interface AngularBlockOptions {
@@ -5,4 +5,5 @@ exports.BUILT_IN_COMPONENTS = new Set(['Show', 'For', 'Fragment', 'Slot']);
5
5
  exports.DEFAULT_ANGULAR_OPTIONS = {
6
6
  preserveImports: false,
7
7
  preserveFileExtensions: false,
8
+ visuallyIgnoreHostElement: true,
8
9
  };
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.2.10",
25
+ "version": "0.3.0",
26
26
  "homepage": "https://github.com/BuilderIO/mitosis",
27
27
  "main": "./dist/src/index.js",
28
28
  "exports": {