@micromag/screen-map 0.3.430 → 0.3.433
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 +2 -11
- package/lib/index.js +1 -10
- package/package.json +14 -14
package/es/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import classNames from 'classnames';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import React, { useState, useRef, useCallback, useMemo, useEffect } from 'react';
|
|
8
8
|
import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
9
|
-
import { PlaceholderMap,
|
|
9
|
+
import { PlaceholderMap, Button, ScreenElement } from '@micromag/core/components';
|
|
10
10
|
import { useGoogleKeys, useScreenSize, usePlaybackContext, usePlaybackMediaRef, useScreenRenderContext, useScreenState, useViewerInteraction } from '@micromag/core/contexts';
|
|
11
11
|
import { useTrackScreenEvent, useDimensionObserver } from '@micromag/core/hooks';
|
|
12
12
|
import { getStyleFromColor, isTextFilled } from '@micromag/core/utils';
|
|
@@ -67,7 +67,6 @@ var propTypes = {
|
|
|
67
67
|
background: PropTypes$1.backgroundElement,
|
|
68
68
|
current: PropTypes.bool,
|
|
69
69
|
active: PropTypes.bool,
|
|
70
|
-
transitions: PropTypes$1.transitions,
|
|
71
70
|
// enableInteractions: PropTypes.func,
|
|
72
71
|
// disableInteraction: PropTypes.func,
|
|
73
72
|
type: PropTypes.string,
|
|
@@ -88,7 +87,6 @@ var defaultProps = {
|
|
|
88
87
|
background: null,
|
|
89
88
|
current: true,
|
|
90
89
|
active: true,
|
|
91
|
-
transitions: null,
|
|
92
90
|
type: null,
|
|
93
91
|
className: null
|
|
94
92
|
};
|
|
@@ -107,7 +105,6 @@ function MapScreen(_ref) {
|
|
|
107
105
|
background = _ref.background,
|
|
108
106
|
current = _ref.current,
|
|
109
107
|
active = _ref.active,
|
|
110
|
-
transitions = _ref.transitions,
|
|
111
108
|
type = _ref.type,
|
|
112
109
|
className = _ref.className;
|
|
113
110
|
var _useIntl = useIntl(),
|
|
@@ -144,7 +141,6 @@ function MapScreen(_ref) {
|
|
|
144
141
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
145
142
|
ready = _useState4[0],
|
|
146
143
|
setReady = _useState4[1];
|
|
147
|
-
var transitionPlaying = current && ready;
|
|
148
144
|
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
149
145
|
var scrollingDisabled = !isEdit && transitionDisabled || !current;
|
|
150
146
|
var backgroundPlaying = current && (isView || isEdit);
|
|
@@ -362,12 +358,7 @@ function MapScreen(_ref) {
|
|
|
362
358
|
}, isPlaceholder ? /*#__PURE__*/React.createElement(PlaceholderMap, {
|
|
363
359
|
className: styles.placeholder,
|
|
364
360
|
withImages: withMarkerImages
|
|
365
|
-
}) : /*#__PURE__*/React.createElement(
|
|
366
|
-
transitions: transitions,
|
|
367
|
-
playing: transitionPlaying,
|
|
368
|
-
fullscreen: true,
|
|
369
|
-
disabled: transitionDisabled
|
|
370
|
-
}, isPreview ? /*#__PURE__*/React.createElement(ImageElement, {
|
|
361
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null, isPreview ? /*#__PURE__*/React.createElement(ImageElement, {
|
|
371
362
|
media: staticUrl !== null ? {
|
|
372
363
|
url: staticUrl,
|
|
373
364
|
metadata: {
|
package/lib/index.js
CHANGED
|
@@ -71,7 +71,6 @@ var propTypes = {
|
|
|
71
71
|
background: core.PropTypes.backgroundElement,
|
|
72
72
|
current: PropTypes.bool,
|
|
73
73
|
active: PropTypes.bool,
|
|
74
|
-
transitions: core.PropTypes.transitions,
|
|
75
74
|
// enableInteractions: PropTypes.func,
|
|
76
75
|
// disableInteraction: PropTypes.func,
|
|
77
76
|
type: PropTypes.string,
|
|
@@ -92,7 +91,6 @@ var defaultProps = {
|
|
|
92
91
|
background: null,
|
|
93
92
|
current: true,
|
|
94
93
|
active: true,
|
|
95
|
-
transitions: null,
|
|
96
94
|
type: null,
|
|
97
95
|
className: null
|
|
98
96
|
};
|
|
@@ -111,7 +109,6 @@ function MapScreen(_ref) {
|
|
|
111
109
|
background = _ref.background,
|
|
112
110
|
current = _ref.current,
|
|
113
111
|
active = _ref.active,
|
|
114
|
-
transitions = _ref.transitions,
|
|
115
112
|
type = _ref.type,
|
|
116
113
|
className = _ref.className;
|
|
117
114
|
var _useIntl = reactIntl.useIntl(),
|
|
@@ -148,7 +145,6 @@ function MapScreen(_ref) {
|
|
|
148
145
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
149
146
|
ready = _useState4[0],
|
|
150
147
|
setReady = _useState4[1];
|
|
151
|
-
var transitionPlaying = current && ready;
|
|
152
148
|
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
153
149
|
var scrollingDisabled = !isEdit && transitionDisabled || !current;
|
|
154
150
|
var backgroundPlaying = current && (isView || isEdit);
|
|
@@ -366,12 +362,7 @@ function MapScreen(_ref) {
|
|
|
366
362
|
}, isPlaceholder ? /*#__PURE__*/React.createElement(components.PlaceholderMap, {
|
|
367
363
|
className: styles.placeholder,
|
|
368
364
|
withImages: withMarkerImages
|
|
369
|
-
}) : /*#__PURE__*/React.createElement(
|
|
370
|
-
transitions: transitions,
|
|
371
|
-
playing: transitionPlaying,
|
|
372
|
-
fullscreen: true,
|
|
373
|
-
disabled: transitionDisabled
|
|
374
|
-
}, isPreview ? /*#__PURE__*/React.createElement(ImageElement, {
|
|
365
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null, isPreview ? /*#__PURE__*/React.createElement(ImageElement, {
|
|
375
366
|
media: staticUrl !== null ? {
|
|
376
367
|
url: staticUrl,
|
|
377
368
|
metadata: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-map",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.433",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -58,18 +58,18 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@babel/runtime": "^7.13.10",
|
|
61
|
-
"@micromag/core": "^0.3.
|
|
62
|
-
"@micromag/element-background": "^0.3.
|
|
63
|
-
"@micromag/element-button": "^0.3.
|
|
64
|
-
"@micromag/element-container": "^0.3.
|
|
65
|
-
"@micromag/element-footer": "^0.3.
|
|
66
|
-
"@micromag/element-header": "^0.3.
|
|
67
|
-
"@micromag/element-heading": "^0.3.
|
|
68
|
-
"@micromag/element-image": "^0.3.
|
|
69
|
-
"@micromag/element-map": "^0.3.
|
|
70
|
-
"@micromag/element-scroll": "^0.3.
|
|
71
|
-
"@micromag/element-text": "^0.3.
|
|
72
|
-
"@micromag/transforms": "^0.3.
|
|
61
|
+
"@micromag/core": "^0.3.433",
|
|
62
|
+
"@micromag/element-background": "^0.3.433",
|
|
63
|
+
"@micromag/element-button": "^0.3.433",
|
|
64
|
+
"@micromag/element-container": "^0.3.433",
|
|
65
|
+
"@micromag/element-footer": "^0.3.433",
|
|
66
|
+
"@micromag/element-header": "^0.3.433",
|
|
67
|
+
"@micromag/element-heading": "^0.3.433",
|
|
68
|
+
"@micromag/element-image": "^0.3.433",
|
|
69
|
+
"@micromag/element-map": "^0.3.433",
|
|
70
|
+
"@micromag/element-scroll": "^0.3.433",
|
|
71
|
+
"@micromag/element-text": "^0.3.433",
|
|
72
|
+
"@micromag/transforms": "^0.3.433",
|
|
73
73
|
"classnames": "^2.2.6",
|
|
74
74
|
"lodash": "^4.17.21",
|
|
75
75
|
"prop-types": "^15.7.2",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"access": "public",
|
|
81
81
|
"registry": "https://registry.npmjs.org/"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "4fe51ffae9ebd9844db8014a1912df2df5122f28"
|
|
84
84
|
}
|