@micromag/screen-urbania-trivia 0.3.71 → 0.3.76

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 +24 -26
  2. package/lib/index.js +24 -26
  3. package/package.json +12 -12
package/es/index.js CHANGED
@@ -20,16 +20,16 @@ import Image from '@micromag/element-image';
20
20
  import MediaControls from '@micromag/element-media-controls';
21
21
  import Video from '@micromag/element-video';
22
22
 
23
- var img$1 = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='UTF-8'%3f%3e%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1083.95 1920'%3e %3cg id='a'/%3e %3cg id='b'%3e %3cg id='c'%3e %3cpath d='M1083.95%2c0h-103.4l-438.55%2c959.95L1083.95%2c109.31V0Zm0%2c295L542.02%2c959.96l541.93-498.87v-166.08Zm0%2c274.99l-541.92%2c389.98%2c541.92-279.64v-110.34Zm0%2c190.53l-541.92%2c199.46%2c541.92-110.89v-88.57Zm0%2c158.17l-541.92%2c41.31%2c541.92%2c41.31v-82.61Zm0%2c152.21l-541.92-110.89%2c541.92%2c199.46v-88.58Zm0%2c168.77l-541.92-279.64%2c541.92%2c389.98v-110.34Zm0%2c219.25l-541.93-498.87%2c541.93%2c664.95v-166.08Zm0%2c351.77L542%2c960.05l438.55%2c959.95h103.4v-109.31ZM854.8%2c0h-138.91l-173.9%2c959.94L854.8%2c0Zm0%2c1920l-312.81-959.94%2c173.9%2c959.94h138.91ZM606.75%2c0h-129.56l64.78%2c959.94L606.75%2c0Zm0%2c1920l-64.78-959.94-64.78%2c959.94h129.56Zm-64.79-960.06L368.06%2c0H229.15l312.81%2c959.94Zm0%2c.12L229.15%2c1920h138.91l173.9-959.94Zm-.01-.11L103.4%2c0H0V109.31L541.94%2c959.95Zm0%2c.11L0%2c1810.69v109.31H103.4l438.55-959.95Zm-.01-.1L0%2c295.01v166.08l541.93%2c498.87Zm0%2c.09L0%2c1458.91v166.08L541.93%2c960.04Zm-.01-.07L0%2c570v110.34l541.92%2c279.63Zm0%2c.02L0%2c760.52v88.57l541.92%2c110.89Zm0%2c.02L0%2c918.69v82.61l541.92-41.31Zm0%2c.02L0%2c1070.9v88.57l541.92-199.46Zm0%2c.02L0%2c1239.66v110.34l541.92-389.97Z' fill='hsla(0%2c0%25%2c100%25%2c.6)'/%3e %3c/g%3e %3c/g%3e%3c/svg%3e";
23
+ var AnimeLinesGrey = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201083.95%201920%22%3E%20%20%20%20%3Cg%20id%3D%22a%22%2F%3E%20%20%20%20%3Cg%20id%3D%22b%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22c%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1083.95%2C0h-103.4l-438.55%2C959.95L1083.95%2C109.31V0Zm0%2C295L542.02%2C959.96l541.93-498.87v-166.08Zm0%2C274.99l-541.92%2C389.98%2C541.92-279.64v-110.34Zm0%2C190.53l-541.92%2C199.46%2C541.92-110.89v-88.57Zm0%2C158.17l-541.92%2C41.31%2C541.92%2C41.31v-82.61Zm0%2C152.21l-541.92-110.89%2C541.92%2C199.46v-88.58Zm0%2C168.77l-541.92-279.64%2C541.92%2C389.98v-110.34Zm0%2C219.25l-541.93-498.87%2C541.93%2C664.95v-166.08Zm0%2C351.77L542%2C960.05l438.55%2C959.95h103.4v-109.31ZM854.8%2C0h-138.91l-173.9%2C959.94L854.8%2C0Zm0%2C1920l-312.81-959.94%2C173.9%2C959.94h138.91ZM606.75%2C0h-129.56l64.78%2C959.94L606.75%2C0Zm0%2C1920l-64.78-959.94-64.78%2C959.94h129.56Zm-64.79-960.06L368.06%2C0H229.15l312.81%2C959.94Zm0%2C.12L229.15%2C1920h138.91l173.9-959.94Zm-.01-.11L103.4%2C0H0V109.31L541.94%2C959.95Zm0%2C.11L0%2C1810.69v109.31H103.4l438.55-959.95Zm-.01-.1L0%2C295.01v166.08l541.93%2C498.87Zm0%2C.09L0%2C1458.91v166.08L541.93%2C960.04Zm-.01-.07L0%2C570v110.34l541.92%2C279.63Zm0%2C.02L0%2C760.52v88.57l541.92%2C110.89Zm0%2C.02L0%2C918.69v82.61l541.92-41.31Zm0%2C.02L0%2C1070.9v88.57l541.92-199.46Zm0%2C.02L0%2C1239.66v110.34l541.92-389.97Z%22%20fill%3D%22hsla%280%2C0%25%2C100%25%2C.6%29%22%2F%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
24
24
 
