@micromag/viewer 0.3.346 → 0.3.348
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/assets/css/styles.css +9 -9
- package/es/index.js +132 -133
- package/lib/index.js +131 -132
- package/package.json +10 -10
package/lib/index.js
CHANGED
|
@@ -220,8 +220,8 @@ function useScreenInteraction() {
|
|
|
220
220
|
|
|
221
221
|
var styles$g = {"container":"micromag-viewer-buttons-button-container","asLink":"micromag-viewer-buttons-button-asLink","icon":"micromag-viewer-buttons-button-icon","label":"micromag-viewer-buttons-button-label","withIcon":"micromag-viewer-buttons-button-withIcon","right":"micromag-viewer-buttons-button-right","icon-right":"micromag-viewer-buttons-button-icon-right","withIconColumns":"micromag-viewer-buttons-button-withIconColumns","linkDisabled":"micromag-viewer-buttons-button-linkDisabled"};
|
|
222
222
|
|
|
223
|
-
var _excluded$
|
|
224
|
-
var propTypes$
|
|
223
|
+
var _excluded$9 = ["type", "theme", "size", "href", "external", "direct", "target", "label", "children", "focusable", "active", "icon", "iconPosition", "disabled", "loading", "disableOnLoading", "withoutTheme", "asLink", "onClick", "className", "iconClassName", "labelClassName", "refButton"];
|
|
224
|
+
var propTypes$o = {
|
|
225
225
|
type: PropTypes__default["default"].string,
|
|
226
226
|
theme: core.PropTypes.buttonTheme,
|
|
227
227
|
size: core.PropTypes.buttonSize,
|
|
@@ -249,7 +249,7 @@ var propTypes$n = {
|
|
|
249
249
|
})])
|
|
250
250
|
};
|
|
251
251
|
|
|
252
|
-
var defaultProps$
|
|
252
|
+
var defaultProps$o = {
|
|
253
253
|
type: 'button',
|
|
254
254
|
theme: null,
|
|
255
255
|
size: null,
|
|
@@ -299,7 +299,7 @@ var Button = function Button(_ref) {
|
|
|
299
299
|
iconClassName = _ref.iconClassName,
|
|
300
300
|
labelClassName = _ref.labelClassName,
|
|
301
301
|
refButton = _ref.refButton,
|
|
302
|
-
props = _objectWithoutProperties__default["default"](_ref, _excluded$
|
|
302
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded$9);
|
|
303
303
|
var finalLabel = label || children;
|
|
304
304
|
var text = finalLabel !== null ? /*#__PURE__*/React__default["default"].createElement(components.Label, null, finalLabel) : null;
|
|
305
305
|
var hasChildren = label !== null && children !== null;
|
|
@@ -357,10 +357,32 @@ var Button = function Button(_ref) {
|
|
|
357
357
|
tabIndex: focusable ? '0' : '-1'
|
|
358
358
|
}), content);
|
|
359
359
|
};
|
|
360
|
-
Button.propTypes = propTypes$
|
|
361
|
-
Button.defaultProps = defaultProps$
|
|
360
|
+
Button.propTypes = propTypes$o;
|
|
361
|
+
Button.defaultProps = defaultProps$o;
|
|
362
362
|
|
|
363
|
-
var styles$f = {"container":"micromag-viewer-buttons-icon-button-container","
|
|
363
|
+
var styles$f = {"container":"micromag-viewer-buttons-icon-button-container","label":"micromag-viewer-buttons-icon-button-label","icon":"micromag-viewer-buttons-icon-button-icon"};
|
|
364
|
+
|
|
365
|
+
var _excluded$8 = ["iconClassName", "className"];
|
|
366
|
+
var propTypes$n = {
|
|
367
|
+
iconClassName: PropTypes__default["default"].string,
|
|
368
|
+
className: PropTypes__default["default"].string
|
|
369
|
+
};
|
|
370
|
+
var defaultProps$n = {
|
|
371
|
+
iconClassName: null,
|
|
372
|
+
className: null
|
|
373
|
+
};
|
|
374
|
+
var IconButton = function IconButton(_ref) {
|
|
375
|
+
var iconClassName = _ref.iconClassName,
|
|
376
|
+
className = _ref.className,
|
|
377
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded$8);
|
|
378
|
+
return /*#__PURE__*/React__default["default"].createElement(Button, Object.assign({
|
|
379
|
+
className: classNames__default["default"]([styles$f.container, _defineProperty__default["default"]({}, className, className !== null)]),
|
|
380
|
+
labelClassName: styles$f.label,
|
|
381
|
+
iconClassName: classNames__default["default"]([styles$f.icon, _defineProperty__default["default"]({}, iconClassName, iconClassName !== null)])
|
|
382
|
+
}, props));
|
|
383
|
+
};
|
|
384
|
+
IconButton.propTypes = propTypes$n;
|
|
385
|
+
IconButton.defaultProps = defaultProps$n;
|
|
364
386
|
|
|
365
387
|
var _excluded$7 = ["className"];
|
|
366
388
|
var propTypes$m = {
|
|
@@ -369,17 +391,24 @@ var propTypes$m = {
|
|
|
369
391
|
var defaultProps$m = {
|
|
370
392
|
className: null
|
|
371
393
|
};
|
|
372
|
-
var
|
|
394
|
+
var CloseButton$1 = function CloseButton(_ref) {
|
|
373
395
|
var className = _ref.className,
|
|
374
396
|
props = _objectWithoutProperties__default["default"](_ref, _excluded$7);
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
397
|
+
var intl = reactIntl.useIntl();
|
|
398
|
+
return /*#__PURE__*/React__default["default"].createElement(IconButton, Object.assign({
|
|
399
|
+
className: classNames__default["default"]([_defineProperty__default["default"]({}, className, className !== null)]),
|
|
400
|
+
label: intl.formatMessage({
|
|
401
|
+
id: "dj/p/q",
|
|
402
|
+
defaultMessage: [{
|
|
403
|
+
"type": 0,
|
|
404
|
+
"value": "Close"
|
|
405
|
+
}]
|
|
406
|
+
}),
|
|
407
|
+
icon: /*#__PURE__*/React__default["default"].createElement(components.CloseIcon, null)
|
|
379
408
|
}, props));
|
|
380
409
|
};
|
|
381
|
-
|
|
382
|
-
|
|
410
|
+
CloseButton$1.propTypes = propTypes$m;
|
|
411
|
+
CloseButton$1.defaultProps = defaultProps$m;
|
|
383
412
|
|
|
384
413
|
var _excluded$6 = ["className"];
|
|
385
414
|
var propTypes$l = {
|
|
@@ -402,13 +431,34 @@ var CloseButton = function CloseButton(_ref) {
|
|
|
402
431
|
}]
|
|
403
432
|
}),
|
|
404
433
|
icon: /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
434
|
+
width: "19",
|
|
435
|
+
height: "23",
|
|
436
|
+
viewBox: "0 0 19 23",
|
|
437
|
+
fill: "none",
|
|
438
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
439
|
+
}, /*#__PURE__*/React__default["default"].createElement("mask", {
|
|
440
|
+
id: "path-1-inside-1_560_19911",
|
|
409
441
|
fill: "currentColor"
|
|
410
|
-
}, /*#__PURE__*/React__default["default"].createElement("
|
|
411
|
-
|
|
442
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
443
|
+
d: "M0 7C0 4.79086 1.79086 3 4 3H12C14.2091 3 16 4.79086 16 7V19C16 21.2091 14.2091 23 12 23H4C1.79086 23 0 21.2091 0 19V7Z"
|
|
444
|
+
})), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
445
|
+
d: "M0 3H16H0ZM16 19C16 21.7614 13.7614 24 11 24H4C1.23858 24 -1 21.7614 -1 19H1C1 20.6569 2.34315 22 4 22H12C14.2091 22 16 20.6569 16 19ZM4 24C1.23858 24 -1 21.7614 -1 19V8C-1 5.23858 1.23858 3 4 3C2.34315 3 1 4.79086 1 7V19C1 20.6569 2.34315 22 4 22V24ZM16 3V23V3Z",
|
|
446
|
+
fill: "currentColor",
|
|
447
|
+
mask: "url(#path-1-inside-1_560_19911)"
|
|
448
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
449
|
+
x: "3.5",
|
|
450
|
+
y: "0.5",
|
|
451
|
+
width: "15",
|
|
452
|
+
height: "19",
|
|
453
|
+
rx: "2.5",
|
|
454
|
+
stroke: "currentColor"
|
|
455
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
456
|
+
d: "M7.35333 6.35333L14.6467 13.6467",
|
|
457
|
+
stroke: "currentColor",
|
|
458
|
+
strokeLinejoin: "round"
|
|
459
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
460
|
+
d: "M7.35333 13.6467L14.6467 6.35333",
|
|
461
|
+
stroke: "currentColor"
|
|
412
462
|
}))
|
|
413
463
|
}, props));
|
|
414
464
|
};
|
|
@@ -440,15 +490,27 @@ var MenuButton = function MenuButton(_ref) {
|
|
|
440
490
|
}),
|
|
441
491
|
iconPosition: "right",
|
|
442
492
|
icon: /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
493
|
+
width: "19",
|
|
494
|
+
height: "23",
|
|
495
|
+
viewBox: "0 0 19 23",
|
|
496
|
+
fill: "none",
|
|
497
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
498
|
+
}, /*#__PURE__*/React__default["default"].createElement("mask", {
|
|
499
|
+
id: "path-1-inside-1_572_15622",
|
|
447
500
|
fill: "currentColor"
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
501
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
502
|
+
d: "M0 7C0 4.79086 1.79086 3 4 3H12C14.2091 3 16 4.79086 16 7V19C16 21.2091 14.2091 23 12 23H4C1.79086 23 0 21.2091 0 19V7Z"
|
|
503
|
+
})), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
504
|
+
d: "M0 3H16H0ZM16 19C16 21.7614 13.7614 24 11 24H4C1.23858 24 -1 21.7614 -1 19H1C1 20.6569 2.34315 22 4 22H12C14.2091 22 16 20.6569 16 19ZM4 24C1.23858 24 -1 21.7614 -1 19V8C-1 5.23858 1.23858 3 4 3C2.34315 3 1 4.79086 1 7V19C1 20.6569 2.34315 22 4 22V24ZM16 3V23V3Z",
|
|
505
|
+
fill: "currentColor",
|
|
506
|
+
mask: "url(#path-1-inside-1_572_15622)"
|
|
507
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
508
|
+
x: "3.5",
|
|
509
|
+
y: "0.5",
|
|
510
|
+
width: "15",
|
|
511
|
+
height: "19",
|
|
512
|
+
rx: "2.5",
|
|
513
|
+
stroke: "currentColor"
|
|
452
514
|
}))
|
|
453
515
|
}, props));
|
|
454
516
|
};
|
|
@@ -477,15 +539,21 @@ var ShareButton = function ShareButton(_ref) {
|
|
|
477
539
|
}),
|
|
478
540
|
iconPosition: "left",
|
|
479
541
|
icon: /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
542
|
+
width: "16",
|
|
543
|
+
height: "22",
|
|
544
|
+
viewBox: "0 0 16 22",
|
|
545
|
+
fill: "none",
|
|
546
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
547
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
548
|
+
fillRule: "evenodd",
|
|
549
|
+
clipRule: "evenodd",
|
|
550
|
+
d: "M7.55806 0.183058C7.80213 -0.0610194 8.19786 -0.0610194 8.44194 0.183058L12.4194 4.16053C12.6635 4.40461 12.6635 4.80034 12.4194 5.04442C12.1753 5.2885 11.7796 5.2885 11.5355 5.04442L8.625 2.13388V11.25H7.375V2.13388L4.46446 5.04442C4.22039 5.2885 3.82466 5.2885 3.58058 5.04442C3.3365 4.80034 3.3365 4.40461 3.58058 4.16053L7.55806 0.183058Z",
|
|
551
|
+
fill: "currentColor"
|
|
552
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
553
|
+
fillRule: "evenodd",
|
|
554
|
+
clipRule: "evenodd",
|
|
555
|
+
d: "M16 18.25V10.25C16 8.59315 14.6569 7.25 13 7.25C14.1046 7.25 15 8.59315 15 10.25V18.25C15 19.3546 14.1046 20.25 13 20.25H3C1.89543 20.25 1 19.3546 1 18.25V10.25C1 8.59315 1.89543 7.25 3 7.25C1.34315 7.25 0 8.59315 0 10.25V18.25C0 19.9069 1.34315 21.25 3 21.25H13C14.6569 21.25 16 19.9069 16 18.25Z",
|
|
484
556
|
fill: "currentColor"
|
|
485
|
-
}, /*#__PURE__*/React__default["default"].createElement("polygon", {
|
|
486
|
-
points: "8.5 14.5 1.5 14.5 1.5 8 0 8 0 16 10 16 10 8 8.5 8 8.5 14.5"
|
|
487
|
-
}), /*#__PURE__*/React__default["default"].createElement("polygon", {
|
|
488
|
-
points: "9.62 4.62 5 0 0.38 4.62 1.44 5.68 4.25 2.87 4.25 11.26 5.75 11.26 5.75 2.87 8.56 5.68 9.62 4.62"
|
|
489
557
|
}))
|
|
490
558
|
}, props));
|
|
491
559
|
};
|
|
@@ -1544,13 +1612,16 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1544
1612
|
};
|
|
1545
1613
|
}, [menuOpened, onOpenMenu, onCloseMenu]);
|
|
1546
1614
|
useKeyboardShortcuts(keyboardShortcuts);
|
|
1547
|
-
var menuOpenedProgressValue = menuOpenedProgress ? menuOpenedProgress.value || 0 : 0;
|
|
1548
|
-
var shareOpenedProgressValue = shareOpenedProgress ? shareOpenedProgress.value || 0 : 0;
|
|
1549
1615
|
|
|
1616
|
+
// @TODO: Fix if needed
|
|
1617
|
+
// const menuOpenedProgressValue = menuOpenedProgress ? menuOpenedProgress.value || 0 : 0;
|
|
1618
|
+
// const shareOpenedProgressValue = shareOpenedProgress ? shareOpenedProgress.value || 0 : 0;
|
|
1550
1619
|
// should be zero if either screens menu or share menu is opened
|
|
1551
|
-
|
|
1620
|
+
// const dotsOpacity = useEffect(() => {
|
|
1621
|
+
// Math.min(1, Math.max(0, 1 - (menuOpenedProgressValue + shareOpenedProgressValue)));
|
|
1622
|
+
// }, [menuOpenedProgressValue, shareOpenedProgressValue]);
|
|
1552
1623
|
|
|
1553
|
-
// console.log(dotsOpacity
|
|
1624
|
+
// console.log(dotsOpacity);
|
|
1554
1625
|
|
|
1555
1626
|
React.useEffect(function () {
|
|
1556
1627
|
if ((menuOpened || draggingMenu) && !menuMounted) {
|
|
@@ -1579,7 +1650,7 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1579
1650
|
iconPosition: "left",
|
|
1580
1651
|
focusable: !shareOpened
|
|
1581
1652
|
}),
|
|
1582
|
-
toggledButton: /*#__PURE__*/React__default["default"].createElement(CloseButton, {
|
|
1653
|
+
toggledButton: /*#__PURE__*/React__default["default"].createElement(CloseButton$1, {
|
|
1583
1654
|
className: styles$6.menuButton,
|
|
1584
1655
|
onClick: onCloseShare,
|
|
1585
1656
|
theme: menuTheme,
|
|
@@ -1617,10 +1688,10 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1617
1688
|
withoutScreensMenu: withoutScreensMenu,
|
|
1618
1689
|
withoutShareMenu: withoutShareMenu,
|
|
1619
1690
|
onClose: onClickCloseViewer,
|
|
1620
|
-
className: styles$6.dots
|
|
1621
|
-
style
|
|
1622
|
-
|
|
1623
|
-
}
|
|
1691
|
+
className: styles$6.dots
|
|
1692
|
+
// style={{
|
|
1693
|
+
// opacity: dotsOpacity ** 5, // @note this is like a "quint" easing, meaning it'll go towards 1 slowly first and then fast as it approaches 1
|
|
1694
|
+
// }}
|
|
1624
1695
|
}))), /*#__PURE__*/React__default["default"].createElement(ViewerMenuContainer, {
|
|
1625
1696
|
className: styles$6.menuContainer,
|
|
1626
1697
|
progressSpring: shareOpenedProgress,
|
|
@@ -1814,24 +1885,14 @@ var ArrowHint = function ArrowHint(_ref) {
|
|
|
1814
1885
|
className: classNames__default["default"]([styles$3.container, _defineProperty__default["default"]({}, className, className !== null)])
|
|
1815
1886
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1816
1887
|
className: styles$3.inner
|
|
1817
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1818
|
-
className: styles$3.arrow
|
|
1819
|
-
|
|
1820
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1821
|
-
x: "0px",
|
|
1822
|
-
y: "0px",
|
|
1823
|
-
width: "10px",
|
|
1824
|
-
height: "16px",
|
|
1825
|
-
viewBox: "0 0 10 16",
|
|
1826
|
-
fill: "currentColor"
|
|
1827
|
-
}, /*#__PURE__*/React__default["default"].createElement("polygon", {
|
|
1828
|
-
points: "9.62 4.62 5 0 0.38 4.62 1.44 5.68 4.25 2.87 4.25 14.39 5.75 14.39 5.75 2.87 8.56 5.68 9.62 4.62"
|
|
1829
|
-
}))));
|
|
1888
|
+
}, /*#__PURE__*/React__default["default"].createElement(components.ArrowIcon, {
|
|
1889
|
+
className: styles$3.arrow
|
|
1890
|
+
})));
|
|
1830
1891
|
};
|
|
1831
1892
|
ArrowHint.propTypes = propTypes$6;
|
|
1832
1893
|
ArrowHint.defaultProps = defaultProps$6;
|
|
1833
1894
|
|
|
1834
|
-
var styles$2 = {"track":"micromag-viewer-partials-seek-bar-track","progress":"micromag-viewer-partials-seek-bar-progress","inner":"micromag-viewer-partials-seek-bar-inner","progressBar":"micromag-viewer-partials-seek-bar-progressBar","playHead":"micromag-viewer-partials-seek-bar-playHead","withSeekHead":"micromag-viewer-partials-seek-bar-withSeekHead","scrubbedTime":"micromag-viewer-partials-seek-bar-scrubbedTime","showTimestamp":"micromag-viewer-partials-seek-bar-showTimestamp"};
|
|
1895
|
+
var styles$2 = {"track":"micromag-viewer-partials-seek-bar-track","progress":"micromag-viewer-partials-seek-bar-progress","inner":"micromag-viewer-partials-seek-bar-inner","progressBarContainer":"micromag-viewer-partials-seek-bar-progressBarContainer","progressBar":"micromag-viewer-partials-seek-bar-progressBar","playHead":"micromag-viewer-partials-seek-bar-playHead","withSeekHead":"micromag-viewer-partials-seek-bar-withSeekHead","scrubbedTime":"micromag-viewer-partials-seek-bar-scrubbedTime","showTimestamp":"micromag-viewer-partials-seek-bar-showTimestamp"};
|
|
1835
1896
|
|
|
1836
1897
|
var stopDragEventsPropagation = {
|
|
1837
1898
|
onTouchMove: function onTouchMove(e) {
|
|
@@ -1970,12 +2031,14 @@ var SeekBar = function SeekBar(_ref3) {
|
|
|
1970
2031
|
className: classNames__default["default"]([styles$2.container, (_ref6 = {}, _defineProperty__default["default"](_ref6, className, className !== null), _defineProperty__default["default"](_ref6, styles$2.withSeekHead, withSeekHead), _defineProperty__default["default"](_ref6, styles$2.showTimestamp, showTimestamp), _ref6)])
|
|
1971
2032
|
}, stopDragEventsPropagation), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1972
2033
|
className: styles$2.inner
|
|
2034
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2035
|
+
className: styles$2.progressBarContainer
|
|
1973
2036
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1974
2037
|
className: styles$2.progressBar,
|
|
1975
2038
|
style: {
|
|
1976
2039
|
backgroundColor: backgroundColor
|
|
1977
2040
|
}
|
|
1978
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2041
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1979
2042
|
className: styles$2.playHead,
|
|
1980
2043
|
style: {
|
|
1981
2044
|
left: "".concat(progress * 100, "%"),
|
|
@@ -2162,42 +2225,11 @@ function PlaybackControls(_ref) {
|
|
|
2162
2225
|
progressColor = _ref3.progressColor,
|
|
2163
2226
|
seekBarOnly = _ref3.seekBarOnly;
|
|
2164
2227
|
var isCollapsed = controls && !controlsVisible && playing || !controls && mediaHasAudio;
|
|
2165
|
-
var icon = playing ? /*#__PURE__*/React__default["default"].createElement(
|
|
2166
|
-
className: styles$1.icon
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
y: "0px",
|
|
2171
|
-
width: "10px",
|
|
2172
|
-
height: "16px",
|
|
2173
|
-
viewBox: "0 0 10 16",
|
|
2174
|
-
xmlSpace: "preserve"
|
|
2175
|
-
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
2176
|
-
fill: color,
|
|
2177
|
-
x: "1",
|
|
2178
|
-
y: "3.27",
|
|
2179
|
-
width: "3",
|
|
2180
|
-
height: "9.69"
|
|
2181
|
-
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
2182
|
-
fill: color,
|
|
2183
|
-
x: "6",
|
|
2184
|
-
y: "3.27",
|
|
2185
|
-
width: "3",
|
|
2186
|
-
height: "9.69"
|
|
2187
|
-
})) : /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2188
|
-
className: styles$1.icon,
|
|
2189
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2190
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
2191
|
-
x: "0px",
|
|
2192
|
-
y: "0px",
|
|
2193
|
-
width: "10px",
|
|
2194
|
-
height: "16px",
|
|
2195
|
-
viewBox: "0 0 10 16",
|
|
2196
|
-
xmlSpace: "preserve"
|
|
2197
|
-
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2198
|
-
fill: color,
|
|
2199
|
-
d: "M1,3.16V12.84l8-4.84L1,3.16"
|
|
2200
|
-
}));
|
|
2228
|
+
var icon = playing ? /*#__PURE__*/React__default["default"].createElement(components.PauseIcon, {
|
|
2229
|
+
className: styles$1.icon
|
|
2230
|
+
}) : /*#__PURE__*/React__default["default"].createElement(components.PlayIcon, {
|
|
2231
|
+
className: styles$1.icon
|
|
2232
|
+
});
|
|
2201
2233
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2202
2234
|
className: classNames__default["default"]([styles$1.container, (_ref4 = {}, _defineProperty__default["default"](_ref4, className, className !== null), _defineProperty__default["default"](_ref4, styles$1.withPlayPause, controls && !seekBarOnly), _defineProperty__default["default"](_ref4, styles$1.withMute, hasMedia || controls), _defineProperty__default["default"](_ref4, styles$1.withSeekBar, controls), _defineProperty__default["default"](_ref4, styles$1.withSeekBarOnly, seekBarOnly), _defineProperty__default["default"](_ref4, styles$1.isCollapsed, isCollapsed), _defineProperty__default["default"](_ref4, styles$1.isMuted, muted), _defineProperty__default["default"](_ref4, collapsedClassName, collapsedClassName !== null && isCollapsed), _ref4)])
|
|
2203
2235
|
}, /*#__PURE__*/React__default["default"].createElement(components.Button, {
|
|
@@ -2246,44 +2278,11 @@ function PlaybackControls(_ref) {
|
|
|
2246
2278
|
},
|
|
2247
2279
|
onClick: muted ? onUnmute : onMute,
|
|
2248
2280
|
focusable: controlsVisible || mediaHasAudio,
|
|
2249
|
-
icon: muted ? /*#__PURE__*/React__default["default"].createElement(
|
|
2250
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2251
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
2252
|
-
x: "0px",
|
|
2253
|
-
y: "0px",
|
|
2254
|
-
width: "10px",
|
|
2255
|
-
height: "16px",
|
|
2256
|
-
viewBox: "0 0 10 16",
|
|
2257
|
-
xmlSpace: "preserve",
|
|
2281
|
+
icon: muted ? /*#__PURE__*/React__default["default"].createElement(components.UnmuteIcon, {
|
|
2258
2282
|
className: styles$1.icon
|
|
2259
|
-
}
|
|
2260
|
-
fill: color,
|
|
2261
|
-
points: "2.75 4.63 1.24 6 0 6 0 10 1.24 10 4.54 13 4.54 3 2.75 4.63"
|
|
2262
|
-
}), /*#__PURE__*/React__default["default"].createElement("polygon", {
|
|
2263
|
-
fill: color,
|
|
2264
|
-
points: "10 6.63 8.94 5.57 7.58 6.93 6.21 5.57 5.15 6.63 6.52 7.99 5.15 9.35 6.21 10.43 7.58 9.06 8.94 10.43 10 9.35 8.64 7.99 10 6.63"
|
|
2265
|
-
})) : /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2266
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2267
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
2268
|
-
x: "0px",
|
|
2269
|
-
y: "0px",
|
|
2270
|
-
width: "10px",
|
|
2271
|
-
height: "16px",
|
|
2272
|
-
viewBox: "0 0 10 16",
|
|
2273
|
-
xmlSpace: "preserve",
|
|
2283
|
+
}) : /*#__PURE__*/React__default["default"].createElement(components.MuteIcon, {
|
|
2274
2284
|
className: styles$1.icon
|
|
2275
|
-
},
|
|
2276
|
-
fill: color,
|
|
2277
|
-
points: "2.75 4.63 1.24 6 0 6 0 10 1.24 10 4.54 13 4.54 3 2.75 4.63"
|
|
2278
|
-
}), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
2279
|
-
fill: color,
|
|
2280
|
-
cx: "6.14",
|
|
2281
|
-
cy: "8",
|
|
2282
|
-
r: ".99"
|
|
2283
|
-
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2284
|
-
fill: color,
|
|
2285
|
-
d: "M6.14,11.88v-1.5c1.31,0,2.38-1.07,2.38-2.38s-1.07-2.38-2.38-2.38v-1.5c2.14,0,3.88,1.74,3.88,3.88s-1.74,3.88-3.88,3.88Z"
|
|
2286
|
-
})),
|
|
2285
|
+
}),
|
|
2287
2286
|
"aria-label": muted ? intl.formatMessage({
|
|
2288
2287
|
id: "RK/QEY",
|
|
2289
2288
|
defaultMessage: [{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/viewer",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.348",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -59,14 +59,14 @@
|
|
|
59
59
|
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
|
60
60
|
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
|
61
61
|
"@fortawesome/react-fontawesome": "^0.1.13",
|
|
62
|
-
"@micromag/core": "^0.3.
|
|
63
|
-
"@micromag/element-scroll": "^0.3.
|
|
64
|
-
"@micromag/element-share-options": "^0.3.
|
|
65
|
-
"@micromag/element-webview": "^0.3.
|
|
66
|
-
"@micromag/elements": "^0.3.
|
|
67
|
-
"@micromag/fields": "^0.3.
|
|
68
|
-
"@micromag/intl": "^0.3.
|
|
69
|
-
"@micromag/screens": "^0.3.
|
|
62
|
+
"@micromag/core": "^0.3.348",
|
|
63
|
+
"@micromag/element-scroll": "^0.3.348",
|
|
64
|
+
"@micromag/element-share-options": "^0.3.348",
|
|
65
|
+
"@micromag/element-webview": "^0.3.348",
|
|
66
|
+
"@micromag/elements": "^0.3.348",
|
|
67
|
+
"@micromag/fields": "^0.3.348",
|
|
68
|
+
"@micromag/intl": "^0.3.348",
|
|
69
|
+
"@micromag/screens": "^0.3.348",
|
|
70
70
|
"@react-spring/core": "^9.6.1",
|
|
71
71
|
"@react-spring/web": "^9.6.1",
|
|
72
72
|
"@use-gesture/react": "^10.2.4",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "20ef008fdf5c678004b740f395f51cb548591dad"
|
|
89
89
|
}
|