@micromag/screen-urbania-trivia 0.3.429 → 0.3.432

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.
Files changed (3) hide show
  1. package/es/index.js +4 -15
  2. package/lib/index.js +3 -14
  3. package/package.json +11 -11
package/es/index.js CHANGED
@@ -8,7 +8,7 @@ import isArray from 'lodash/isArray';
8
8
  import PropTypes from 'prop-types';
9
9
  import React, { useEffect, useState, useCallback, useMemo } from 'react';
10
10
  import { PropTypes as PropTypes$1 } from '@micromag/core';
11
- import { ScreenElement, PlaceholderTitle, Empty, PlaceholderVideo, Transitions } from '@micromag/core/components';
11
+ import { ScreenElement, PlaceholderTitle, Empty, PlaceholderVideo } from '@micromag/core/components';
12
12
  import { useScreenSize, useScreenRenderContext, useViewerContext, useViewerNavigation, usePlaybackContext, usePlaybackMediaRef, useViewerContainer } from '@micromag/core/contexts';
13
13
  import { useTrackScreenMedia, useActivityDetector, useDimensionObserver } from '@micromag/core/hooks';
14
14
  import { isTextFilled } from '@micromag/core/utils';
@@ -54,8 +54,6 @@ var propTypes = {
54
54
  spacing: PropTypes.number,
55
55
  padding: PropTypes.number,
56
56
  mediaRef: PropTypes.func,
57
- transitions: PropTypes.any,
58
- // eslint-disable-line react/forbid-prop-types
59
57
  className: PropTypes.string
60
58
  };
61
59
  var defaultProps = {
@@ -68,7 +66,6 @@ var defaultProps = {
68
66
  active: true,
69
67
  spacing: 20,
70
68
  padding: 20,
71
- transitions: null,
72
69
  mediaRef: null,
73
70
  className: null
74
71
  };
@@ -82,7 +79,6 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
82
79
  active = _ref.active,
83
80
  spacing = _ref.spacing,
84
81
  padding = _ref.padding,
85
- transitions = _ref.transitions,
86
82
  customMediaRef = _ref.mediaRef,
87
83
  className = _ref.className;
88
84
  var trackScreenMedia = useTrackScreenMedia('video');
@@ -229,8 +225,6 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
229
225
  _useState6 = _slicedToArray(_useState5, 2),
230
226
  ready = _useState6[0],
231
227
  setReady = _useState6[1];
232
- var transitionPlaying = current && ready;
233
- var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
234
228
  var finalVideo = useMemo(function () {
235
229
  return hasVideo ? _objectSpread(_objectSpread({}, video), {}, {
236
230
  autoPlay: !isPreview && !isStatic && !isCapture && autoPlay && current
@@ -382,15 +376,11 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
382
376
  style: {
383
377
  transform: "translate(0, -".concat(viewerBottomHeight, "px)")
384
378
  }
385
- }, /*#__PURE__*/React.createElement(Transitions, {
386
- playing: transitionPlaying,
387
- transitions: transitions,
388
- disabled: transitionDisabled
389
379
  }, closedCaptions !== null && !isPreview && !isCapture && !isStatic ? /*#__PURE__*/React.createElement(ClosedCaptions, {
390
380
  className: styles.closedCaptions,
391
381
  media: closedCaptions,
392
382
  currentTime: currentTime
393
- }) : null)) : null) : null))];
383
+ }) : null) : null) : null))];
394
384
  return /*#__PURE__*/React.createElement("div", {
395
385
  className: classNames([styles.container, _defineProperty(_defineProperty({}, className, className !== null), styles.fullscreen, fullscreen)]),
396
386
  "data-screen-ready": isStatic || isCapture || ready
@@ -424,7 +414,6 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
424
414
  };
425
415
  UrbaniaTrivia.propTypes = propTypes;
426
416
  UrbaniaTrivia.defaultProps = defaultProps;
427
- var UrbaniaTriviaScreen = /*#__PURE__*/React.memo(UrbaniaTrivia);
428
417
 
429
418
  var definition = {
430
419
  id: 'urbania-trivia',
@@ -447,7 +436,7 @@ var definition = {
447
436
  "value": "Urbania trivia"
448
437
  }]
449
438
  }),
450
- component: UrbaniaTriviaScreen,
439
+ component: UrbaniaTrivia,
451
440
  fields: [{
452
441
  name: 'title',
453
442
  type: 'heading-element',
@@ -495,4 +484,4 @@ var definition = {
495
484
  }]
496
485
  };
497
486
 
498
- export { UrbaniaTriviaScreen as UrbaniaTrivia, definition as default };
487
+ export { UrbaniaTrivia, definition as default };
package/lib/index.js CHANGED
@@ -58,8 +58,6 @@ var propTypes = {
58
58
  spacing: PropTypes.number,
59
59
  padding: PropTypes.number,
60
60
  mediaRef: PropTypes.func,
61
- transitions: PropTypes.any,
62
- // eslint-disable-line react/forbid-prop-types
63
61
  className: PropTypes.string
64
62
  };
