@micromag/screen-urbania-trivia 0.3.68 → 0.3.73
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/es/index.js +8 -16
- package/lib/index.js +8 -16
- package/package.json +12 -12
package/es/index.js
CHANGED
|
@@ -95,7 +95,8 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
|
|
|
95
95
|
|
|
96
96
|
var _useScreenSize = useScreenSize(),
|
|
97
97
|
width = _useScreenSize.width,
|
|
98
|
-
height = _useScreenSize.height
|
|
98
|
+
height = _useScreenSize.height,
|
|
99
|
+
resolution = _useScreenSize.resolution;
|
|
99
100
|
|
|
100
101
|
var _useScreenRenderConte = useScreenRenderContext(),
|
|
101
102
|
isView = _useScreenRenderConte.isView,
|
|
@@ -396,8 +397,9 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
|
|
|
396
397
|
height: videoHeight
|
|
397
398
|
}
|
|
398
399
|
},
|
|
399
|
-
width:
|
|
400
|
-
height:
|
|
400
|
+
width: Math.min(width, resizedVideoWidth),
|
|
401
|
+
height: resizedVideoHeight,
|
|
402
|
+
resolution: resolution
|
|
401
403
|
}) : /*#__PURE__*/React.createElement(Video, Object.assign({}, finalVideo, {
|
|
402
404
|
ref: apiRef,
|
|
403
405
|
width: resizedVideoWidth,
|
|
@@ -464,6 +466,7 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
|
|
|
464
466
|
className: classNames([styles.background, (_ref15 = {}, _defineProperty(_ref15, className, className !== null), _defineProperty(_ref15, styles.isCustomBackground, isCustomBackground), _defineProperty(_ref15, styles.isAnimated, !isStatic && !isPreview && isCustomBackground), _ref15)]),
|
|
465
467
|
width: width,
|
|
466
468
|
height: height,
|
|
469
|
+
resolution: resolution,
|
|
467
470
|
playing: backgroundPlaying,
|
|
468
471
|
shouldLoad: backgroundShouldLoad
|
|
469
472
|
}) : /*#__PURE__*/React.createElement(Background, {
|
|
@@ -471,6 +474,7 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
|
|
|
471
474
|
className: styles.background,
|
|
472
475
|
width: width,
|
|
473
476
|
height: height,
|
|
477
|
+
resolution: resolution,
|
|
474
478
|
styles: {
|
|
475
479
|
backgroundColor: 'red'
|
|
476
480
|
}
|
|
@@ -511,9 +515,6 @@ var definition = {
|
|
|
511
515
|
fields: [{
|
|
512
516
|
name: 'title',
|
|
513
517
|
type: 'heading-element',
|
|
514
|
-
theme: {
|
|
515
|
-
textStyle: 'heading1'
|
|
516
|
-
},
|
|
517
518
|
label: defineMessage({
|
|
518
519
|
id: "N25iDO",
|
|
519
520
|
defaultMessage: [{
|
|
@@ -558,16 +559,7 @@ var definition = {
|
|
|
558
559
|
"value": "Background"
|
|
559
560
|
}]
|
|
560
561
|
})
|
|
561
|
-
}
|
|
562
|
-
// name: 'callToAction',
|
|
563
|
-
// type: 'call-to-action',
|
|
564
|
-
// theme: {
|
|
565
|
-
// label: {
|
|
566
|
-
// textStyle: 'heading2',
|
|
567
|
-
// },
|
|
568
|
-
// },
|
|
569
|
-
// },
|
|
570
|
-
]
|
|
562
|
+
}]
|
|
571
563
|
};
|
|
572
564
|
|
|
573
565
|
export { UrbaniaTriviaScreen as UrbaniaTrivia, definition as default };
|
package/lib/index.js
CHANGED
|
@@ -117,7 +117,8 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
|
|
|
117
117
|
|
|
118
118
|
var _useScreenSize = contexts.useScreenSize(),
|
|
119
119
|
width = _useScreenSize.width,
|
|
120
|
-
height = _useScreenSize.height
|
|
120
|
+
height = _useScreenSize.height,
|
|
121
|
+
resolution = _useScreenSize.resolution;
|
|
121
122
|
|
|
122
123
|
var _useScreenRenderConte = contexts.useScreenRenderContext(),
|
|
123
124
|
isView = _useScreenRenderConte.isView,
|
|
@@ -418,8 +419,9 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
|
|
|
418
419
|
height: videoHeight
|
|
419
420
|
}
|
|
420
421
|
},
|
|
421
|
-
width:
|
|
422
|
-
height:
|
|
422
|
+
width: Math.min(width, resizedVideoWidth),
|
|
423
|
+
height: resizedVideoHeight,
|
|
424
|
+
resolution: resolution
|
|
423
425
|
}) : /*#__PURE__*/React__default["default"].createElement(Video__default["default"], Object.assign({}, finalVideo, {
|
|
424
426
|
ref: apiRef,
|
|
425
427
|
width: resizedVideoWidth,
|
|
@@ -486,6 +488,7 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
|
|
|
486
488
|
className: classNames__default["default"]([styles.background, (_ref15 = {}, _defineProperty__default["default"](_ref15, className, className !== null), _defineProperty__default["default"](_ref15, styles.isCustomBackground, isCustomBackground), _defineProperty__default["default"](_ref15, styles.isAnimated, !isStatic && !isPreview && isCustomBackground), _ref15)]),
|
|
487
489
|
width: width,
|
|
488
490
|
height: height,
|
|
491
|
+
resolution: resolution,
|
|
489
492
|
playing: backgroundPlaying,
|
|
490
493
|
shouldLoad: backgroundShouldLoad
|
|
491
494
|
}) : /*#__PURE__*/React__default["default"].createElement(Background__default["default"], {
|
|
@@ -493,6 +496,7 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
|
|
|
493
496
|
className: styles.background,
|
|
494
497
|
width: width,
|
|
495
498
|
height: height,
|
|
499
|
+
resolution: resolution,
|
|
496
500
|
styles: {
|
|
497
501
|
backgroundColor: 'red'
|
|
498
502
|
}
|
|
@@ -533,9 +537,6 @@ var definition = {
|
|
|
533
537
|
fields: [{
|
|
534
538
|
name: 'title',
|
|
535
539
|
type: 'heading-element',
|
|
536
|
-
theme: {
|
|
537
|
-
textStyle: 'heading1'
|
|
538
|
-
},
|
|
539
540
|
label: reactIntl.defineMessage({
|
|
540
541
|
id: "N25iDO",
|
|
541
542
|
defaultMessage: [{
|
|
@@ -580,16 +581,7 @@ var definition = {
|
|
|
580
581
|
"value": "Background"
|
|
581
582
|
}]
|
|
582
583
|
})
|
|
583
|
-
}
|
|
584
|
-
// name: 'callToAction',
|
|
585
|
-
// type: 'call-to-action',
|
|
586
|
-
// theme: {
|
|
587
|
-
// label: {
|
|
588
|
-
// textStyle: 'heading2',
|
|
589
|
-
// },
|
|
590
|
-
// },
|
|
591
|
-
// },
|
|
592
|
-
]
|
|
584
|
+
}]
|
|
593
585
|
};
|
|
594
586
|
|
|
595
587
|
exports.UrbaniaTrivia = UrbaniaTriviaScreen;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-urbania-trivia",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.73",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
52
|
"@folklore/size": "^0.1.20",
|
|
53
|
-
"@micromag/core": "^0.3.
|
|
54
|
-
"@micromag/element-background": "^0.3.
|
|
55
|
-
"@micromag/element-call-to-action": "^0.3.
|
|
56
|
-
"@micromag/element-closed-captions": "^0.3.
|
|
57
|
-
"@micromag/element-container": "^0.3.
|
|
58
|
-
"@micromag/element-heading": "^0.3.
|
|
59
|
-
"@micromag/element-image": "^0.3.
|
|
60
|
-
"@micromag/element-media-controls": "^0.3.
|
|
61
|
-
"@micromag/element-video": "^0.3.
|
|
62
|
-
"@micromag/transforms": "^0.3.
|
|
53
|
+
"@micromag/core": "^0.3.73",
|
|
54
|
+
"@micromag/element-background": "^0.3.73",
|
|
55
|
+
"@micromag/element-call-to-action": "^0.3.73",
|
|
56
|
+
"@micromag/element-closed-captions": "^0.3.73",
|
|
57
|
+
"@micromag/element-container": "^0.3.73",
|
|
58
|
+
"@micromag/element-heading": "^0.3.73",
|
|
59
|
+
"@micromag/element-image": "^0.3.73",
|
|
60
|
+
"@micromag/element-media-controls": "^0.3.73",
|
|
61
|
+
"@micromag/element-video": "^0.3.73",
|
|
62
|
+
"@micromag/transforms": "^0.3.73",
|
|
63
63
|
"classnames": "^2.2.6",
|
|
64
64
|
"lodash": "^4.17.21",
|
|
65
65
|
"prop-types": "^15.7.2",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"publishConfig": {
|
|
70
70
|
"access": "public"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "88ca59e9f89a4135924ffdca6a3e977047ac03e9"
|
|
73
73
|
}
|