25
- var img = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='UTF-8'%3f%3e%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1083.95 1920'%3e %3cg id='a'/%3e %3cg id='b'%3e %3cg id='c'%3e %3cpath d='M1083.95%2c0h-103.4l-438.55%2c959.95L1083.95%2c109.31V0Zm0%2c295L542.02%2c959.96l541.93-498.87v-166.08Zm0%2c274.99l-541.92%2c389.98%2c541.92-279.64v-110.34Zm0%2c190.53l-541.92%2c199.46%2c541.92-110.89v-88.57Zm0%2c158.17l-541.92%2c41.31%2c541.92%2c41.31v-82.61Zm0%2c152.21l-541.92-110.89%2c541.92%2c199.46v-88.58Zm0%2c168.77l-541.92-279.64%2c541.92%2c389.98v-110.34Zm0%2c219.25l-541.93-498.87%2c541.93%2c664.95v-166.08Zm0%2c351.77L542%2c960.05l438.55%2c959.95h103.4v-109.31ZM854.8%2c0h-138.91l-173.9%2c959.94L854.8%2c0Zm0%2c1920l-312.81-959.94%2c173.9%2c959.94h138.91ZM606.75%2c0h-129.56l64.78%2c959.94L606.75%2c0Zm0%2c1920l-64.78-959.94-64.78%2c959.94h129.56Zm-64.79-960.06L368.06%2c0H229.15l312.81%2c959.94Zm0%2c.12L229.15%2c1920h138.91l173.9-959.94Zm-.01-.11L103.4%2c0H0V109.31L541.94%2c959.95Zm0%2c.11L0%2c1810.69v109.31H103.4l438.55-959.95Zm-.01-.1L0%2c295.01v166.08l541.93%2c498.87Zm0%2c.09L0%2c1458.91v166.08L541.93%2c960.04Zm-.01-.07L0%2c570v110.34l541.92%2c279.63Zm0%2c.02L0%2c760.52v88.57l541.92%2c110.89Zm0%2c.02L0%2c918.69v82.61l541.92-41.31Zm0%2c.02L0%2c1070.9v88.57l541.92-199.46Zm0%2c.02L0%2c1239.66v110.34l541.92-389.97Z' fill='%2312bbd7'/%3e %3c/g%3e %3c/g%3e%3c/svg%3e";
25
+ var AnimeLines = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201083.95%201920%22%3E%20%20%20%20%3Cg%20id%3D%22a%22%2F%3E%20%20%20%20%3Cg%20id%3D%22b%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22c%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1083.95%2C0h-103.4l-438.55%2C959.95L1083.95%2C109.31V0Zm0%2C295L542.02%2C959.96l541.93-498.87v-166.08Zm0%2C274.99l-541.92%2C389.98%2C541.92-279.64v-110.34Zm0%2C190.53l-541.92%2C199.46%2C541.92-110.89v-88.57Zm0%2C158.17l-541.92%2C41.31%2C541.92%2C41.31v-82.61Zm0%2C152.21l-541.92-110.89%2C541.92%2C199.46v-88.58Zm0%2C168.77l-541.92-279.64%2C541.92%2C389.98v-110.34Zm0%2C219.25l-541.93-498.87%2C541.93%2C664.95v-166.08Zm0%2C351.77L542%2C960.05l438.55%2C959.95h103.4v-109.31ZM854.8%2C0h-138.91l-173.9%2C959.94L854.8%2C0Zm0%2C1920l-312.81-959.94%2C173.9%2C959.94h138.91ZM606.75%2C0h-129.56l64.78%2C959.94L606.75%2C0Zm0%2C1920l-64.78-959.94-64.78%2C959.94h129.56Zm-64.79-960.06L368.06%2C0H229.15l312.81%2C959.94Zm0%2C.12L229.15%2C1920h138.91l173.9-959.94Zm-.01-.11L103.4%2C0H0V109.31L541.94%2C959.95Zm0%2C.11L0%2C1810.69v109.31H103.4l438.55-959.95Zm-.01-.1L0%2C295.01v166.08l541.93%2C498.87Zm0%2C.09L0%2C1458.91v166.08L541.93%2C960.04Zm-.01-.07L0%2C570v110.34l541.92%2C279.63Zm0%2C.02L0%2C760.52v88.57l541.92%2C110.89Zm0%2C.02L0%2C918.69v82.61l541.92-41.31Zm0%2C.02L0%2C1070.9v88.57l541.92-199.46Zm0%2C.02L0%2C1239.66v110.34l541.92-389.97Z%22%20fill%3D%22%2312bbd7%22%2F%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
26
26
 
