@builder.io/mitosis 0.2.1 → 0.2.3

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.
@@ -145,23 +145,23 @@ var processCodeBlockInTemplate = function (code) {
145
145
  // contains helper calls as Angular doesn't support JS expressions in templates
146
146
  if (code.startsWith('{')) {
147
147
  // Objects cannot be spread out directly in Angular so we need to use `useObjectWrapper`
148
- return "\"useObjectWrapper(".concat(handleObjectBindings(code), ")\" ");
148
+ return "useObjectWrapper(".concat(handleObjectBindings(code), ")");
149
149
  }
150
150
  else if (code.startsWith('Object.values')) {
151
151
  var stripped = code.replace('Object.values', '');
152
- return "\"useObjectDotValues".concat(stripped, "\" ");
152
+ return "useObjectDotValues".concat(stripped);
153
153
  }
154
154
  else if (code.includes('JSON.stringify')) {
155
155
  var obj = code.match(/JSON.stringify\([^)]*\)/g);
156
- return "\"useJsonStringify(".concat(obj, ")\" ");
156
+ return "useJsonStringify(".concat(obj, ")");
157
157
  }
158
158
  else if (code.includes(' as ')) {
159
159
  var asIndex = code.indexOf('as');
160
160
  var asCode = code.slice(0, asIndex - 1);
161
- return "\"$any".concat(asCode, ")\"");
161
+ return "$any".concat(asCode, ")");
162
162
  }
163
163
  else {
164
- return "\"".concat(code, "\" ");
164
+ return "".concat(code);
165
165
  }
166
166
  };
167
167
  var processEventBinding = function (key, code, nodeName, customArg) {
@@ -212,7 +212,7 @@ var stringifyBinding = function (node, options, blockOptions) {
212
212
  return " [attr.".concat(keyToUse, "]=\"").concat(code, "\" ");
213
213
  }
214
214
  else {
215
- return "[".concat(keyToUse, "]=").concat(processCodeBlockInTemplate(code));
215
+ return "[".concat(keyToUse, "]=\"").concat(processCodeBlockInTemplate(code), "\"");
216
216
  }
217
217
  };
218
218
  };
@@ -68,7 +68,7 @@ var NODE_MAPPERS = {
68
68
  return "<>{".concat(slotProp, " ").concat(hasChildren ? "|| (".concat(renderChildren(), ")") : '', "}</>");
69
69
  },
70
70
  Fragment: function (json, options, component) {
71
- var wrap = (0, helpers_1.wrapInFragment)(json);
71
+ var wrap = (0, helpers_1.wrapInFragment)(json) || (0, is_root_text_node_1.isRootTextNode)(json);
72
72
  return "".concat(wrap ? (0, helpers_1.getFragment)('open', options) : '').concat(json.children
73
73
  .map(function (item) { return (0, exports.blockToReact)(item, options, component); })
74
74
  .join('\n')).concat(wrap ? (0, helpers_1.getFragment)('close', 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.2.1",
25
+ "version": "0.2.3",
26
26
  "homepage": "https://github.com/BuilderIO/mitosis",
27
27
  "main": "./dist/src/index.js",
28
28
  "exports": {