@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 `") }, (
|
|
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)(
|
|
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 {
|