@plasmicapp/loader-react 1.0.49 → 1.0.53

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.
@@ -1898,6 +1898,10 @@ var PlasmicComponentLoader = /*#__PURE__*/function () {
1898
1898
 
1899
1899
  this.substituteComponent(component, metaOrName);
1900
1900
  }
1901
+ };
1902
+
1903
+ _proto2.registerContext = function registerContext(context, meta) {
1904
+ this.__internal.registerContext(context, meta);
1901
1905
  }
1902
1906
  /**
1903
1907
  * Pre-fetches component data needed to for PlasmicLoader to render
@@ -2215,12 +2219,12 @@ function _extractPlasmicQueryData() {
2215
2219
  console.warn("PLASMIC: Error encountered while pre-rendering", _context.t0);
2216
2220
 
2217
2221
  case 9:
2218
- return _context.abrupt("return", Object.fromEntries(Array.from(Object.entries(cache)).map(function (_ref4) {
2219
- var key = _ref4[0],
2220
- data = _ref4[1].data;
2222
+ return _context.abrupt("return", Object.fromEntries(Array.from(Object.entries(cache)).map(function (_ref3) {
2223
+ var key = _ref3[0],
2224
+ data = _ref3[1].data;
2221
2225
  return [key, data];
2222
- }).filter(function (_ref5) {
2223
- var data = _ref5[1];
2226
+ }).filter(function (_ref4) {
2227
+ var data = _ref4[1];
2224
2228
  return !!data;
2225
2229
  })));
2226
2230
 
@@ -2280,32 +2284,10 @@ function processComponentProps(props) {
2280
2284
  return props;
2281
2285
  }
2282
2286
 
2283
- var processValue = function processValue(value, depth) {
2284
- if (depth > 2) {
2285
- return value;
2286
- }
2287
-
2288
- if (React__default.isValidElement(value)) {
2289
- return processReactElement(value);
2290
- } else if (Array.isArray(value)) {
2291
- return value.map(function (v) {
2292
- return processValue(v, depth + 1);
2293
- });
2294
- } else if (isLiteralObject(value)) {
2295
- return Object.fromEntries(Object.entries(value).map(function (_ref) {
2296
- var k = _ref[0],
2297
- v = _ref[1];
2298
- return [k, processValue(v, depth + 1)];
2299
- }));
2300
- } else {
2301
- return value;
2302
- }
2303
- };
2304
-
2305
- return Object.fromEntries(Object.entries(props).map(function (_ref2) {
2306
- var k = _ref2[0],
2307
- v = _ref2[1];
2308
- return [k, processValue(v, 1)];
2287
+ return Object.fromEntries(Object.entries(props).map(function (_ref) {
2288
+ var k = _ref[0],
2289
+ v = _ref[1];
2290
+ return [k, React__default.isValidElement(v) ? processReactElement(v) : v];
2309
2291
  }));
2310
2292
  }
2311
2293
 
@@ -2344,9 +2326,9 @@ function processPlasmicComponentProps(x) {
2344
2326
  } else if (Array.isArray(x)) {
2345
2327
  return x.map(processPlasmicComponentProps);
2346
2328
  } else if (isLiteralObject(x)) {
2347
- return Object.fromEntries(Object.entries(x).map(function (_ref3) {
2348
- var key = _ref3[0],
2349
- val = _ref3[1];
2329
+ return Object.fromEntries(Object.entries(x).map(function (_ref2) {
2330
+ var key = _ref2[0],
2331
+ val = _ref2[1];
2350
2332
  return [key, processPlasmicComponentProps(val)];
2351
2333
  }));
2352
2334
  } else {