27
27
  var styles = {"container":"micromag-screen-urbania-trivia-container","content":"micromag-screen-urbania-trivia-content","empty":"micromag-screen-urbania-trivia-empty","emptyContainer":"micromag-screen-urbania-trivia-emptyContainer","fullscreen":"micromag-screen-urbania-trivia-fullscreen","image":"micromag-screen-urbania-trivia-image","placeholder":"micromag-screen-urbania-trivia-placeholder","disabled":"micromag-screen-urbania-trivia-disabled","hidden":"micromag-screen-urbania-trivia-hidden","itemsContainer":"micromag-screen-urbania-trivia-itemsContainer","videoContainer":"micromag-screen-urbania-trivia-videoContainer","video":"micromag-screen-urbania-trivia-video","isCustomBackground":"micromag-screen-urbania-trivia-isCustomBackground","isAnimated":"micromag-screen-urbania-trivia-isAnimated","spin":"micromag-screen-urbania-trivia-spin","heading":"micromag-screen-urbania-trivia-heading","hideHeading":"micromag-screen-urbania-trivia-hideHeading","callToAction":"micromag-screen-urbania-trivia-callToAction","bottom":"micromag-screen-urbania-trivia-bottom","visible":"micromag-screen-urbania-trivia-visible","withGradient":"micromag-screen-urbania-trivia-withGradient","mediaControls":"micromag-screen-urbania-trivia-mediaControls","videoPlaceholder":"micromag-screen-urbania-trivia-videoPlaceholder","bottomContent":"micromag-screen-urbania-trivia-bottomContent"};
28
28
 
29
29
  var defaultBackground = {
30
30
  image: {
31
31
  type: 'image',
32
- url: img,
32
+ url: AnimeLines,
33
33
  width: 1083,
34
34
  height: 1919
35
35
  },
@@ -38,7 +38,7 @@ var defaultBackground = {
38
38
  var placeholderBackground = {
39
39
  image: {
40
40
  type: 'image',
41
- url: img$1,
41
+ url: AnimeLinesGrey,
42
42
  width: 1083,
43
43
  height: 1919
44
44
  },
@@ -76,7 +76,7 @@ var defaultProps = {
76
76
  };
77
77
 
78
78
  var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
79
- var _ref11, _ref12, _ref14, _ref15;
79
+ var _ref12, _ref13, _ref15, _ref16;
80
80
 
81
81
  var layout = _ref.layout,
82
82
  title = _ref.title,
@@ -317,11 +317,21 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
317
317
  return background;
318
318
  }
319
319
 
320
- if (background !== null) {
320
+ var _ref11 = background || {},
321
+ _ref11$image = _ref11.image,
322
+ bgImage = _ref11$image === void 0 ? null : _ref11$image,
323
+ _ref11$video = _ref11.video,
324
+ bgVideo = _ref11$video === void 0 ? null : _ref11$video,
325
+ _ref11$color = _ref11.color,
326
+ bgColor = _ref11$color === void 0 ? null : _ref11$color;
327
+
328
+ if (bgImage !== null || bgVideo !== null) {
321
329
  return _objectSpread(_objectSpread({}, defaultBackground), background);
322
330
  }
323
331
 
324
- return defaultBackground;
332
+ return _objectSpread(_objectSpread({}, defaultBackground), bgColor !== null ? {
333
+ color: bgColor
334
+ } : null);
325
335
  }, [background]);
326
336
  var placeholderProps = fullscreen ? {
327
337
  width: '100%',
@@ -359,7 +369,7 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
359
369
  }, /*#__PURE__*/React.createElement("div", {
360
370
  ref: titleRef
361
371
  }, /*#__PURE__*/React.createElement(Heading, Object.assign({
362
- className: classNames([styles.heading, (_ref11 = {}, _defineProperty(_ref11, className, className !== null), _defineProperty(_ref11, styles.hideHeading, body.length === 0), _ref11)]),
372
+ className: classNames([styles.heading, (_ref12 = {}, _defineProperty(_ref12, className, className !== null), _defineProperty(_ref12, styles.hideHeading, body.length === 0), _ref12)]),
363
373
  body: body
364
374
  }, title)))), /*#__PURE__*/React.createElement(ScreenElement, {
365
375
  key: "video",
@@ -428,7 +438,7 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
428
438
  media: closedCaptions,
429
439
  currentTime: currentTime
430
440
  }) : null, /*#__PURE__*/React.createElement("div", {
431
- className: classNames([styles.bottom, (_ref12 = {}, _defineProperty(_ref12, styles.visible, visibleControls), _defineProperty(_ref12, styles.withGradient, withSeekBar || withPlayPause || muted), _ref12)])
441
+ className: classNames([styles.bottom, (_ref13 = {}, _defineProperty(_ref13, styles.visible, visibleControls), _defineProperty(_ref13, styles.withGradient, withSeekBar || withPlayPause || muted), _ref13)])
432
442
  }, hasVideoUrl ? /*#__PURE__*/React.createElement(MediaControls, {
433
443
  className: classNames([styles.mediaControls, _defineProperty({}, styles.visible, visibleControls)]),
434
444
  withSeekBar: withSeekBar,
@@ -457,13 +467,13 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
457
467
  }
458
468
  })) : null))) : null) : null))];
