@builder.io/mitosis 0.0.90 → 0.0.92

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.
@@ -1,4 +1,5 @@
1
1
  import { MitosisNode } from '../types/mitosis-node';
2
+ export declare const getTextValue: (node: MitosisNode) => string;
2
3
  export default function isChildren({ node, extraMatches, }: {
3
4
  node: MitosisNode;
4
5
  extraMatches?: string[];
@@ -1,10 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTextValue = void 0;
4
+ var getTextValue = function (node) {
5
+ var _a;
6
+ var textValue = ((_a = node.bindings._text) === null || _a === void 0 ? void 0 : _a.code) || node.properties.__text || '';
7
+ return textValue.replace(/\s+/g, '');
8
+ };
9
+ exports.getTextValue = getTextValue;
3
10
  function isChildren(_a) {
4
- var _b;
5
- var node = _a.node, _c = _a.extraMatches, extraMatches = _c === void 0 ? [] : _c;
6
- var textValue = ((_b = node.bindings._text) === null || _b === void 0 ? void 0 : _b.code) || node.properties.__text || '';
7
- var trimmedTextValue = textValue.replace(/\s+/g, '');
8
- return ['props.children', 'children'].concat(extraMatches).includes(trimmedTextValue);
11
+ var node = _a.node, _b = _a.extraMatches, extraMatches = _b === void 0 ? [] : _b;
12
+ var textValue = (0, exports.getTextValue)(node);
13
+ return ['props.children', 'children'].concat(extraMatches).includes(textValue);
9
14
  }
10
15
  exports.default = isChildren;
@@ -2,6 +2,6 @@ import { BaseTranspilerOptions } from '..';
2
2
  /**
3
3
  * Merges options while combining the `plugins` array.
4
4
  */
5
- export declare const mergeOptions: <T extends BaseTranspilerOptions>(a: T, b?: Partial<T>) => T & {
5
+ export declare const mergeOptions: <T extends BaseTranspilerOptions>(a: T, b?: Partial<T>, c?: Partial<T> | undefined) => T & {
6
6
  plugins: NonNullable<T["plugins"]>;
7
7
  };
@@ -24,8 +24,8 @@ exports.mergeOptions = void 0;
24
24
  /**
25
25
  * Merges options while combining the `plugins` array.
26
26
  */
27
- var mergeOptions = function (a, b) {
27
+ var mergeOptions = function (a, b, c) {
28
28
  if (b === void 0) { b = {}; }
29
- return __assign(__assign(__assign({}, a), b), { plugins: __spreadArray(__spreadArray([], (a.plugins || []), true), (b.plugins || []), true) });
29
+ return __assign(__assign(__assign(__assign({}, a), b), c), { plugins: __spreadArray(__spreadArray(__spreadArray([], (a.plugins || []), true), (b.plugins || []), true), ((c === null || c === void 0 ? void 0 : c.plugins) || []), true) });
30
30
  };
31
31
  exports.mergeOptions = mergeOptions;
@@ -60,6 +60,7 @@ export * from './generators/template';
60
60
  export * from './generators/swift-ui';
61
61
  export * from './generators/lit';
62
62
  export * from './generators/react-native';
63
+ export * from './generators/taro';
63
64
  export * from './helpers/is-mitosis-node';
64
65
  export * from './types/mitosis-node';
65
66
  export * from './types/mitosis-component';
package/dist/src/index.js CHANGED
@@ -97,6 +97,7 @@ __exportStar(require("./generators/template"), exports);
97
97
  __exportStar(require("./generators/swift-ui"), exports);
98
98
  __exportStar(require("./generators/lit"), exports);
99
99
  __exportStar(require("./generators/react-native"), exports);
100
+ __exportStar(require("./generators/taro"), exports);
100
101
  __exportStar(require("./helpers/is-mitosis-node"), exports);
101
102
  __exportStar(require("./types/mitosis-node"), exports);
102
103
  __exportStar(require("./types/mitosis-component"), exports);
@@ -6,8 +6,8 @@ export declare const targets: {
6
6
  readonly html: import(".").TranspilerGenerator<import("./generators/html").ToHtmlOptions, string>;
7
7
  readonly mitosis: import(".").TranspilerGenerator<Partial<import("./generators/mitosis").ToMitosisOptions>, string>;
8
8
  readonly liquid: import(".").TranspilerGenerator<import("./generators/liquid").ToLiquidOptions, string>;
9
- readonly react: import(".").TranspilerGenerator<import("./generators/react").ToReactOptions, string>;
10
- readonly reactNative: import(".").TranspilerGenerator<import("./generators/react-native").ToReactNativeOptions, string>;
9
+ readonly react: import(".").TranspilerGenerator<Partial<import("./generators/react").ToReactOptions>, string>;
10
+ readonly reactNative: import(".").TranspilerGenerator<Partial<import("./generators/react-native").ToReactNativeOptions>, string>;
11
11
  readonly solid: import(".").TranspilerGenerator<Partial<import("./generators/solid/types").ToSolidOptions>, string>;
12
12
  readonly svelte: import(".").TranspilerGenerator<import("./generators/svelte/types").ToSvelteOptions, string>;
13
13
  readonly swift: import(".").TranspilerGenerator<import(".").BaseTranspilerOptions, string>;
@@ -19,7 +19,8 @@ export declare const targets: {
19
19
  readonly stencil: import(".").TranspilerGenerator<import("./generators/stencil").ToStencilOptions, string>;
20
20
  readonly qwik: import(".").TranspilerGenerator<import("./generators/qwik/component-generator").ToQwikOptions, string>;
21
21
  readonly marko: import(".").TranspilerGenerator<import("./generators/marko").ToMarkoOptions, string>;
22
- readonly preact: import(".").TranspilerGenerator<import("./generators/react").ToReactOptions, string>;
22
+ readonly preact: import(".").TranspilerGenerator<Partial<import("./generators/react").ToReactOptions>, string>;
23
23
  readonly lit: import(".").TranspilerGenerator<import("./generators/lit").ToLitOptions, string>;
24
- readonly rsc: import(".").TranspilerGenerator<import("./generators/rsc").ToRscOptions, string>;
24
+ readonly rsc: import(".").TranspilerGenerator<Partial<import("./generators/react").ToReactOptions>, string>;
25
+ readonly taro: import(".").TranspilerGenerator<Partial<import("./generators/react").ToReactOptions>, string>;
25
26
  };
@@ -20,6 +20,7 @@ var qwik_1 = require("./generators/qwik");
20
20
  var marko_1 = require("./generators/marko");
21
21
  var lit_1 = require("./generators/lit");
22
22
  var rsc_1 = require("./generators/rsc");
23
+ var taro_1 = require("./generators/taro");
23
24
  exports.builder = builder_1.componentToBuilder;
24
25
  exports.targets = {
25
26
  alpine: alpine_1.componentToAlpine,
@@ -44,4 +45,5 @@ exports.targets = {
44
45
  preact: react_2.componentToPreact,
45
46
  lit: lit_1.componentToLit,
46
47
  rsc: rsc_1.componentToRsc,
48
+ taro: taro_1.componentToTaro,
47
49
  };