@plasmicapp/loader-react 1.0.45 → 1.0.49
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.
- package/dist/loader-react.cjs.development.js +21 -4
- package/dist/loader-react.cjs.development.js.map +1 -1
- package/dist/loader-react.cjs.production.min.js +1 -1
- package/dist/loader-react.cjs.production.min.js.map +1 -1
- package/dist/loader-react.esm.js +22 -5
- package/dist/loader-react.esm.js.map +1 -1
- package/dist/loader.d.ts +2 -1
- package/package.json +4 -4
|
@@ -1428,6 +1428,19 @@ var InternalPlasmicComponentLoader = /*#__PURE__*/function () {
|
|
|
1428
1428
|
}));
|
|
1429
1429
|
};
|
|
1430
1430
|
|
|
1431
|
+
_proto.registerContext = function registerContext(context, meta) {
|
|
1432
|
+
var _meta$importPath2;
|
|
1433
|
+
|
|
1434
|
+
this.substituteComponent(context, {
|
|
1435
|
+
name: meta.name,
|
|
1436
|
+
isCode: true
|
|
1437
|
+
}); // Import path is not used as we will use component substitution
|
|
1438
|
+
|
|
1439
|
+
host.registerContext(context, _extends({}, meta, {
|
|
1440
|
+
importPath: (_meta$importPath2 = meta.importPath) != null ? _meta$importPath2 : ''
|
|
1441
|
+
}));
|
|
1442
|
+
};
|
|
1443
|
+
|
|
1431
1444
|
_proto.registerPrefetchedBundle = function registerPrefetchedBundle(bundle) {
|
|
1432
1445
|
this.mergeBundle(bundle);
|
|
1433
1446
|
};
|
|
@@ -2267,18 +2280,22 @@ function processComponentProps(props) {
|
|
|
2267
2280
|
return props;
|
|
2268
2281
|
}
|
|
2269
2282
|
|
|
2270
|
-
var processValue = function processValue(value) {
|
|
2283
|
+
var processValue = function processValue(value, depth) {
|
|
2284
|
+
if (depth > 2) {
|
|
2285
|
+
return value;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2271
2288
|
if (React__default.isValidElement(value)) {
|
|
2272
2289
|
return processReactElement(value);
|
|
2273
2290
|
} else if (Array.isArray(value)) {
|
|
2274
2291
|
return value.map(function (v) {
|
|
2275
|
-
return processValue(v);
|
|
2292
|
+
return processValue(v, depth + 1);
|
|
2276
2293
|
});
|
|
2277
2294
|
} else if (isLiteralObject(value)) {
|
|
2278
2295
|
return Object.fromEntries(Object.entries(value).map(function (_ref) {
|
|
2279
2296
|
var k = _ref[0],
|
|
2280
2297
|
v = _ref[1];
|
|
2281
|
-
return [k, processValue(v)];
|
|
2298
|
+
return [k, processValue(v, depth + 1)];
|
|
2282
2299
|
}));
|
|
2283
2300
|
} else {
|
|
2284
2301
|
return value;
|
|
@@ -2288,7 +2305,7 @@ function processComponentProps(props) {
|
|
|
2288
2305
|
return Object.fromEntries(Object.entries(props).map(function (_ref2) {
|
|
2289
2306
|
var k = _ref2[0],
|
|
2290
2307
|
v = _ref2[1];
|
|
2291
|
-
return [k, processValue(v)];
|
|
2308
|
+
return [k, processValue(v, 1)];
|
|
2292
2309
|
}));
|
|
2293
2310
|
}
|
|
2294
2311
|
|