459
469
  return /*#__PURE__*/React.createElement("div", Object.assign({
460
- className: classNames([styles.container, (_ref14 = {}, _defineProperty(_ref14, className, className !== null), _defineProperty(_ref14, styles.fullscreen, fullscreen), _ref14)]),
470
+ className: classNames([styles.container, (_ref15 = {}, _defineProperty(_ref15, className, className !== null), _defineProperty(_ref15, styles.fullscreen, fullscreen), _ref15)]),
461
471
  "data-screen-ready": isStatic || isCapture || ready
462
472
  }, longPressBind, {
463
473
  onMouseMove: onMouseMove
464
474
  }), !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
465
475
  background: finalBackground,
466
- className: classNames([styles.background, (_ref15 = {}, _defineProperty(_ref15, className, className !== null), _defineProperty(_ref15, styles.isCustomBackground, isCustomBackground), _defineProperty(_ref15, styles.isAnimated, !isStatic && !isPreview && isCustomBackground), _ref15)]),
476
+ className: classNames([styles.background, (_ref16 = {}, _defineProperty(_ref16, className, className !== null), _defineProperty(_ref16, styles.isCustomBackground, isCustomBackground), _defineProperty(_ref16, styles.isAnimated, !isStatic && !isPreview && isCustomBackground), _ref16)]),
467
477
  width: width,
468
478
  height: height,
469
479
  resolution: resolution,
@@ -505,19 +515,16 @@ var definition = {
505
515
  order: 10
506
516
  },
507
517
  title: defineMessage({
508
- id: "eA6lME",
518
+ id: "zDdDqI",
509
519
  defaultMessage: [{
510
520
  "type": 0,
511
- "value": "Urbania trivia screen"
521
+ "value": "Urbania trivia"
512
522
  }]
513
523
  }),
514
524
  component: UrbaniaTriviaScreen,
515
525
  fields: [{
516
526
  name: 'title',
517
527
  type: 'heading-element',
518
- theme: {
519
- textStyle: 'heading1'
520
- },
521
528
  label: defineMessage({
522
529
  id: "N25iDO",
523
530
  defaultMessage: [{
@@ -562,16 +569,7 @@ var definition = {
562
569
  "value": "Background"
563
570
  }]
564
571
  })
565
- } // {
566
- // name: 'callToAction',
567
- // type: 'call-to-action',
568
- // theme: {
569
- // label: {
570
- // textStyle: 'heading2',
571
- // },
572
- // },
573
- // },
574
- ]
572
+ }]
575
573
  };
576
574
 
577
575
  export { UrbaniaTriviaScreen as UrbaniaTrivia, definition as default };
package/lib/index.js CHANGED
@@ -42,16 +42,16 @@ var Image__default = /*#__PURE__*/_interopDefaultLegacy(Image);
42
42
  var MediaControls__default = /*#__PURE__*/_interopDefaultLegacy(MediaControls);
43
43
  var Video__default = /*#__PURE__*/_interopDefaultLegacy(Video);
44
44
 