65
63
  var defaultProps = {
@@ -72,7 +70,6 @@ var defaultProps = {
72
70
  active: true,
73
71
  spacing: 20,
74
72
  padding: 20,
75
- transitions: null,
76
73
  mediaRef: null,
77
74
  className: null
78
75
  };
@@ -86,7 +83,6 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
86
83
  active = _ref.active,
87
84
  spacing = _ref.spacing,
88
85
  padding = _ref.padding,
89
- transitions = _ref.transitions,
90
86
  customMediaRef = _ref.mediaRef,
91
87
  className = _ref.className;
92
88
  var trackScreenMedia = hooks.useTrackScreenMedia('video');
@@ -233,8 +229,6 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
233
229
  _useState6 = _slicedToArray(_useState5, 2),
234
230
  ready = _useState6[0],
235
231
  setReady = _useState6[1];
236
- var transitionPlaying = current && ready;
237
- var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
238
232
  var finalVideo = React.useMemo(function () {
239
233
  return hasVideo ? _objectSpread(_objectSpread({}, video), {}, {
240
234
  autoPlay: !isPreview && !isStatic && !isCapture && autoPlay && current
@@ -386,15 +380,11 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
386
380
  style: {
387
381
  transform: "translate(0, -".concat(viewerBottomHeight, "px)")
388
382
  }
389
- }, /*#__PURE__*/React.createElement(components.Transitions, {
390
- playing: transitionPlaying,
391
- transitions: transitions,
392
- disabled: transitionDisabled
393
383
  }, closedCaptions !== null && !isPreview && !isCapture && !isStatic ? /*#__PURE__*/React.createElement(ClosedCaptions, {
394
384
  className: styles.closedCaptions,
395
385
  media: closedCaptions,
396
386
  currentTime: currentTime
397
- }) : null)) : null) : null))];
387
+ }) : null) : null) : null))];
398
388
  return /*#__PURE__*/React.createElement("div", {
399
389
  className: classNames([styles.container, _defineProperty(_defineProperty({}, className, className !== null), styles.fullscreen, fullscreen)]),
400
390
  "data-screen-ready": isStatic || isCapture || ready
@@ -428,7 +418,6 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
428
418
  };
429
419
  UrbaniaTrivia.propTypes = propTypes;
430
420
  UrbaniaTrivia.defaultProps = defaultProps;
431
- var UrbaniaTriviaScreen = /*#__PURE__*/React.memo(UrbaniaTrivia);
432
421
 
433
422
  var definition = {
434
423
  id: 'urbania-trivia',
@@ -451,7 +440,7 @@ var definition = {
451
440
  "value": "Urbania trivia"
452
441
  }]
453
442
  }),
454
- component: UrbaniaTriviaScreen,
443
+ component: UrbaniaTrivia,
455
444
  fields: [{
456
445
  name: 'title',
457
446
  type: 'heading-element',
@@ -499,5 +488,5 @@ var definition = {
499
488
  }]
500
489
  };
501
490
 
502
- exports.UrbaniaTrivia = UrbaniaTriviaScreen;
491
+ exports.UrbaniaTrivia = UrbaniaTrivia;
503
492
  exports.default = definition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-urbania-trivia",
3
- "version": "0.3.429",
3
+ "version": "0.3.432",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -60,15 +60,15 @@
60
60
  "dependencies": {
61
61
  "@babel/runtime": "^7.13.10",
62
62
  "@folklore/size": "^0.1.20",
63
- "@micromag/core": "^0.3.429",
64
- "@micromag/element-background": "^0.3.429",
65
- "@micromag/element-call-to-action": "^0.3.429",
66
- "@micromag/element-closed-captions": "^0.3.429",
67
- "@micromag/element-container": "^0.3.429",
68
- "@micromag/element-heading": "^0.3.429",
69
- "@micromag/element-image": "^0.3.429",
70
- "@micromag/element-video": "^0.3.429",
71
- "@micromag/transforms": "^0.3.429",
63
+ "@micromag/core": "^0.3.432",
64
+ "@micromag/element-background": "^0.3.432",
65
+ "@micromag/element-call-to-action": "^0.3.432",
66
+ "@micromag/element-closed-captions": "^0.3.432",
67
+ "@micromag/element-container": "^0.3.432",
68
+ "@micromag/element-heading": "^0.3.432",
69
+ "@micromag/element-image": "^0.3.432",
70
+ "@micromag/element-video": "^0.3.432",
71
+ "@micromag/transforms": "^0.3.432",
72
72
  "classnames": "^2.2.6",
73
73
  "lodash": "^4.17.21",
74
74
  "prop-types": "^15.7.2",
@@ -79,5 +79,5 @@
79
79
  "access": "public",
80
80
  "registry": "https://registry.npmjs.org/"
81
81
  },
82
- "gitHead": "f15e72b88ecfda4c54b87626513149b58572c52b"
82
+ "gitHead": "01df977a7eb5166425c0078c2369ea240549f386"
83
83
  }