@meduza/ui-kit-2 0.1.6 → 0.1.7

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.
@@ -301,6 +301,20 @@ var viewportSize = (function () {
301
301
  };
302
302
  });
303
303
 
304
+ var POST_MESSAGE_PREFIX = 'mdzKitMsg';
305
+
306
+ var postMessage = function postMessage(element, action) {
307
+ var target = window.top;
308
+ var msg = POST_MESSAGE_PREFIX + "=" + JSON.stringify({
309
+ element: element,
310
+ action: action
311
+ });
312
+
313
+ if (typeof target !== 'undefined') {
314
+ target.postMessage(msg, '*');
315
+ }
316
+ };
317
+
304
318
  var MediaQuerySizes = {
305
319
  MOBILE: 512,
306
320
  PORTRAIT_TABLET: 768,
@@ -425,6 +439,8 @@ var Image = function Image(_ref) {
425
439
  var _useContext = React.useContext(BlockContext),
426
440
  lightBox = _useContext.lightBox;
427
441
 
442
+ console.log(React.useContext(BlockContext));
443
+
428
444
  var handleClick = function handleClick() {
429
445
  var _viewportSize = viewportSize(),
430
446
  viewportWidth = _viewportSize.width;
@@ -2067,20 +2083,6 @@ var ImportantLead = function ImportantLead(_ref) {
2067
2083
  }));
2068
2084
  };
2069
2085
 
2070
- var POST_MESSAGE_PREFIX = 'mdzKitMsg';
2071
-
2072
- var postMessage$1 = function postMessage(element, action) {
2073
- var target = window.top;
2074
- var msg = POST_MESSAGE_PREFIX + "=" + JSON.stringify({
2075
- element: element,
2076
- action: action
2077
- });
2078
-
2079
- if (typeof target !== 'undefined') {
2080
- target.postMessage(msg, '*');
2081
- }
2082
- };
2083
-
2084
2086
  var styles$y = {"root":"Spoiler-module_root__1OfSR","header":"Spoiler-module_header__1rZUs","body":"Spoiler-module_body__Q1e_c","spoiled":"Spoiler-module_spoiled__1A5r4","footer":"Spoiler-module_footer__23mh7","spoilerSticky":"Spoiler-module_spoilerSticky__3Kd30","center":"Spoiler-module_center__tq1m0","full":"Spoiler-module_full__1QFqR","default":"Spoiler-module_default__2Kjx8","mobile":"Spoiler-module_mobile__2BPt8","desktop":"Spoiler-module_desktop__1BIFJ"};
2085
2087
 
2086
2088
  var Spoiler = function Spoiler(_ref) {
@@ -2103,7 +2105,7 @@ var Spoiler = function Spoiler(_ref) {
2103
2105
  setSpoiled(!spoiled);
2104
2106
 
2105
2107
  if (spoiled) {
2106
- postMessage$1('closeSpoiler', 'click');
2108
+ postMessage('closeSpoiler', 'click');
2107
2109
  var rect = ref.current.getBoundingClientRect();
2108
2110
 
2109
2111
  if (rect.top < 0) {
@@ -2112,7 +2114,7 @@ var Spoiler = function Spoiler(_ref) {
2112
2114
  });
2113
2115
  }
2114
2116
  } else {
2115
- postMessage$1('openSpoiler', 'click');
2117
+ postMessage('openSpoiler', 'click');
2116
2118
  }
2117
2119
  };
2118
2120