45
- var img$1 = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='UTF-8'%3f%3e%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1083.95 1920'%3e %3cg id='a'/%3e %3cg id='b'%3e %3cg id='c'%3e %3cpath d='M1083.95%2c0h-103.4l-438.55%2c959.95L1083.95%2c109.31V0Zm0%2c295L542.02%2c959.96l541.93-498.87v-166.08Zm0%2c274.99l-541.92%2c389.98%2c541.92-279.64v-110.34Zm0%2c190.53l-541.92%2c199.46%2c541.92-110.89v-88.57Zm0%2c158.17l-541.92%2c41.31%2c541.92%2c41.31v-82.61Zm0%2c152.21l-541.92-110.89%2c541.92%2c199.46v-88.58Zm0%2c168.77l-541.92-279.64%2c541.92%2c389.98v-110.34Zm0%2c219.25l-541.93-498.87%2c541.93%2c664.95v-166.08Zm0%2c351.77L542%2c960.05l438.55%2c959.95h103.4v-109.31ZM854.8%2c0h-138.91l-173.9%2c959.94L854.8%2c0Zm0%2c1920l-312.81-959.94%2c173.9%2c959.94h138.91ZM606.75%2c0h-129.56l64.78%2c959.94L606.75%2c0Zm0%2c1920l-64.78-959.94-64.78%2c959.94h129.56Zm-64.79-960.06L368.06%2c0H229.15l312.81%2c959.94Zm0%2c.12L229.15%2c1920h138.91l173.9-959.94Zm-.01-.11L103.4%2c0H0V109.31L541.94%2c959.95Zm0%2c.11L0%2c1810.69v109.31H103.4l438.55-959.95Zm-.01-.1L0%2c295.01v166.08l541.93%2c498.87Zm0%2c.09L0%2c1458.91v166.08L541.93%2c960.04Zm-.01-.07L0%2c570v110.34l541.92%2c279.63Zm0%2c.02L0%2c760.52v88.57l541.92%2c110.89Zm0%2c.02L0%2c918.69v82.61l541.92-41.31Zm0%2c.02L0%2c1070.9v88.57l541.92-199.46Zm0%2c.02L0%2c1239.66v110.34l541.92-389.97Z' fill='hsla(0%2c0%25%2c100%25%2c.6)'/%3e %3c/g%3e %3c/g%3e%3c/svg%3e";
45
+ var AnimeLinesGrey = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201083.95%201920%22%3E%20%20%20%20%3Cg%20id%3D%22a%22%2F%3E%20%20%20%20%3Cg%20id%3D%22b%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22c%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1083.95%2C0h-103.4l-438.55%2C959.95L1083.95%2C109.31V0Zm0%2C295L542.02%2C959.96l541.93-498.87v-166.08Zm0%2C274.99l-541.92%2C389.98%2C541.92-279.64v-110.34Zm0%2C190.53l-541.92%2C199.46%2C541.92-110.89v-88.57Zm0%2C158.17l-541.92%2C41.31%2C541.92%2C41.31v-82.61Zm0%2C152.21l-541.92-110.89%2C541.92%2C199.46v-88.58Zm0%2C168.77l-541.92-279.64%2C541.92%2C389.98v-110.34Zm0%2C219.25l-541.93-498.87%2C541.93%2C664.95v-166.08Zm0%2C351.77L542%2C960.05l438.55%2C959.95h103.4v-109.31ZM854.8%2C0h-138.91l-173.9%2C959.94L854.8%2C0Zm0%2C1920l-312.81-959.94%2C173.9%2C959.94h138.91ZM606.75%2C0h-129.56l64.78%2C959.94L606.75%2C0Zm0%2C1920l-64.78-959.94-64.78%2C959.94h129.56Zm-64.79-960.06L368.06%2C0H229.15l312.81%2C959.94Zm0%2C.12L229.15%2C1920h138.91l173.9-959.94Zm-.01-.11L103.4%2C0H0V109.31L541.94%2C959.95Zm0%2C.11L0%2C1810.69v109.31H103.4l438.55-959.95Zm-.01-.1L0%2C295.01v166.08l541.93%2C498.87Zm0%2C.09L0%2C1458.91v166.08L541.93%2C960.04Zm-.01-.07L0%2C570v110.34l541.92%2C279.63Zm0%2C.02L0%2C760.52v88.57l541.92%2C110.89Zm0%2C.02L0%2C918.69v82.61l541.92-41.31Zm0%2C.02L0%2C1070.9v88.57l541.92-199.46Zm0%2C.02L0%2C1239.66v110.34l541.92-389.97Z%22%20fill%3D%22hsla%280%2C0%25%2C100%25%2C.6%29%22%2F%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
46
46
 
