@builder.io/sdk 6.0.8 → 6.1.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.
package/dist/index.esm.js CHANGED
@@ -950,7 +950,7 @@ function toError(err) {
950
950
 
951
951
  var DEFAULT_API_VERSION = 'v3';
952
952
 
953
- var SDK_VERSION = '6.0.8';
953
+ var SDK_VERSION = '6.1.0';
954
954
 
955
955
  function datePlusMinutes(minutes) {
956
956
  if (minutes === void 0) { minutes = 30; }
@@ -1266,7 +1266,18 @@ var Builder = /** @class */ (function () {
1266
1266
  this.plugins.push(info);
1267
1267
  };
1268
1268
  Builder.registerAction = function (action) {
1269
+ var _a;
1269
1270
  this.actions.push(action);
1271
+ if (Builder.isBrowser) {
1272
+ var actionClone = JSON.parse(JSON.stringify(action));
1273
+ if (action.action) {
1274
+ actionClone.action = action.action.toString();
1275
+ }
1276
+ (_a = window.parent) === null || _a === void 0 ? void 0 : _a.postMessage({
1277
+ type: 'builder.registerAction',
1278
+ data: actionClone,
1279
+ }, '*');
1280
+ }
1270
1281
  };
1271
1282
  Builder.registerTrustedHost = function (host) {
1272
1283
  this.trustedHosts.push(host);