@micromag/screen-quote 0.3.310 → 0.3.318

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.
@@ -1 +1 @@
1
- .micromag-screen-quote-container .micromag-screen-quote-background{position:absolute;top:0;left:0;width:100%;height:100%}.micromag-screen-quote-container{position:relative;width:100%;height:100%;overflow:hidden}.micromag-screen-quote-disabled.micromag-screen-quote-container{overflow:hidden;pointer-events:none}.micromag-screen-quote-hidden.micromag-screen-quote-container{display:none;visibility:hidden}.micromag-screen-quote-placeholder.micromag-screen-quote-container .micromag-screen-quote-content{position:relative;padding:6px}.micromag-screen-quote-container .micromag-screen-quote-emptyAuthor,.micromag-screen-quote-container .micromag-screen-quote-emptyQuote{margin:5px auto;border:2px dashed #343434;color:#343434}.micromag-screen-quote-container .micromag-screen-quote-background{z-index:0}.micromag-screen-quote-container .micromag-screen-quote-content{z-index:1}.micromag-screen-quote-container .micromag-screen-quote-emptyAuthor,.micromag-screen-quote-container .micromag-screen-quote-emptyQuote{width:100%;margin:10px auto}.micromag-screen-quote-container .micromag-screen-quote-emptyQuote{height:200px}.micromag-screen-quote-container .micromag-screen-quote-emptyAuthor{height:50px}.micromag-screen-quote-container .micromag-screen-quote-quote{font-size:2em}.micromag-screen-quote-container .micromag-screen-quote-quote.micromag-screen-quote-withMargin{margin-bottom:1em}.micromag-screen-quote-container.micromag-screen-quote-isPlaceholder .micromag-screen-quote-layout{padding:10px}
1
+ .micromag-screen-quote-container .micromag-screen-quote-background{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-quote-container{height:100%;overflow:hidden;position:relative;width:100%}.micromag-screen-quote-disabled.micromag-screen-quote-container{overflow:hidden;pointer-events:none}.micromag-screen-quote-hidden.micromag-screen-quote-container{display:none;visibility:hidden}.micromag-screen-quote-placeholder.micromag-screen-quote-container .micromag-screen-quote-content{padding:6px;position:relative}.micromag-screen-quote-container .micromag-screen-quote-emptyAuthor,.micromag-screen-quote-container .micromag-screen-quote-emptyQuote{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-quote-container .micromag-screen-quote-background{z-index:0}.micromag-screen-quote-container .micromag-screen-quote-content{z-index:1}.micromag-screen-quote-container .micromag-screen-quote-emptyAuthor,.micromag-screen-quote-container .micromag-screen-quote-emptyQuote{margin:10px auto;width:100%}.micromag-screen-quote-container .micromag-screen-quote-emptyQuote{height:200px}.micromag-screen-quote-container .micromag-screen-quote-emptyAuthor{height:50px}.micromag-screen-quote-container .micromag-screen-quote-quote{font-size:2em}.micromag-screen-quote-container .micromag-screen-quote-quote.micromag-screen-quote-withMargin{margin-bottom:1em}.micromag-screen-quote-container.micromag-screen-quote-isPlaceholder .micromag-screen-quote-layout{padding:10px}
package/es/index.js CHANGED
@@ -17,7 +17,7 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
17
17
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
18
18
  import { Quote as Quote$1, Author, Container as Container$1 } from '@micromag/transforms/apple-news';
19
19
 
20
- var styles = {"container":"micromag-screen-quote-container","background":"micromag-screen-quote-background","disabled":"micromag-screen-quote-disabled","hidden":"micromag-screen-quote-hidden","placeholder":"micromag-screen-quote-placeholder","content":"micromag-screen-quote-content","emptyAuthor":"micromag-screen-quote-emptyAuthor","emptyQuote":"micromag-screen-quote-emptyQuote","quote":"micromag-screen-quote-quote","withMargin":"micromag-screen-quote-withMargin","isPlaceholder":"micromag-screen-quote-isPlaceholder","layout":"micromag-screen-quote-layout"};
20
+ var styles = {"container":"micromag-screen-quote-container","background":"micromag-screen-quote-background","disabled":"micromag-screen-quote-disabled","hidden":"micromag-screen-quote-hidden","placeholder":"micromag-screen-quote-placeholder","content":"micromag-screen-quote-content","emptyQuote":"micromag-screen-quote-emptyQuote","emptyAuthor":"micromag-screen-quote-emptyAuthor","quote":"micromag-screen-quote-quote","withMargin":"micromag-screen-quote-withMargin","isPlaceholder":"micromag-screen-quote-isPlaceholder","layout":"micromag-screen-quote-layout"};
21
21
 
22
22
  var propTypes = {
23
23
  layout: PropTypes.oneOf(['top', 'middle', 'bottom', 'split']),
@@ -45,46 +45,38 @@ var defaultProps = {
45
45
  transitionStagger: 100,
46
46
  className: null
47
47
  };
48
-
49
48
  var QuoteScreen = function QuoteScreen(_ref) {
50
49
  var _ref4;
51
-
52
50
  var layout = _ref.layout,
53
- quote = _ref.quote,
54
- author = _ref.author,
55
- spacing = _ref.spacing,
56
- background = _ref.background,
57
- callToAction = _ref.callToAction,
58
- current = _ref.current,
59
- active = _ref.active,
60
- transitions = _ref.transitions,
61
- transitionStagger = _ref.transitionStagger,
62
- className = _ref.className;
63
-
51
+ quote = _ref.quote,
52
+ author = _ref.author,
53
+ spacing = _ref.spacing,
54
+ background = _ref.background,
55
+ callToAction = _ref.callToAction,
56
+ current = _ref.current,
57
+ active = _ref.active,
58
+ transitions = _ref.transitions,
59
+ transitionStagger = _ref.transitionStagger,
60
+ className = _ref.className;
64
61
  var _useScreenSize = useScreenSize(),
65
- width = _useScreenSize.width,
66
- height = _useScreenSize.height,
67
- resolution = _useScreenSize.resolution;
68
-
62
+ width = _useScreenSize.width,
63
+ height = _useScreenSize.height,
64
+ resolution = _useScreenSize.resolution;
69
65
  var _useScreenRenderConte = useScreenRenderContext(),
70
- isView = _useScreenRenderConte.isView,
71
- isPreview = _useScreenRenderConte.isPreview,
72
- isPlaceholder = _useScreenRenderConte.isPlaceholder,
73
- isEdit = _useScreenRenderConte.isEdit,
74
- isStatic = _useScreenRenderConte.isStatic,
75
- isCapture = _useScreenRenderConte.isCapture;
76
-
66
+ isView = _useScreenRenderConte.isView,
67
+ isPreview = _useScreenRenderConte.isPreview,
68
+ isPlaceholder = _useScreenRenderConte.isPlaceholder,
69
+ isEdit = _useScreenRenderConte.isEdit,
70
+ isStatic = _useScreenRenderConte.isStatic,
71
+ isCapture = _useScreenRenderConte.isCapture;
77
72
  var _useViewerContext = useViewerContext(),
78
- viewerTopHeight = _useViewerContext.topHeight,
79
- viewerBottomHeight = _useViewerContext.bottomHeight,
80
- viewerBottomSidesWidth = _useViewerContext.bottomSidesWidth;
81
-
73
+ viewerTopHeight = _useViewerContext.topHeight,
74
+ viewerBottomHeight = _useViewerContext.bottomHeight,
75
+ viewerBottomSidesWidth = _useViewerContext.bottomSidesWidth;
82
76
  var _useViewerWebView = useViewerWebView(),
83
- openWebView = _useViewerWebView.open;
84
-
77
+ openWebView = _useViewerWebView.open;
85
78
  var _usePlaybackContext = usePlaybackContext(),
86
- muted = _usePlaybackContext.muted;
87
-
79
+ muted = _usePlaybackContext.muted;
88
80
  var mediaRef = usePlaybackMediaRef(current);
89
81
  var hasQuote = isTextFilled(quote);
90
82
  var hasAuthor = isTextFilled(author);
@@ -97,11 +89,9 @@ var QuoteScreen = function QuoteScreen(_ref) {
97
89
  var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
98
90
  var backgroundPlaying = current && (isView || isEdit);
99
91
  var mediaShouldLoad = current || active;
100
-
101
92
  var _ref2 = callToAction || {},
102
- _ref2$active = _ref2.active,
103
- hasCallToAction = _ref2$active === void 0 ? false : _ref2$active;
104
-
93
+ _ref2$active = _ref2.active,
94
+ hasCallToAction = _ref2$active === void 0 ? false : _ref2$active;
105
95
  var items = [!isPlaceholder && hasCallToAction && isMiddleLayout ? /*#__PURE__*/React.createElement(Spacer, {
106
96
  key: "spacer-cta-top"
107
97
  }) : null, /*#__PURE__*/React.createElement(ScreenElement, {
@@ -184,27 +174,22 @@ var QuoteScreen = function QuoteScreen(_ref) {
184
174
  className: styles.background
185
175
  }) : null);
186
176
  };
187
-
188
177
  QuoteScreen.propTypes = propTypes;
189
178
  QuoteScreen.defaultProps = defaultProps;
190
179
  var QuoteScreen$1 = /*#__PURE__*/React.memo(QuoteScreen);
191
180
 
192
181
  var transform = function transform(newStory, _ref) {
193
182
  var quote = _ref.quote,
194
- author = _ref.author;
195
-
183
+ author = _ref.author;
196
184
  var _Quote = Quote$1(newStory, quote),
197
- quoteStory = _Quote.story,
198
- quoteComponent = _Quote.component;
199
-
185
+ quoteStory = _Quote.story,
186
+ quoteComponent = _Quote.component;
200
187
  var _Author = Author(quoteStory, author),
201
- authorStory = _Author.story,
202
- authorComponent = _Author.component;
203
-
188
+ authorStory = _Author.story,
189
+ authorComponent = _Author.component;
204
190
  var _Container = Container$1(authorStory, [].concat(_toConsumableArray(quoteComponent ? [quoteComponent] : []), _toConsumableArray(authorComponent ? [authorComponent] : []))),
205
- containerStory = _Container.story,
206
- containerComponent = _Container.component;
207
-
191
+ containerStory = _Container.story,
192
+ containerComponent = _Container.component;
208
193
  return _objectSpread(_objectSpread({}, containerStory), {}, {
209
194
  components: [].concat(_toConsumableArray(newStory.components || []), _toConsumableArray(containerComponent ? [containerComponent] : []))
210
195
  });
package/lib/index.js CHANGED
@@ -36,7 +36,7 @@ var Text__default = /*#__PURE__*/_interopDefaultLegacy(Text);
36
36
  var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
37
37
  var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
38
38
 
39
- var styles = {"container":"micromag-screen-quote-container","background":"micromag-screen-quote-background","disabled":"micromag-screen-quote-disabled","hidden":"micromag-screen-quote-hidden","placeholder":"micromag-screen-quote-placeholder","content":"micromag-screen-quote-content","emptyAuthor":"micromag-screen-quote-emptyAuthor","emptyQuote":"micromag-screen-quote-emptyQuote","quote":"micromag-screen-quote-quote","withMargin":"micromag-screen-quote-withMargin","isPlaceholder":"micromag-screen-quote-isPlaceholder","layout":"micromag-screen-quote-layout"};
39
+ var styles = {"container":"micromag-screen-quote-container","background":"micromag-screen-quote-background","disabled":"micromag-screen-quote-disabled","hidden":"micromag-screen-quote-hidden","placeholder":"micromag-screen-quote-placeholder","content":"micromag-screen-quote-content","emptyQuote":"micromag-screen-quote-emptyQuote","emptyAuthor":"micromag-screen-quote-emptyAuthor","quote":"micromag-screen-quote-quote","withMargin":"micromag-screen-quote-withMargin","isPlaceholder":"micromag-screen-quote-isPlaceholder","layout":"micromag-screen-quote-layout"};
40
40
 
41
41
  var propTypes = {
42
42
  layout: PropTypes__default["default"].oneOf(['top', 'middle', 'bottom', 'split']),
@@ -64,46 +64,38 @@ var defaultProps = {
64
64
  transitionStagger: 100,
65
65
  className: null
66
66
  };
67
-
68
67
  var QuoteScreen = function QuoteScreen(_ref) {
69
68
  var _ref4;
70
-
71
69
  var layout = _ref.layout,
72
- quote = _ref.quote,
73
- author = _ref.author,
74
- spacing = _ref.spacing,
75
- background = _ref.background,
76
- callToAction = _ref.callToAction,
77
- current = _ref.current,
78
- active = _ref.active,
79
- transitions = _ref.transitions,
80
- transitionStagger = _ref.transitionStagger,
81
- className = _ref.className;
82
-
70
+ quote = _ref.quote,
71
+ author = _ref.author,
72
+ spacing = _ref.spacing,
73
+ background = _ref.background,
74
+ callToAction = _ref.callToAction,
75
+ current = _ref.current,
76
+ active = _ref.active,
77
+ transitions = _ref.transitions,
78
+ transitionStagger = _ref.transitionStagger,
79
+ className = _ref.className;
83
80
  var _useScreenSize = contexts.useScreenSize(),
84
- width = _useScreenSize.width,
85
- height = _useScreenSize.height,
86
- resolution = _useScreenSize.resolution;
87
-
81
+ width = _useScreenSize.width,
82
+ height = _useScreenSize.height,
83
+ resolution = _useScreenSize.resolution;
88
84
  var _useScreenRenderConte = contexts.useScreenRenderContext(),
89
- isView = _useScreenRenderConte.isView,
90
- isPreview = _useScreenRenderConte.isPreview,
91
- isPlaceholder = _useScreenRenderConte.isPlaceholder,
92
- isEdit = _useScreenRenderConte.isEdit,
93
- isStatic = _useScreenRenderConte.isStatic,
94
- isCapture = _useScreenRenderConte.isCapture;
95
-
85
+ isView = _useScreenRenderConte.isView,
86
+ isPreview = _useScreenRenderConte.isPreview,
87
+ isPlaceholder = _useScreenRenderConte.isPlaceholder,
88
+ isEdit = _useScreenRenderConte.isEdit,
89
+ isStatic = _useScreenRenderConte.isStatic,
90
+ isCapture = _useScreenRenderConte.isCapture;
96
91
  var _useViewerContext = contexts.useViewerContext(),
97
- viewerTopHeight = _useViewerContext.topHeight,
98
- viewerBottomHeight = _useViewerContext.bottomHeight,
99
- viewerBottomSidesWidth = _useViewerContext.bottomSidesWidth;
100
-
92
+ viewerTopHeight = _useViewerContext.topHeight,
93
+ viewerBottomHeight = _useViewerContext.bottomHeight,
94
+ viewerBottomSidesWidth = _useViewerContext.bottomSidesWidth;
101
95
  var _useViewerWebView = contexts.useViewerWebView(),
102
- openWebView = _useViewerWebView.open;
103
-
96
+ openWebView = _useViewerWebView.open;
104
97
  var _usePlaybackContext = contexts.usePlaybackContext(),
105
- muted = _usePlaybackContext.muted;
106
-
98
+ muted = _usePlaybackContext.muted;
107
99
  var mediaRef = contexts.usePlaybackMediaRef(current);
108
100
  var hasQuote = utils.isTextFilled(quote);
109
101
  var hasAuthor = utils.isTextFilled(author);
@@ -116,11 +108,9 @@ var QuoteScreen = function QuoteScreen(_ref) {
116
108
  var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
117
109
  var backgroundPlaying = current && (isView || isEdit);
118
110
  var mediaShouldLoad = current || active;
119
-
120
111
  var _ref2 = callToAction || {},
121
- _ref2$active = _ref2.active,
122
- hasCallToAction = _ref2$active === void 0 ? false : _ref2$active;
123
-
112
+ _ref2$active = _ref2.active,
113
+ hasCallToAction = _ref2$active === void 0 ? false : _ref2$active;
124
114
  var items = [!isPlaceholder && hasCallToAction && isMiddleLayout ? /*#__PURE__*/React__default["default"].createElement(Layout.Spacer, {
125
115
  key: "spacer-cta-top"
126
116
  }) : null, /*#__PURE__*/React__default["default"].createElement(components.ScreenElement, {
@@ -203,27 +193,22 @@ var QuoteScreen = function QuoteScreen(_ref) {
203
193
  className: styles.background
204
194
  }) : null);
205
195
  };
206
-
207
196
  QuoteScreen.propTypes = propTypes;
208
197
  QuoteScreen.defaultProps = defaultProps;
209
198
  var QuoteScreen$1 = /*#__PURE__*/React__default["default"].memo(QuoteScreen);
210
199
 
211
200
  var transform = function transform(newStory, _ref) {
212
201
  var quote = _ref.quote,
213
- author = _ref.author;
214
-
202
+ author = _ref.author;
215
203
  var _Quote = appleNews.Quote(newStory, quote),
216
- quoteStory = _Quote.story,
217
- quoteComponent = _Quote.component;
218
-
204
+ quoteStory = _Quote.story,
205
+ quoteComponent = _Quote.component;
219
206
  var _Author = appleNews.Author(quoteStory, author),
220
- authorStory = _Author.story,
221
- authorComponent = _Author.component;
222
-
207
+ authorStory = _Author.story,
208
+ authorComponent = _Author.component;
223
209
  var _Container = appleNews.Container(authorStory, [].concat(_toConsumableArray__default["default"](quoteComponent ? [quoteComponent] : []), _toConsumableArray__default["default"](authorComponent ? [authorComponent] : []))),
224
- containerStory = _Container.story,
225
- containerComponent = _Container.component;
226
-
210
+ containerStory = _Container.story,
211
+ containerComponent = _Container.component;
227
212
  return _objectSpread__default["default"](_objectSpread__default["default"]({}, containerStory), {}, {
228
213
  components: [].concat(_toConsumableArray__default["default"](newStory.components || []), _toConsumableArray__default["default"](containerComponent ? [containerComponent] : []))
229
214
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-quote",
3
- "version": "0.3.310",
3
+ "version": "0.3.318",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -49,22 +49,22 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
- "@micromag/core": "^0.3.307",
53
- "@micromag/element-background": "^0.3.307",
54
- "@micromag/element-call-to-action": "^0.3.310",
55
- "@micromag/element-container": "^0.3.307",
56
- "@micromag/element-layout": "^0.3.307",
57
- "@micromag/element-quote": "^0.3.307",
58
- "@micromag/element-text": "^0.3.307",
59
- "@micromag/transforms": "^0.3.307",
52
+ "@micromag/core": "^0.3.318",
53
+ "@micromag/element-background": "^0.3.318",
54
+ "@micromag/element-call-to-action": "^0.3.318",
55
+ "@micromag/element-container": "^0.3.318",
56
+ "@micromag/element-layout": "^0.3.318",
57
+ "@micromag/element-quote": "^0.3.318",
58
+ "@micromag/element-text": "^0.3.318",
59
+ "@micromag/transforms": "^0.3.318",
60
60
  "classnames": "^2.2.6",
61
61
  "lodash": "^4.17.21",
62
62
  "prop-types": "^15.7.2",
63
63
  "react-intl": "^5.12.1",
64
- "uuid": "^8.3.2"
64
+ "uuid": "^9.0.0"
65
65
  },
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "c2f4fbfcf0f643737a77f99dccf4d353f7856c2c"
69
+ "gitHead": "7d1a296e0c0d410e1225279e1f19e3a7715bfa96"
70
70
  }