47
- var img = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='UTF-8'%3f%3e%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1083.95 1920'%3e %3cg id='a'/%3e %3cg id='b'%3e %3cg id='c'%3e %3cpath d='M1083.95%2c0h-103.4l-438.55%2c959.95L1083.95%2c109.31V0Zm0%2c295L542.02%2c959.96l541.93-498.87v-166.08Zm0%2c274.99l-541.92%2c389.98%2c541.92-279.64v-110.34Zm0%2c190.53l-541.92%2c199.46%2c541.92-110.89v-88.57Zm0%2c158.17l-541.92%2c41.31%2c541.92%2c41.31v-82.61Zm0%2c152.21l-541.92-110.89%2c541.92%2c199.46v-88.58Zm0%2c168.77l-541.92-279.64%2c541.92%2c389.98v-110.34Zm0%2c219.25l-541.93-498.87%2c541.93%2c664.95v-166.08Zm0%2c351.77L542%2c960.05l438.55%2c959.95h103.4v-109.31ZM854.8%2c0h-138.91l-173.9%2c959.94L854.8%2c0Zm0%2c1920l-312.81-959.94%2c173.9%2c959.94h138.91ZM606.75%2c0h-129.56l64.78%2c959.94L606.75%2c0Zm0%2c1920l-64.78-959.94-64.78%2c959.94h129.56Zm-64.79-960.06L368.06%2c0H229.15l312.81%2c959.94Zm0%2c.12L229.15%2c1920h138.91l173.9-959.94Zm-.01-.11L103.4%2c0H0V109.31L541.94%2c959.95Zm0%2c.11L0%2c1810.69v109.31H103.4l438.55-959.95Zm-.01-.1L0%2c295.01v166.08l541.93%2c498.87Zm0%2c.09L0%2c1458.91v166.08L541.93%2c960.04Zm-.01-.07L0%2c570v110.34l541.92%2c279.63Zm0%2c.02L0%2c760.52v88.57l541.92%2c110.89Zm0%2c.02L0%2c918.69v82.61l541.92-41.31Zm0%2c.02L0%2c1070.9v88.57l541.92-199.46Zm0%2c.02L0%2c1239.66v110.34l541.92-389.97Z' fill='%2312bbd7'/%3e %3c/g%3e %3c/g%3e%3c/svg%3e";
47
+ var AnimeLines = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201083.95%201920%22%3E%20%20%20%20%3Cg%20id%3D%22a%22%2F%3E%20%20%20%20%3Cg%20id%3D%22b%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22c%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1083.95%2C0h-103.4l-438.55%2C959.95L1083.95%2C109.31V0Zm0%2C295L542.02%2C959.96l541.93-498.87v-166.08Zm0%2C274.99l-541.92%2C389.98%2C541.92-279.64v-110.34Zm0%2C190.53l-541.92%2C199.46%2C541.92-110.89v-88.57Zm0%2C158.17l-541.92%2C41.31%2C541.92%2C41.31v-82.61Zm0%2C152.21l-541.92-110.89%2C541.92%2C199.46v-88.58Zm0%2C168.77l-541.92-279.64%2C541.92%2C389.98v-110.34Zm0%2C219.25l-541.93-498.87%2C541.93%2C664.95v-166.08Zm0%2C351.77L542%2C960.05l438.55%2C959.95h103.4v-109.31ZM854.8%2C0h-138.91l-173.9%2C959.94L854.8%2C0Zm0%2C1920l-312.81-959.94%2C173.9%2C959.94h138.91ZM606.75%2C0h-129.56l64.78%2C959.94L606.75%2C0Zm0%2C1920l-64.78-959.94-64.78%2C959.94h129.56Zm-64.79-960.06L368.06%2C0H229.15l312.81%2C959.94Zm0%2C.12L229.15%2C1920h138.91l173.9-959.94Zm-.01-.11L103.4%2C0H0V109.31L541.94%2C959.95Zm0%2C.11L0%2C1810.69v109.31H103.4l438.55-959.95Zm-.01-.1L0%2C295.01v166.08l541.93%2C498.87Zm0%2C.09L0%2C1458.91v166.08L541.93%2C960.04Zm-.01-.07L0%2C570v110.34l541.92%2C279.63Zm0%2C.02L0%2C760.52v88.57l541.92%2C110.89Zm0%2C.02L0%2C918.69v82.61l541.92-41.31Zm0%2C.02L0%2C1070.9v88.57l541.92-199.46Zm0%2C.02L0%2C1239.66v110.34l541.92-389.97Z%22%20fill%3D%22%2312bbd7%22%2F%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
48
48
 
