@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.cjs.js CHANGED
@@ -958,7 +958,7 @@ function toError(err) {
958
958
 
959
959
  var DEFAULT_API_VERSION = 'v3';
960
960
 
961
- var SDK_VERSION = '6.0.8';
961
+ var SDK_VERSION = '6.1.0';
962
962
 
963
963
  function datePlusMinutes(minutes) {
964
964
  if (minutes === void 0) { minutes = 30; }
@@ -1274,7 +1274,18 @@ var Builder = /** @class */ (function () {
1274
1274
  this.plugins.push(info);
1275
1275
  };
1276
1276
  Builder.registerAction = function (action) {
1277
+ var _a;
1277
1278
  this.actions.push(action);
1279
+ if (Builder.isBrowser) {
1280
+ var actionClone = JSON.parse(JSON.stringify(action));
1281
+ if (action.action) {
1282
+ actionClone.action = action.action.toString();
1283
+ }
1284
+ (_a = window.parent) === null || _a === void 0 ? void 0 : _a.postMessage({
1285
+ type: 'builder.registerAction',
1286
+ data: actionClone,
1287
+ }, '*');
1288
+ }
1278
1289
  };
1279
1290
  Builder.registerTrustedHost = function (host) {
1280
1291
  this.trustedHosts.push(host);