@micromag/viewer 0.3.246 → 0.3.249

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 CHANGED
@@ -1266,7 +1266,7 @@ var ViewerMenuShare = function ViewerMenuShare(_ref) {
1266
1266
  setFinalShareUrl = _useState4[1];
1267
1267
 
1268
1268
  useEffect(function () {
1269
- setFinalShareUrl(shareCurrentScreen && currentScreenIndex !== 0 ? "".concat(shareUrl, "/").concat(currentScreenIndex) : shareUrl);
1269
+ setFinalShareUrl(shareCurrentScreen && currentScreenIndex !== 0 ? "".concat(shareUrl, "/").concat(currentScreenIndex + 1) : shareUrl);
1270
1270
  }, [shareCurrentScreen, currentScreenIndex, setFinalShareUrl]);
1271
1271
  return /*#__PURE__*/React.createElement("div", {
1272
1272
  className: classNames([styles$7.container, _defineProperty({}, className, className !== null)]),
@@ -2636,12 +2636,16 @@ var Viewer = function Viewer(_ref) {
2636
2636
  var isView = renderContext === 'view';
2637
2637
  var isStatic = renderContext === 'static';
2638
2638
  var isCapture = renderContext === 'capture';
2639
- var withoutScreensTransforms = isStatic || isCapture; // const {
2640
- // playing,
2641
- // controls: playbackControls = false,
2642
- // controlsVisible: playbackcontrolsVisible = false,
2643
- // media: playbackMedia = null,
2644
- // } = usePlaybackContext();
2639
+ var withoutScreensTransforms = isStatic || isCapture;
2640
+
2641
+ var _usePlaybackContext = usePlaybackContext(),
2642
+ playing = _usePlaybackContext.playing,
2643
+ _usePlaybackContext$c = _usePlaybackContext.controls,
2644
+ playbackControls = _usePlaybackContext$c === void 0 ? false : _usePlaybackContext$c,
2645
+ _usePlaybackContext$c2 = _usePlaybackContext.controlsVisible,
2646
+ playbackcontrolsVisible = _usePlaybackContext$c2 === void 0 ? false : _usePlaybackContext$c2,
2647
+ _usePlaybackContext$m = _usePlaybackContext.media,
2648
+ playbackMedia = _usePlaybackContext$m === void 0 ? null : _usePlaybackContext$m;
2645
2649
 
2646
2650
  var _useDimensionObserver = useDimensionObserver(),
2647
2651
  playbackControlsContainerRef = _useDimensionObserver.ref,
package/lib/index.js CHANGED
@@ -1286,7 +1286,7 @@ var ViewerMenuShare = function ViewerMenuShare(_ref) {
1286
1286
  setFinalShareUrl = _useState4[1];
1287
1287
 
1288
1288
  React.useEffect(function () {
1289
- setFinalShareUrl(shareCurrentScreen && currentScreenIndex !== 0 ? "".concat(shareUrl, "/").concat(currentScreenIndex) : shareUrl);
1289
+ setFinalShareUrl(shareCurrentScreen && currentScreenIndex !== 0 ? "".concat(shareUrl, "/").concat(currentScreenIndex + 1) : shareUrl);
1290
1290
  }, [shareCurrentScreen, currentScreenIndex, setFinalShareUrl]);
1291
1291
  return /*#__PURE__*/React__default["default"].createElement("div", {
1292
1292
  className: classNames__default["default"]([styles$7.container, _defineProperty__default["default"]({}, className, className !== null)]),
@@ -2656,12 +2656,16 @@ var Viewer = function Viewer(_ref) {
2656
2656
  var isView = renderContext === 'view';
2657
2657
  var isStatic = renderContext === 'static';
2658
2658
  var isCapture = renderContext === 'capture';
2659
- var withoutScreensTransforms = isStatic || isCapture; // const {
2660
- // playing,
2661
- // controls: playbackControls = false,
2662
- // controlsVisible: playbackcontrolsVisible = false,
2663
- // media: playbackMedia = null,
2664
- // } = usePlaybackContext();
2659
+ var withoutScreensTransforms = isStatic || isCapture;
2660
+
2661
+ var _usePlaybackContext = contexts.usePlaybackContext(),
2662
+ playing = _usePlaybackContext.playing,
2663
+ _usePlaybackContext$c = _usePlaybackContext.controls,
2664
+ playbackControls = _usePlaybackContext$c === void 0 ? false : _usePlaybackContext$c,
2665
+ _usePlaybackContext$c2 = _usePlaybackContext.controlsVisible,
2666
+ playbackcontrolsVisible = _usePlaybackContext$c2 === void 0 ? false : _usePlaybackContext$c2,
2667
+ _usePlaybackContext$m = _usePlaybackContext.media,
2668
+ playbackMedia = _usePlaybackContext$m === void 0 ? null : _usePlaybackContext$m;
2665
2669
 
2666
2670
  var _useDimensionObserver = hooks.useDimensionObserver(),
2667
2671
  playbackControlsContainerRef = _useDimensionObserver.ref,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/viewer",
3
- "version": "0.3.246",
3
+ "version": "0.3.249",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -85,5 +85,5 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "gitHead": "473a4ad55684e54d3f1e62e760792ed6e003f8e7"
88
+ "gitHead": "80bd66dd353debd617ec938e6f0205732164bf66"
89
89
  }