49
49
  var styles = {"container":"micromag-screen-urbania-trivia-container","content":"micromag-screen-urbania-trivia-content","empty":"micromag-screen-urbania-trivia-empty","emptyContainer":"micromag-screen-urbania-trivia-emptyContainer","fullscreen":"micromag-screen-urbania-trivia-fullscreen","image":"micromag-screen-urbania-trivia-image","placeholder":"micromag-screen-urbania-trivia-placeholder","disabled":"micromag-screen-urbania-trivia-disabled","hidden":"micromag-screen-urbania-trivia-hidden","itemsContainer":"micromag-screen-urbania-trivia-itemsContainer","videoContainer":"micromag-screen-urbania-trivia-videoContainer","video":"micromag-screen-urbania-trivia-video","isCustomBackground":"micromag-screen-urbania-trivia-isCustomBackground","isAnimated":"micromag-screen-urbania-trivia-isAnimated","spin":"micromag-screen-urbania-trivia-spin","heading":"micromag-screen-urbania-trivia-heading","hideHeading":"micromag-screen-urbania-trivia-hideHeading","callToAction":"micromag-screen-urbania-trivia-callToAction","bottom":"micromag-screen-urbania-trivia-bottom","visible":"micromag-screen-urbania-trivia-visible","withGradient":"micromag-screen-urbania-trivia-withGradient","mediaControls":"micromag-screen-urbania-trivia-mediaControls","videoPlaceholder":"micromag-screen-urbania-trivia-videoPlaceholder","bottomContent":"micromag-screen-urbania-trivia-bottomContent"};
50
50
 
51
51
  var defaultBackground = {
52
52
  image: {
53
53
  type: 'image',
54
- url: img,
54
+ url: AnimeLines,
55
55
  width: 1083,
56
56
  height: 1919
57
57
  },
@@ -60,7 +60,7 @@ var defaultBackground = {
60
60
  var placeholderBackground = {
61
61
  image: {
62
62
  type: 'image',
63
- url: img$1,
63
+ url: AnimeLinesGrey,
64
64
  width: 1083,
65
65
  height: 1919
66
66
  },
@@ -98,7 +98,7 @@ var defaultProps = {
98
98
  };
99
99
 
100
100
  var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
101
- var _ref11, _ref12, _ref14, _ref15;
101
+ var _ref12, _ref13, _ref15, _ref16;
102
102
 
103
103
  var layout = _ref.layout,
104
104
  title = _ref.title,
@@ -339,11 +339,21 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
339
339
  return background;
340
340
  }
341
341
 
342
- if (background !== null) {
342
+ var _ref11 = background || {},
343
+ _ref11$image = _ref11.image,
344
+ bgImage = _ref11$image === void 0 ? null : _ref11$image,
345
+ _ref11$video = _ref11.video,
346
+ bgVideo = _ref11$video === void 0 ? null : _ref11$video,
347
+ _ref11$color = _ref11.color,
348
+ bgColor = _ref11$color === void 0 ? null : _ref11$color;
349
+
350
+ if (bgImage !== null || bgVideo !== null) {
343
351
  return _objectSpread__default["default"](_objectSpread__default["default"]({}, defaultBackground), background);
344
352
  }
345
353
 
346
- return defaultBackground;
354
+ return _objectSpread__default["default"](_objectSpread__default["default"]({}, defaultBackground), bgColor !== null ? {
355
+ color: bgColor
356
+ } : null);
347
357
  }, [background]);
348
358
  var placeholderProps = fullscreen ? {
349
359
  width: '100%',
@@ -381,7 +391,7 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
381
391
  }, /*#__PURE__*/React__default["default"].createElement("div", {
382
392
  ref: titleRef
383
393
  }, /*#__PURE__*/React__default["default"].createElement(Heading__default["default"], Object.assign({
384
- className: classNames__default["default"]([styles.heading, (_ref11 = {}, _defineProperty__default["default"](_ref11, className, className !== null), _defineProperty__default["default"](_ref11, styles.hideHeading, body.length === 0), _ref11)]),
394
+ className: classNames__default["default"]([styles.heading, (_ref12 = {}, _defineProperty__default["default"](_ref12, className, className !== null), _defineProperty__default["default"](_ref12, styles.hideHeading, body.length === 0), _ref12)]),
385
395
  body: body
386
396
  }, title)))), /*#__PURE__*/React__default["default"].createElement(components.ScreenElement, {
387
397
  key: "video",
@@ -450,7 +460,7 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
450
460
  media: closedCaptions,
451
461
  currentTime: currentTime
452
462
  }) : null, /*#__PURE__*/React__default["default"].createElement("div", {
453
- className: classNames__default["default"]([styles.bottom, (_ref12 = {}, _defineProperty__default["default"](_ref12, styles.visible, visibleControls), _defineProperty__default["default"](_ref12, styles.withGradient, withSeekBar || withPlayPause || muted), _ref12)])
463
+ className: classNames__default["default"]([styles.bottom, (_ref13 = {}, _defineProperty__default["default"](_ref13, styles.visible, visibleControls), _defineProperty__default["default"](_ref13, styles.withGradient, withSeekBar || withPlayPause || muted), _ref13)])
454
464
  }, hasVideoUrl ? /*#__PURE__*/React__default["default"].createElement(MediaControls__default["default"], {
455
465
  className: classNames__default["default"]([styles.mediaControls, _defineProperty__default["default"]({}, styles.visible, visibleControls)]),
456
466
  withSeekBar: withSeekBar,
@@ -479,13 +489,13 @@ var UrbaniaTrivia = function UrbaniaTrivia(_ref) {
479
489
  }
480
490
  })) : null))) : null) : null))];
