@micromag/viewer 0.3.451 → 0.3.453
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 +20 -2
- package/lib/index.js +20 -2
- package/package.json +11 -11
package/es/index.js
CHANGED
|
@@ -2423,6 +2423,8 @@ var propTypes$2 = {
|
|
|
2423
2423
|
neighborScreensActive: PropTypes.number,
|
|
2424
2424
|
neighborScreenOffset: PropTypes.number,
|
|
2425
2425
|
neighborScreenScale: PropTypes.number,
|
|
2426
|
+
topSafezoneHeight: PropTypes.number,
|
|
2427
|
+
bottomSafezoneHeight: PropTypes.number,
|
|
2426
2428
|
withMetadata: PropTypes.bool,
|
|
2427
2429
|
withoutGestures: PropTypes.bool,
|
|
2428
2430
|
withoutMenu: PropTypes.bool,
|
|
@@ -2469,6 +2471,8 @@ var defaultProps$2 = {
|
|
|
2469
2471
|
neighborScreensActive: 1,
|
|
2470
2472
|
neighborScreenOffset: 105,
|
|
2471
2473
|
neighborScreenScale: 0.8,
|
|
2474
|
+
topSafezoneHeight: null,
|
|
2475
|
+
bottomSafezoneHeight: null,
|
|
2472
2476
|
withMetadata: false,
|
|
2473
2477
|
withNeighborScreens: false,
|
|
2474
2478
|
withNavigationHint: false,
|
|
@@ -2510,6 +2514,8 @@ var Viewer = function Viewer(_ref) {
|
|
|
2510
2514
|
neighborScreensActive = _ref.neighborScreensActive,
|
|
2511
2515
|
neighborScreenOffset = _ref.neighborScreenOffset,
|
|
2512
2516
|
neighborScreenScale = _ref.neighborScreenScale,
|
|
2517
|
+
topSafezoneHeight = _ref.topSafezoneHeight,
|
|
2518
|
+
bottomSafezoneHeight = _ref.bottomSafezoneHeight,
|
|
2513
2519
|
withMetadata = _ref.withMetadata,
|
|
2514
2520
|
withoutGestures = _ref.withoutGestures,
|
|
2515
2521
|
withoutMenu = _ref.withoutMenu,
|
|
@@ -2956,6 +2962,18 @@ var Viewer = function Viewer(_ref) {
|
|
|
2956
2962
|
clearTimeout(timeout);
|
|
2957
2963
|
};
|
|
2958
2964
|
}, [screenIndex]);
|
|
2965
|
+
var topHeight = 0;
|
|
2966
|
+
if (topSafezoneHeight !== null) {
|
|
2967
|
+
topHeight = topSafezoneHeight / screenScale;
|
|
2968
|
+
} else if (menuOverScreen && currentScreenInteractionEnabled) {
|
|
2969
|
+
topHeight = menuDotsContainerHeight / screenScale;
|
|
2970
|
+
}
|
|
2971
|
+
var bottomHeight = 0;
|
|
2972
|
+
if (bottomSafezoneHeight !== null) {
|
|
2973
|
+
bottomHeight = bottomSafezoneHeight / screenScale;
|
|
2974
|
+
} else if (playbackControls && (playbackcontrolsVisible || !playing) && currentScreenInteractionEnabled) {
|
|
2975
|
+
bottomHeight = playbackControlsContainerHeight / screenScale;
|
|
2976
|
+
}
|
|
2959
2977
|
return /*#__PURE__*/React.createElement(StoryProvider, {
|
|
2960
2978
|
story: parsedStory
|
|
2961
2979
|
}, /*#__PURE__*/React.createElement(ScreenSizeProvider, {
|
|
@@ -2967,8 +2985,8 @@ var Viewer = function Viewer(_ref) {
|
|
|
2967
2985
|
menuOverScreen: menuOverScreen,
|
|
2968
2986
|
width: viewerWidth,
|
|
2969
2987
|
height: viewerHeight,
|
|
2970
|
-
topHeight:
|
|
2971
|
-
bottomHeight:
|
|
2988
|
+
topHeight: topHeight,
|
|
2989
|
+
bottomHeight: bottomHeight,
|
|
2972
2990
|
bottomSidesWidth: (playbackcontrolsVisible || !playing || playbackMedia !== null) && currentScreenInteractionEnabled ? 60 / screenScale : 0,
|
|
2973
2991
|
gotoPreviousScreen: gotoPreviousScreen,
|
|
2974
2992
|
gotoNextScreen: gotoNextScreen,
|
package/lib/index.js
CHANGED
|
@@ -2427,6 +2427,8 @@ var propTypes$2 = {
|
|
|
2427
2427
|
neighborScreensActive: PropTypes.number,
|
|
2428
2428
|
neighborScreenOffset: PropTypes.number,
|
|
2429
2429
|
neighborScreenScale: PropTypes.number,
|
|
2430
|
+
topSafezoneHeight: PropTypes.number,
|
|
2431
|
+
bottomSafezoneHeight: PropTypes.number,
|
|
2430
2432
|
withMetadata: PropTypes.bool,
|
|
2431
2433
|
withoutGestures: PropTypes.bool,
|
|
2432
2434
|
withoutMenu: PropTypes.bool,
|
|
@@ -2473,6 +2475,8 @@ var defaultProps$2 = {
|
|
|
2473
2475
|
neighborScreensActive: 1,
|
|
2474
2476
|
neighborScreenOffset: 105,
|
|
2475
2477
|
neighborScreenScale: 0.8,
|
|
2478
|
+
topSafezoneHeight: null,
|
|
2479
|
+
bottomSafezoneHeight: null,
|
|
2476
2480
|
withMetadata: false,
|
|
2477
2481
|
withNeighborScreens: false,
|
|
2478
2482
|
withNavigationHint: false,
|
|
@@ -2514,6 +2518,8 @@ var Viewer = function Viewer(_ref) {
|
|
|
2514
2518
|
neighborScreensActive = _ref.neighborScreensActive,
|
|
2515
2519
|
neighborScreenOffset = _ref.neighborScreenOffset,
|
|
2516
2520
|
neighborScreenScale = _ref.neighborScreenScale,
|
|
2521
|
+
topSafezoneHeight = _ref.topSafezoneHeight,
|
|
2522
|
+
bottomSafezoneHeight = _ref.bottomSafezoneHeight,
|
|
2517
2523
|
withMetadata = _ref.withMetadata,
|
|
2518
2524
|
withoutGestures = _ref.withoutGestures,
|
|
2519
2525
|
withoutMenu = _ref.withoutMenu,
|
|
@@ -2960,6 +2966,18 @@ var Viewer = function Viewer(_ref) {
|
|
|
2960
2966
|
clearTimeout(timeout);
|
|
2961
2967
|
};
|
|
2962
2968
|
}, [screenIndex]);
|
|
2969
|
+
var topHeight = 0;
|
|
2970
|
+
if (topSafezoneHeight !== null) {
|
|
2971
|
+
topHeight = topSafezoneHeight / screenScale;
|
|
2972
|
+
} else if (menuOverScreen && currentScreenInteractionEnabled) {
|
|
2973
|
+
topHeight = menuDotsContainerHeight / screenScale;
|
|
2974
|
+
}
|
|
2975
|
+
var bottomHeight = 0;
|
|
2976
|
+
if (bottomSafezoneHeight !== null) {
|
|
2977
|
+
bottomHeight = bottomSafezoneHeight / screenScale;
|
|
2978
|
+
} else if (playbackControls && (playbackcontrolsVisible || !playing) && currentScreenInteractionEnabled) {
|
|
2979
|
+
bottomHeight = playbackControlsContainerHeight / screenScale;
|
|
2980
|
+
}
|
|
2963
2981
|
return /*#__PURE__*/React.createElement(contexts.StoryProvider, {
|
|
2964
2982
|
story: parsedStory
|
|
2965
2983
|
}, /*#__PURE__*/React.createElement(contexts.ScreenSizeProvider, {
|
|
@@ -2971,8 +2989,8 @@ var Viewer = function Viewer(_ref) {
|
|
|
2971
2989
|
menuOverScreen: menuOverScreen,
|
|
2972
2990
|
width: viewerWidth,
|
|
2973
2991
|
height: viewerHeight,
|
|
2974
|
-
topHeight:
|
|
2975
|
-
bottomHeight:
|
|
2992
|
+
topHeight: topHeight,
|
|
2993
|
+
bottomHeight: bottomHeight,
|
|
2976
2994
|
bottomSidesWidth: (playbackcontrolsVisible || !playing || playbackMedia !== null) && currentScreenInteractionEnabled ? 60 / screenScale : 0,
|
|
2977
2995
|
gotoPreviousScreen: gotoPreviousScreen,
|
|
2978
2996
|
gotoNextScreen: gotoNextScreen,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/viewer",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.453",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -62,15 +62,15 @@
|
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@babel/runtime": "^7.13.10",
|
|
65
|
-
"@micromag/core": "^0.3.
|
|
66
|
-
"@micromag/element-badge": "^0.3.
|
|
67
|
-
"@micromag/element-scroll": "^0.3.
|
|
68
|
-
"@micromag/element-share-options": "^0.3.
|
|
69
|
-
"@micromag/element-webview": "^0.3.
|
|
70
|
-
"@micromag/elements": "^0.3.
|
|
71
|
-
"@micromag/fields": "^0.3.
|
|
72
|
-
"@micromag/intl": "^0.3.
|
|
73
|
-
"@micromag/screens": "^0.3.
|
|
65
|
+
"@micromag/core": "^0.3.453",
|
|
66
|
+
"@micromag/element-badge": "^0.3.453",
|
|
67
|
+
"@micromag/element-scroll": "^0.3.453",
|
|
68
|
+
"@micromag/element-share-options": "^0.3.453",
|
|
69
|
+
"@micromag/element-webview": "^0.3.453",
|
|
70
|
+
"@micromag/elements": "^0.3.453",
|
|
71
|
+
"@micromag/fields": "^0.3.453",
|
|
72
|
+
"@micromag/intl": "^0.3.453",
|
|
73
|
+
"@micromag/screens": "^0.3.453",
|
|
74
74
|
"@react-spring/core": "^9.6.1",
|
|
75
75
|
"@react-spring/web": "^9.6.1",
|
|
76
76
|
"@use-gesture/react": "^10.3.0",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"access": "public",
|
|
91
91
|
"registry": "https://registry.npmjs.org/"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "1593f4ec1485b357c8a510cafe767318b2d7aadc"
|
|
94
94
|
}
|