481
491
  return /*#__PURE__*/React__default["default"].createElement("div", Object.assign({
482
- className: classNames__default["default"]([styles.container, (_ref14 = {}, _defineProperty__default["default"](_ref14, className, className !== null), _defineProperty__default["default"](_ref14, styles.fullscreen, fullscreen), _ref14)]),
492
+ className: classNames__default["default"]([styles.container, (_ref15 = {}, _defineProperty__default["default"](_ref15, className, className !== null), _defineProperty__default["default"](_ref15, styles.fullscreen, fullscreen), _ref15)]),
483
493
  "data-screen-ready": isStatic || isCapture || ready
484
494
  }, longPressBind, {
485
495
  onMouseMove: onMouseMove
486
496
  }), !isPlaceholder ? /*#__PURE__*/React__default["default"].createElement(Background__default["default"], {
487
497
  background: finalBackground,
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)]),
498
+ className: classNames__default["default"]([styles.background, (_ref16 = {}, _defineProperty__default["default"](_ref16, className, className !== null), _defineProperty__default["default"](_ref16, styles.isCustomBackground, isCustomBackground), _defineProperty__default["default"](_ref16, styles.isAnimated, !isStatic && !isPreview && isCustomBackground), _ref16)]),
489
499
  width: width,
490
500
  height: height,
491
501
  resolution: resolution,
@@ -527,19 +537,16 @@ var definition = {
527
537
  order: 10
528
538
  },
529
539
  title: reactIntl.defineMessage({
530
- id: "eA6lME",
540
+ id: "zDdDqI",
531
541
  defaultMessage: [{
532
542
  "type": 0,
533
- "value": "Urbania trivia screen"
543
+ "value": "Urbania trivia"
534
544
  }]
535
545
  }),
536
546
  component: UrbaniaTriviaScreen,
537
547
  fields: [{
538
548
  name: 'title',
539
549
  type: 'heading-element',
540
- theme: {
541
- textStyle: 'heading1'
542
- },
543
550
  label: reactIntl.defineMessage({
544
551
  id: "N25iDO",
545
552
  defaultMessage: [{
@@ -584,16 +591,7 @@ var definition = {
584
591
  "value": "Background"
585
592
  }]
586
593
  })
587
- } // {
588
- // name: 'callToAction',
589
- // type: 'call-to-action',
590
- // theme: {
591
- // label: {
592
- // textStyle: 'heading2',
593
- // },
594
- // },
595
- // },
596
- ]
594
+ }]
597
595
  };
598
596
 
599
597
  exports.UrbaniaTrivia = UrbaniaTriviaScreen;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-urbania-trivia",
3
- "version": "0.3.71",
3
+ "version": "0.3.76",
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.71",
54
- "@micromag/element-background": "^0.3.71",
55
- "@micromag/element-call-to-action": "^0.3.71",
56
- "@micromag/element-closed-captions": "^0.3.71",
57
- "@micromag/element-container": "^0.3.71",
58
- "@micromag/element-heading": "^0.3.71",
59
- "@micromag/element-image": "^0.3.71",
60
- "@micromag/element-media-controls": "^0.3.71",
61
- "@micromag/element-video": "^0.3.71",
62
- "@micromag/transforms": "^0.3.71",
53
+ "@micromag/core": "^0.3.74",
54
+ "@micromag/element-background": "^0.3.74",
55
+ "@micromag/element-call-to-action": "^0.3.76",
56
+ "@micromag/element-closed-captions": "^0.3.74",
57
+ "@micromag/element-container": "^0.3.74",
58
+ "@micromag/element-heading": "^0.3.74",
59
+ "@micromag/element-image": "^0.3.74",
60
+ "@micromag/element-media-controls": "^0.3.74",
61
+ "@micromag/element-video": "^0.3.74",
62
+ "@micromag/transforms": "^0.3.74",
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": "50093d0adc731dfb58656015179c4ac0b1c6765f"
72
+ "gitHead": "c86e3ead134f626899cfdfc34fac84eb1d02864a"
73
73
  }